No laser scan received

asked 2022-10-16 05:58:37 -0500

jieun gravatar image

updated 2022-10-17 02:44:23 -0500

ravijoshi gravatar image

Hello, I'm doing this for the first time. I have an error, so I'm asking a question.

I'm making maps using velodyne VLP16, scout (a robot with four wheels), cartographer.

I made a map and saved it, but there is an error while blowing it.

Below is the lunch file that I run to load the map.

  <!-- Arguments -->
  <arg name="map_file" default="$(find slam)/maps/map5.yaml"/>
  <arg name="open_rviz" default="true"/>

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

  <!-- AMCL -->
  <include file="$(find slam)/launch/amcl.launch"/>

  <!-- rviz --> 
  <group if="$(arg open_rviz)"> 
    <node pkg="rviz" type="rviz" name="rviz" required="true"
          args="-d $(find slam)/rviz/rviz5.rviz"/>

As shown below, there is a warning that scan topic cannot be received in amcl.

[ WARN] [1665917000.559828999]: No laser scan received (and thus no pose updates have been published) for 1665917000.559736 seconds.  Verify that data is being published on the /scan topic.

But the scan data is coming out well.

user@user:~$ rostopic echo /scan -n1
  seq: 744
    secs: 1665916310
    nsecs: 709621429
  frame_id: "velodyne"
angle_min: -3.14159274101
angle_max: 3.14159274101
angle_increment: 0.00700000021607
time_increment: 0.0
scan_time: 0.0
range_min: 0.0
range_max: 200.0
ranges: [inf, 0.5019235610961914, 0.5019235610961914, inf, 0.5099223852157593, inf, 0.49992385506629944, 0.5059230327606201, 0.5019235610961914, 0.50592297315 ~

Amcl is subscribing to scan data.

user@user:~$ rostopic info /scan
Type: sensor_msgs/LaserScan

 * /velodyne_nodelet_manager (http://user:42409/)

 * /amcl (http://user:39647/)
 * /rviz (http://user:33517/)

My amcl lunch file is like this.

  <!-- Arguments -->
  <arg name="use_map_topic"  default="true"/>
  <arg name="scan_topic"     default="scan"/>
  <arg name="initial_pose_x" default="0.0"/>
  <arg name="initial_pose_y" default="0.0"/>
  <arg name="initial_pose_a" default="0.0"/>

  <!-- AMCL -->
  <node pkg="amcl" type="amcl" name="amcl">

    <param name="min_particles"             value="500"/>
    <param name="max_particles"             value="3000"/>
    <param name="kld_err"                   value="0.02"/>
    <param name="update_min_d"              value="0.20"/>
    <param name="update_min_a"              value="0.20"/>
    <param name="resample_interval"         value="1"/>
    <param name="transform_tolerance"       value="0.5"/>
    <param name="recovery_alpha_slow"       value="0.00"/>
    <param name="recovery_alpha_fast"       value="0.00"/>
    <param name="initial_pose_x"            value="$(arg initial_pose_x)"/>
    <param name="initial_pose_y"            value="$(arg initial_pose_y)"/>
    <param name="initial_pose_a"            value="$(arg initial_pose_a)"/>
    <param name="gui_publish_rate"          value="50.0"/>

    <remap from="scan"                      to="$(arg scan_topic)"/>
    <param name="laser_max_range"           value="3.5"/>
    <param name="laser_max_beams"           value="180"/>
    <param name="laser_z_hit"               value="0.5"/>
    <param name="laser_z_short"             value="0.05"/>
    <param name="laser_z_max"               value="0.05"/>
    <param name="laser_z_rand"              value="0.5"/>
    <param name="laser_sigma_hit"           value="0.2"/>
    <param name="laser_lambda_short"        value="0.1"/>
    <param name="laser_likelihood_max_dist" value="2.0"/>
    <param name="laser_model_type"          value="likelihood_field"/>

    <param name="odom_model_type"           value="diff-corrected"/>
    <param name="odom_alpha1"               value="0.1 ...
edit retag flag offensive close merge delete