Skip to content

Commit

Permalink
[fetch_gazebo] Add option to launch teleop node
Browse files Browse the repository at this point in the history
  • Loading branch information
708yamaguchi committed Jul 10, 2020
1 parent 93d3686 commit f92c1d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 9 additions & 4 deletions fetch_gazebo/launch/include/fetch.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<arg name="y" default="0.0" />
<arg name="z" default="0.0" />
<arg name="yaw" default="0.0" />
<arg name="launch_teleop" default="true" />
<arg name="joy_device" default="/dev/fetch_joy" />
<arg name="ps4" default="false" />

<!-- Setup controllers -->
<rosparam file="$(find fetch_gazebo)/config/default_controllers.yaml" command="load" />
Expand Down Expand Up @@ -31,9 +34,11 @@
<param name="lazy" type="bool" value="True"/>
</node>

<!-- Start a mux between application and teleop -->
<node pkg="topic_tools" type="mux" name="cmd_vel_mux" respawn="true" args="base_controller/command /cmd_vel /teleop/cmd_vel">
<remap from="mux" to="cmd_vel_mux" />
</node>
<!-- Teleop -->
<include if="$(arg launch_teleop)" file="$(find fetch_bringup)/launch/include/teleop.launch.xml">
<arg name="joy_device" value="$(arg joy_device)"/>
<arg name="ps4" value="$(arg ps4)"/>
</include>
<param name="joy/deadzone" value="0.05"/>

</launch>
5 changes: 4 additions & 1 deletion fetch_gazebo/launch/playground.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<arg name="debug" default="false"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="launch_teleop" default="true"/>

<!-- Start Gazebo with a blank world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
Expand All @@ -18,6 +19,8 @@
</include>

<!-- Oh, you wanted a robot? -->
<include file="$(find fetch_gazebo)/launch/include/$(arg robot).launch.xml" />
<include file="$(find fetch_gazebo)/launch/include/$(arg robot).launch.xml">
<arg name="launch_teleop" value="$(arg launch_teleop)"/>
</include>

</launch>

0 comments on commit f92c1d0

Please sign in to comment.