AMCL and Kinect problem
Hello! I'm trying to use
roslaunch turtlebot_bringup kinect.launch
and then tb_amcl.launch ( it fires map server, move_base and amcl_turtlebot.launch ). I have a problem that AMCL does not produce the transform from /base_link to /map
Waiting on transform from /base_link to /map to become available before running costmap, tf error:
I've seen this problem few times on answers.ros.org, but none of the results helped me. In rxconsole I noticed another problem, namely
Node: /amcl
Time: 1366709506.039584814
Severity: Warn
Location: /tmp/buildd/ros-fuerte-navigation-1.8.3/debian/ros-fuerte-navigation/opt/ros/fuerte/stacks/navigation/amcl/src/amcl_node.cpp:checkLaserReceived:540
Published Topics: /rosout, /tf, /amcl_pose, /particlecloud, /amcl/parameter_descriptions, /amcl/parameter_updates
No laser scan received (and thus no pose updates have been published) for 1366709506.039474 seconds. Verify that data is being published on the /narrow_scan topic.
But when I run rostopic echo /narrow_scan this is what I get:
header:
seq: 1716
stamp:
secs: 1366709470
nsecs: 793361122
frame_id: /camera_depth_frame
angle_min: -1.57079637051
angle_max: 1.57079637051
angle_increment: 0.00872664619237
time_increment: 0.0
scan_time: 0.0333333350718
range_min: 0.449999988079
range_max: 10.0
ranges: [11.0, (lots of numbers here...), 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0, 11.0]
intensities: []
---
What can be wrong here? Is it the time stamp? Or maybe it's because /camera_depth_frame is not connected to /base_link ? But if that's the problem, how can I connect those frames? (I'm newbie when it comes to frames). Highly appreciate your help,
EDIT: It turned out, that I didn't publish any transformations between the robot and Kinect. To check if not publishing tf's is THE problem, I did:
In RVIZ set Fixed Frame to /odom, then in terminal I run:
rosrun tf static_transform_publisher 0 0 0 0 0 0 /base_link /camera_depth_frame 100
And now I'm able to move my robot around with amcl :) (But I'm going to publish transformations in a more elegant way, using URDF model).
Thanks all for help!
da-na
Is AMCL listening on /narrow_scan? I believe by default it will listen on /scan.
Yes, it is, I'm sure. There's a line <arg name="scan_topic" default="narrow_scan" /> in launch file, specyfing that amcl listens to /narrow_scan
Could it be that /camera_depth_frame is not part of your robot's URDF model? Have a look at the TurtleBot model in /opt/ros/fuerte/stacks/turtlebot/turtlebot_description/urdf.
when I looked into turtlebot_kinect.urdf.xacro, like you suggested, I can see <link name="camera_depth_frame"> there. It seems to be fine
!!!! Actualy I haven't used any urdf model <face palm>. To check if not publishing transforms is THE problem I used 'rosrun tf static_transform_publisher 0 0 0 0 0 0 /base_link /camera_depth_frame 10' and 'rosrun tf static_transform_publisher 0 0 0 0 0 0 /map /odom 100'. And now I can move my robot!