Skip to content

Commit

Permalink
scripts/setup.bash: Allow specification of device input file via xbox…
Browse files Browse the repository at this point in the history
… bash command
  • Loading branch information
cbrxyz committed Nov 5, 2024
1 parent 8b09f49 commit 8c42a9a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
15 changes: 10 additions & 5 deletions NaviGator/mission_control/navigator_launch/launch/shore.launch
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<launch>
<!-- Run Joystick -->
<include file="$(find navigator_launch)/launch/shore/xbox_controller.launch" />
<arg name="wireless" default="False" />
<arg name="device_input" default="/dev/input/js0" unless="$(arg wireless)"/>

<node name="network_heartbeat" pkg="mil_tools" type="network_broadcaster.py" output="screen" />
<!-- Run Joystick -->
<include file="$(find navigator_launch)/launch/shore/xbox_controller.launch">
<arg name="device_input" value="$(arg device_input)"/>
</include>

<!-- Host Monitoring -->
<node name="host_monitor" pkg="navigator_gui" type="host_monitor.py"/>
<node name="network_heartbeat" pkg="mil_tools" type="network_broadcaster.py" output="screen" />

<!-- Host Monitoring -->
<node name="host_monitor" pkg="navigator_gui" type="host_monitor.py"/>
</launch>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<launch>
<arg name="wireless" default="False" />
<arg name="device_input" default="/dev/input/js0" unless="$(arg wireless)"/>
<arg name="device_input" default="/dev/input/js1" unless="$(arg wireless)"/>
<arg name="device_input" default="/dev/input/by-id/usb-045e_0291-joystick" if="$(arg wireless)"/>
<!-- Connect to MIL's Xbox Game controller to publish /joy messages -->
<node pkg="joy" type="joy_node" name="joy_node">
Expand Down
6 changes: 2 additions & 4 deletions scripts/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ alias killgazebo="killall -9 gzserver && killall -9 gzclient"
alias killros='$MIL_REPO/scripts/kill_ros.sh'
alias killprocess='$MIL_REPO/scripts/kill_process.sh'

startxbox() {
xbox() {
rosservice call /wrench/select "topic: '/wrench/rc'"
roslaunch navigator_launch shore.launch
roslaunch navigator_launch shore.launch wireless_device:="$1"
}

# catkin_make for one specific package only
Expand Down Expand Up @@ -206,8 +206,6 @@ unmount_ssd() {
sudo umount /mnt/ssd
}

alias xbox=startxbox

# PYTHONPATH modifications
export PYTHONPATH="${HOME}/catkin_ws/src/mil/mil_common/perception/vision_stack/src:${HOME}/catkin_ws/src/mil/mil_common/axros/axros/src:${PYTHONPATH}"

Expand Down

0 comments on commit 8c42a9a

Please sign in to comment.