Ask Your Question

move_base doesn't subscribe to scan topic

asked 2018-08-01 05:19:58 -0600

Diego_Perez gravatar image

updated 2018-08-02 02:43:25 -0600

Hi, I'm using a rosbot and I made a map with gmapping, now I want to run amcl and move_base for autonomus movement. My problem is that local costmap is empty because move_base doesn't subscribe to laser scan topic and it doesn't mark the obstacles.



    <node pkg="controller" type="ros-core2-client" name="serial_node" output="screen">
      <param  name="baud" value="57600"/>
      <param  name="port" value="/dev/ttyS1"/>

    <arg name="map_file" default="$(find slam_setup)/maps/mapaIngIndustrial.yaml"/>

    <node pkg="slam_setup" type="slam_setup_node" name="tf_odom_baselink"/> 

    <node pkg="tf" type="static_transform_publisher" name="laser_broadcaster" 
        args="0 0 0 3.14 0 0 base_link laser_frame 100" />

    <node pkg="rplidar_ros" type="rplidarNode" name="rplidar"/>    

    <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

    <node pkg="amcl" type="amcl" name="amcl" output="screen">

          <param name="odom_frame_id" value="odom"/>

          <param name="odom_model_type" value="diff-corrected"/>

          <param name="base_frame_id" value="base_link"/>

          <param name="update_min_d" value="0.1"/>

          <param name="update_min_a" value="0.1"/>

          <param name="min_particles" value="250"/>

          <param name="max_particles" value="600"/>

          <param name="recovery_alpha_fast" value="0.1"/>

          <param name="odom_alpha1" value="0.2"/>

          <param name="odom_alpha2" value="0.2"/>

          <param name="odom_alpha3" value="0.2"/>

          <param name="odom_alpha4" value="0.2"/>

          <param name="use_map_topic" value="true"/>

      <param name="save_pose_rate" value="10"/>

          <param name="initial_pos_x" value="10.0"/>

          <param name="initial_pos_y" value="10.0"/>

          <param name="initial_cov_yy" value="100.0"/>

          <param name="initial_cov_xx" value="100.0"/>

          <param name="transform_tolerance" value="0.3"/>


    <node pkg="move_base" type="move_base" name="move_base" output="screen">
    <param name="controller_frequency" value="10.0"/>

        <rosparam file="$(find rosbot_nav)/parametros/costmap_common_params.yaml" command="load" ns="global_costmap"/>
    <rosparam file="$(find rosbot_nav)/parametros/costmap_common_params.yaml" command="load" ns="local_costmap"/>
    <rosparam file="$(find rosbot_nav)/parametros/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find rosbot_nav)/parametros/global_costmap_params.yaml" command="load"/>
    <rosparam file="$(find rosbot_nav)/parametros/trajectory_planner.yaml" command="load"/>


costmap params:

common params:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.15,0.15],[0.15,-0.15],[-0.15,-0.15],[-0.15,0.15]]
inflation_radius: 0.4
map_topic: map
resolution: 0.15
subscribe_to_updates: true
transform_tolerance: 0.2

obsevation_sources: laser_scan_sensor

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


   update_frecuency: 5.0
   publish_frecuency: 1.0
   static_map: false
   rolling_window: true
   width: 3.0
   heigth: 3.0
   global_frame: odom
   robot_base_frame: base_link


  update_frequency: 2.5
  static_map: true
  rolling_window: false
  global_frame: map
  robot_base_frame: base_link


  max_vel_theta: 0.5

  acc_lim_theta: 0.25
  holonomic_robot: false
  meter_scoring: true
  xy_goal_tolerance: 0.30
  yaw_goal_tolerance: 0.25
  controller_frequency: 10.0
  global_frame_id: map
  sim_time: 2.0
  sim_granularity: 0.05
  occdist_scale: 0.04
  pdist_scale: 0.3
  publish_cost_grid_pc: true
  dwa: true

I'm using ubuntu 16 and Ros Kinetic.

Now I include range sensor and move_base subscribe them with /tf, but doesn't subscribe to the laser. The local costmap is empty because It doesn't detect the obstacles. The laser and range sensor are working properly, I can see them in rviz.

rosnode info /move_base

Node [/move_base]
 * /cmd_vel [geometry_msgs/Twist]
 * /move_base/NavfnROS/plan [nav_msgs/Path]
 * /move_base/TrajectoryPlannerROS/cost_cloud [sensor_msgs/PointCloud2 ...
edit retag flag offensive close merge delete


Can you please post the output of rosnode info /move_base

David Lu gravatar image David Lu  ( 2018-08-01 10:35:20 -0600 )edit

I edit my question with the outpout, thanks.

Diego_Perez gravatar image Diego_Perez  ( 2018-08-02 02:16:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-02 04:24:35 -0600

Diego_Perez gravatar image

Hi, I found the problem, I have a parameter with wrong name, observation_sources. Sorry for waste your time.

edit flag offensive delete link more

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: 2018-08-01 05:19:58 -0600

Seen: 340 times

Last updated: Aug 02 '18