amcl warning....No laser scan received
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.
Is there actually data on the
/scan
topic? Do you see anything withrostopic echo /scan
? Does hokuyo_node produce any errors?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
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
Can you run
rosrun tf view_frames
, and post the resulting pdf somewhere we can take a look at?In the terminal I got:
And the resulting pdf just says: no tf data recieved
Can you post the output of
rostopic info /tf
so we can see what (if anything) is publishing tf?I got this:
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