Remapping move_base Twist publisher topic.
Hi all,
I'm working with a Clearpath Husky on ROS Indigo, Ubuntu 14.04. I'm trying to remap the topic that move_base
publishes its Twist messages on to ('cmd_vel'
) to another name that I can use with a topic_tools
mux. I was able to do so by changing the move_base.launch
file in the jackal_navigation
package, however, I want to know if there's a way to do so without changing the source of the original package.
I created my own launch file that launches the jackal_navigation amcl_navigation.launch
file and tried to remap the move_base
publishing topic using <remap from="cmd_vel" to="/new_cmd_vel"/>
, however, this did not work.
Are there any services or parameters that I am unaware of that remap the navigation stacks Twist message publisher?
Thanks in advance!
Edit: Below is the launch file I am using and how I tried to remap the topic
<launch>
<include file="$(find jackal_gazebo)/launch/jackal_world.launch">
<arg name="config" value="front_laser"/>
</include>
<include file="$(find jackal_navigation)/launch/amcl_demo.launch">
<arg name="map_file" value="/home/river/gazebo_map.yaml"/>
<!-- This is how I tried to change it -->
<remap from="cmd_vel" to="/nav_vel"/>
</include>
<include file="$(find jackal_viz)/launch/view_robot.launch">
<arg name="config" value="localization"/>
</include>
<!-- How I would like to use my renamed topic (in a multiplexer) -->
<node name="topic_tools_mux" pkg="topic_tools" type="mux"
args="/cmd_vel /bsc_jackal/bsc_vel /bsc_jackal/key_vel /bsc_jackal/nav_vel mux:=bsc_mux">
</node>
</launch>
Below is the modified source launch file for Jackal in jackal_navigation/launch/include/move_base.launch
:
<launch>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find jackal_navigation)/params/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find jackal_navigation)/params/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find jackal_navigation)/params/map_nav_params/local_costmap_params.yaml" command="load" />
<rosparam file="$(find jackal_navigation)/params/map_nav_params/global_costmap_params.yaml" command="load" />
<rosparam file="$(find jackal_navigation)/params/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find jackal_navigation)/params/move_base_params.yaml" command="load" />
<param name="base_global_planner" type="string" value="navfn/NavfnROS" />
<param name="base_local_planner" value="base_local_planner/TrajectoryPlannerROS"/>
<remap from="odom" to="odometry/filtered" />
<!-- Here is where I remapped the topic -->
<remap from="cmd_vel" to="/bsc_jackal/nav_vel"/>
</node>
</launch>
Below is the output of rostopic list | grep vel
as Procopio requested. /bsc_jackal/*
are the topics generated from the topic_tools
mux. /jackal_velocity_controller/cmd_vel
is just a relay to /cmd_vel
using topic tools (I found this out by looking at the jackal source launch files).
/bsc_jackal/bsc_vel
/bsc_jackal/key_vel
/bsc_jackal/nav_vel
/cmd_vel
/jackal_velocity_controller/cmd_vel
/jackal_velocity_controller/odom
/navsat/fix/velocity/parameter_descriptions
/navsat/fix/velocity/parameter_updates
/navsat/vel
Can you paste your launch file here so we can see how you're attempting this?
paste the output of
rostopic list | grep vel
so we can see all the velocity related topics. It may be that they are inside some namespace.@Procopio please see my edit.