ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

AMCL and Kinect problem

asked 2013-04-22 23:45:34 -0600

da-na gravatar image

updated 2016-10-24 09:02:39 -0600

ngrennan gravatar image

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

edit retag flag offensive close merge delete

Comments

Is AMCL listening on /narrow_scan? I believe by default it will listen on /scan.

Hansg91 gravatar image Hansg91  ( 2013-04-23 00:13:19 -0600 )edit

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

da-na gravatar image da-na  ( 2013-04-23 00:39:14 -0600 )edit
1

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.

Pi Robot gravatar image Pi Robot  ( 2013-04-23 02:55:38 -0600 )edit

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

da-na gravatar image da-na  ( 2013-04-23 07:34:04 -0600 )edit

!!!! 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!

da-na gravatar image da-na  ( 2013-04-24 02:04:47 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2013-04-23 07:31:04 -0600

agonzamart gravatar image

I am experiencing kind of the same problem. Sometimes my tf transformation /odom published from amcl does not exist. And I say sometimes because this is what is mostly frustrating me that sometimes it works properly and I get the transformation and others don't. This dynamic transformation should be done automatically by the amcl so I do not know what it could be happening or how to fix it. I remap also the topic from scan to kinect_narrow_scan and I do not recive any message in rviz although I see the info when I read it with a rostopic echo /kinect_narrow_scan exactly the same way as you.

When it is working properly and I run a rosrun tf tf_monitor I see the following:

(other frames) Frame: /odom published by /amcl Average Delay: 0.0081728 Max Delay: 0.0597752

But sometimes I don't have this transformation published and rviz has the message that no tf transform exists between /map and /odom. I have been with this for about a month and I am not able to find any solution. ¿How does acml set the transformation between /map and /odom? ¿any ideas?

Thank you all!

edit flag offensive delete link more

Comments

If you're working on few computers, remember to run in every terminal 'export ROS_MASTER_URI=http://10.0.0.10:11311' and 'export ROS_IP=10.0.0.8' - maybe sometimes you forget about it, and that might be your problem?

da-na gravatar image da-na  ( 2013-04-23 07:46:01 -0600 )edit

Thank you for the answer, but that can't be the problem because I have the variables sourced in the .bashrc from both computers.

agonzamart gravatar image agonzamart  ( 2013-04-23 13:48:20 -0600 )edit

I think I have been able to solve the problem. I am launching different types of configurations for my robot to navigate autonomously, perhaps some parameters in the param server got mixed around, from other tests I perform and that's why sometimes I had the error and others don't. Now I basically check out that I am launching a new roscore in a window of my robot PC's every time I want to run a new check. Secondly I had a problem with the declaration of my tf's I was missing a tf transformation in the test from the kinect a transformation between /base_footprint and /base_link <node pkg="tf" type="static_transform_publisher" name="higgs_kinect3" args="0.0 0.0 0.0 0 0 0 1 /base_footprint /base_link 100" /> Now I have it working perfectly.

agonzamart gravatar image agonzamart  ( 2013-04-25 05:46:21 -0600 )edit

so we had a similar problem :) great you could solve your problem

da-na gravatar image da-na  ( 2013-04-26 03:34:28 -0600 )edit
0

answered 2013-04-23 03:24:42 -0600

prasanna.kumar gravatar image

Run rosrun nodelet nodelet manager __name:=openni_manager on a shell. This should do. I had the same problem but in gazebo, here.

edit flag offensive delete link more

Comments

I have it in a launch file, but it doesn't help..

da-na gravatar image da-na  ( 2013-04-23 07:42:48 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-22 23:45:34 -0600

Seen: 1,746 times

Last updated: Apr 24 '13