ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

move_base won't subscribe to /scan topic

asked 2021-06-23 10:29:23 -0500

jmyazbeck gravatar image

updated 2022-05-15 08:29:23 -0500

lucasw gravatar image

I am publishing laser scan data from another framework, but move_base won't subscribe to it. I know it is being published from rostopic echo scan. The sensor frame shows correctly in the tf_tree and I don't see why move_base wont subscribe to the topic.

Here is my move_base.launch file:


  <master auto="start"/>
  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="/home/jm/isaac/sdk/packages/eband_ros/maps/factory.yaml"/>

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

    <rosparam file="$(find isaac_navigation)/param/costmap_common_params.yaml" command="load" />
    <rosparam file="$(find isaac_navigation)/param/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find isaac_navigation)/param/global_costmap_params.yaml" command="load" />

    <param name="base_global_planner" type="string" value="navfn/NavfnROS" />
    <param name="base_local_planner" value="eband_local_planner/EBandPlannerROS" />


and here is my costmap_common_params.yaml file :

obstacle_range: 0.5
raytrace_range: 3.0
footprint: [[0.57, 0.75],[0.57, -0.75],[-1.153, -0.75],[-1.153, 0.75]]
inflation_radius: 0.25

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}

I would like to upload the rqt_graph and the rqt_tf_tree pictures but i dont have enough points.

Thanks in advance for helping!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2021-06-24 08:22:22 -0500

tryan gravatar image

updated 2021-06-24 08:23:33 -0500

In the navigation tutorial, notice that costmap_common_params.yaml is loaded twice but in different namespaces:

<rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" /> 
<rosparam file="$(find my_robot_name_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />

In your case, you load the common parameters once without a namespace, so the parameters aren't where the two costmaps are looking for their parameters. You can check the parameter definitions with:

rosparam list

With a correct setup, you should see the common parameters listed under each costmap's namespace, like:

edit flag offensive delete link more


Awesome, thank you so much. It makes sense and it worked!

jmyazbeck gravatar image jmyazbeck  ( 2021-06-24 09:02:02 -0500 )edit

answered 2021-06-23 11:25:45 -0500 gravatar image

updated 2021-06-23 11:30:32 -0500

Try adding / before the scan topic in costmap param.

Like this

laser_scan_sensor: {sensor_frame: base_scan, data_type: LaserScan, topic: /scan, marking: true, clearing: true}

if that don't work try without sensor_frame in it.

edit flag offensive delete link more


I just tried both and it does not work

jmyazbeck gravatar image jmyazbeck  ( 2021-06-24 06:47:44 -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: 2021-06-23 10:29:23 -0500

Seen: 412 times

Last updated: Jun 24 '21