ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

AMCL warning: no laser scan received

asked 2018-09-13 02:47:14 -0600

PedroFilipe gravatar image

updated 2018-09-13 12:38:31 -0600

jayess gravatar image

Hello everyone. I'm having a problem.

I acquired a RPLidar A2 recently and I'm trying to perform localization on a previously built map. I've built the map via Hector Map and saved it via map_server - yaml file. I am now trying to use the AMCL node but I have some issues. After a few researches on the problem, I am running the following commands in separate windows.  

roslaunch rplidar_ros rplidar.launch
rosrun map_server map_server Documents/Maps/mymap.yaml
rosrun tf static_transform_publisher 0 0 0 0 0 0 map base_link 100
rosrun the tf statin_transform_publisher 0 0 0 0 0 0 base_link laser 100
rosrun amcl amcl
roslaunch rviz rviz

  These are the frames I'm getting: https://ibb.co/hzDLLU  

In the terminal window, I’m getting a problem in the AMCL launch. The warning message is the following:  

No laser scan received (and thus no pose updates have been published) for 1536824498.771014 seconds.  Verify that data is being published on the /scan topic.

  I have checked the /scan topic and there are messages flowing.

Type: sensor_msgs/LaserScan

 Publishers:   */rplidarNode

 Subscribers:   */rviz_1536823488387470311 * /amcl

In the RViz window, I can see the map and the scan, and everything seems to be working, but for some reason I can't get the estimated position of the laser inside the map.   Any suggestion on what is causing the problem? I believe it must be something with the TF but the TF tree seems OK to me.

Thank you for your help

PS: Ubuntu 16.04; ROS kinetic

edit retag flag offensive close merge delete

Comments

Could it have to do with simulated time vs wall-clock time? Are you running with live data or from a bag file?

The Martin gravatar image The Martin  ( 2018-09-13 08:07:48 -0600 )edit

I am using live data.

I don't think the problem is the time. I am building a map with hector_slam using use_sim_time=false and while running the AMCL I don't set the parameter.

PedroFilipe gravatar image PedroFilipe  ( 2018-09-17 09:57:25 -0600 )edit

I am facing the same problem. I am using RPLidar and have my .yaml map. Did you fix the problem? Could you publish the launch files?

Miguel_Arriscado gravatar image Miguel_Arriscado  ( 2020-02-24 05:46:14 -0600 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-02-26 04:16:07 -0600

Procópio gravatar image

I've seen this error even when there was nothing wrong with the laser message. I'd suspect on your tf tree. Check it with the rosrun tf view_frames

this line is wrong, it will conflict with the tf broadcast amcl will do, so just remove it: rosrun tf static_transform_publisher 0 0 0 0 0 0 map base_link 100

how are you providing the odometry to amcl?

edit flag offensive delete link more

Comments

This solved the issue "no laser scans received" for me, I forgot to publish the odom->base_link transformation

CaptnLarson gravatar image CaptnLarson  ( 2021-03-04 08:32:16 -0600 )edit

Hi @CaptnLarson, please let me know how are you publishing odom->base_link transformation...

androadi gravatar image androadi  ( 2022-02-14 23:59:01 -0600 )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

Stats

Asked: 2018-09-13 02:47:14 -0600

Seen: 664 times

Last updated: Feb 26 '20