Ask Your Question

how to let move_base subscribe to (custom) /odom topic?

asked 2020-05-09 11:52:52 -0500

ld898 gravatar image

Hello everyone, I have configured the move_base node (shown in following window) and customized the topic /odom in my odom_node.cpp file according to tutorial, after I launch my launch file roslaunch car_gazebo car_move_base.launch and run the odom_node.cpp ( it has been compiled ) rosrun custom_odom odom_node, I thought the move_base node would subscribe to the topic /odom, but it didn't, so how to let the move_base subscribe to my custom /odom topic.

 <!-- move_base -->
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">

    <rosparam file="$(find car_description)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find car_description)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find car_description)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find car_description)/param/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find car_description)/param/teb_local_planner_params.yaml" command="load" />

    <param name="base_global_planner" value="center_line/CenterLineROS" />
    <param name="planner_frequency" value="1.0" />
    <param name="planner_patience" value="5.0" />

    <param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
    <param name="controller_frequency" value="5.0" />
    <param name="controller_patience" value="15.0" />

 <node pkg="topics_setup" type="" name="cmd_vel_to_ackermann_drive">
    <remap from="ackermann_cmd" to="control_command"/>
<node name="map_server" pkg="map_server" type="map_server" args="/maps/map_1.yaml" output="screen">
        <param name="frame_id" value="map"/>

image description Before I planned to modify the source code of move_base by adding code subscribing to the topic, but not recommended. What should I do?

Thank you in advance

edit retag flag offensive close merge delete


Did you solve this issue?

JRosa gravatar image JRosa  ( 2021-09-23 04:33:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-05-13 14:37:43 -0500

David Lu gravatar image

Modify your launch file to remap from odom to your custom odom topic.

edit flag offensive delete link more


Thank you for answer, but the requirement for remap is that the odom is existing and then remap my custom topic to it. And the problem I face: no odom topic which I can remap from custom odom to.

ld898 gravatar image ld898  ( 2020-05-13 15:58:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-05-09 11:52:52 -0500

Seen: 337 times

Last updated: May 13 '20