ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

move_base doesn't subscribe to scan topic

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

Diego_Perez gravatar image

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

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.

launch:

<launch>


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

    <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>

    <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"/>
    </node>

</launch>

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}

local_costmap:

   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

global_costmap:

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

TrajectoryPlannerROS:

  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]
Publications: 
 * /cmd_vel [geometry_msgs/Twist]
 * /move_base/NavfnROS/plan [nav_msgs/Path]
 * /move_base/TrajectoryPlannerROS/cost_cloud [sensor_msgs/PointCloud2 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please post the output of rosnode info /move_base

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

I edit my question with the outpout, thanks.

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

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Comments

what was the exact problem? was the topic /scan in observation_sources or something different?

pk99 gravatar image pk99  ( 2021-04-23 09:56:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-01 05:19:58 -0500

Seen: 781 times

Last updated: Aug 02 '18