amcl warning....No laser scan received

asked 2015-03-05 11:10:12 -0600

Szajo gravatar image

Hi!

I'm trying to use amcl to localize my robot.

First I run rviz.

Then I published the map using map_server

Finally in a new terminal a run amcl_diff.launch

wilson@Wilson:~$ rosrun rviz rviz

wilson@Wilson:~$ rosrun map_server map_server ctai_2.yaml

wilson@Wilson:~$ roslaunch amcl amcl_diff.launch

Published topics are:

/amcl/parameter_descriptions
/amcl/parameter_updates
/amcl_pose
/clicked_point
/diagnostics
/hokuyo_node/parameter_descriptions
/hokuyo_node/parameter_updates
/initialpose
/map
/map_metadata
/map_updates
/move_base_simple/goal
/particlecloud
/rosout
/rosout_agg
/scan
/slam_cloud
/tf
/tf_static
/trajectory

But amcl node prints out this message continuously:

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

[ WARN] [1425574394.999585497]: MessageFilter [target=odom ]: Dropped 100.00% of 
messages so far. Please turn the [ros.amcl.message_notifier] rosconsole logger to DEBUG
for more information.

And rviz node prints out this:

[ WARN] [1425574334.540441439]: MessageFilter [target=map ]: Dropped 100,00% of
messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to 
DEBUG for more information.
edit retag flag offensive close merge delete

Comments

Is there actually data on the /scan topic? Do you see anything with rostopic echo /scan? Does hokuyo_node produce any errors?

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2015-03-05 21:23:27 -0600 )edit

When I run rostopic echo /scan I got this:

header: seq: 1304 stamp: secs: 1425647067 nsecs: 353644750 frame_id: laser angle_min: -1.5707963705 angle_max: 1.56466042995 angle_increment: 0.00613592332229 time_increment: 9.76562514552e-05 scan_time: 0.10000000149

and a ranges matrix

Szajo gravatar image Szajo  ( 2015-03-08 16:20:00 -0600 )edit

And when I run rviz in global status in Fixed Frame it says: No tf data. Actual error: Fixed Frame [map] does not exist; and in LaserScan: For frame [laser]: Fixed Frame [map] does not exist

Szajo gravatar image Szajo  ( 2015-03-09 13:12:26 -0600 )edit

Can you run rosrun tf view_frames, and post the resulting pdf somewhere we can take a look at?

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2015-03-10 17:17:36 -0600 )edit

In the terminal I got:

Listening to /tf for 5.000000 seconds
Done Listening
dot - graphviz version 2.26.3 (20100126.1600)
Detected dot version 2.26.3
frames.pdf generated

And the resulting pdf just says: no tf data recieved

Szajo gravatar image Szajo  ( 2015-03-10 17:51:16 -0600 )edit
1

Can you post the output of rostopic info /tf so we can see what (if anything) is publishing tf?

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2015-03-10 19:06:16 -0600 )edit

I got this:

Type: tf2_msgs/TFMessage

Publishers: 
* /amcl (http://Wilson:51896/)

Subscribers: 
* /rviz_1426033434346723223 (http://Wilson:51754/)
* /amcl (http://Wilson:51896/)
Szajo gravatar image Szajo  ( 2015-03-10 19:27:32 -0600 )edit

The laser needs to be in the tf tree for amcl to work. On most robots, this is done with URDF and robot_state_publisher. For testing at least, you could use a static_transform publisher. For example rosrun tf static_transform_publisher 0 0 0 0 0 0 world laser 10

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2015-03-10 19:55:07 -0600 )edit