Hector Slam with Kinect - Error could not transform laser scan into base frame
Forgive my naivety but i'm new to ROS so its all a bit strange to me. I followed the method provided in answers.ros.org/question/11363/how-to-generate-map-with-hector_slam-and-kinect/ and after fixing a few problems with deprecated stacks I was able to get the first launch file working. But the second launch file seems to raise the errors shown below.
When rivz is called no data changes on the map..
I can send a copy of the 2 launch files if it helps as I’m unable to paste them into this post
Has any one faced a similar or the same problem?
Any assistance would be much appreciated.
ERROR:-
c
[ERROR] [1353506787.385155113]: Trajectory Server: Transform from /map to /base_link failed: Frame id /base_link does not exist! Frames (11): Frame /camera_depth_frame exists with parent /camera_link.
Frame /camera_link exists with parent NO_PARENT.
Frame /camera_depth_optical_frame exists with parent /camera_depth_frame.
Frame /camera_rgb_optical_frame exists with parent /camera_rgb_frame.
Frame /camera_rgb_frame exists with parent /camera_link.
Frame /base_frame exists with parent /base_stabilized.
Frame /base_stabilized exists with parent /map.
Frame /openni_camera exists with parent /base_frame.
Frame /nav exists with parent /base_frame.
Frame /map exists with parent NO_PARENT.
[ERROR] [1353506787.634790194]: Trajectory Server: Transform from /map to /base_link failed: Frame id /base_link does not exist! Frames (11): Frame /camera_depth_frame exists with parent /camera_link.
Frame /camera_link exists with parent NO_PARENT.
Frame /camera_depth_optical_frame exists with parent /camera_depth_frame.
Frame /camera_rgb_optical_frame exists with parent /camera_rgb_frame.
Frame /camera_rgb_frame exists with parent /camera_link.
Frame /base_frame exists with parent /base_stabilized.
Frame /base_stabilized exists with parent /map.
Frame /openni_camera exists with parent /base_frame.
Frame /nav exists with parent /base_frame.
Frame /map exists with parent NO_PARENT.
Thanks!
Ben, I tried what you suggested and saw the following
$ rosrun tf view_frames
Listening to /tf for 5.000000 seconds
Done Listening
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
dot - graphviz version 2.26.3 (20100126.1600)
Detected dot version 2.26.3
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
frames.pdf generated
yes i am using fuerte.. and the pdf file has /map at the top followed by /base stablized, /base_frame then a split into /camera_link and /nav, the camera_link is connected to the Camera rgb and depth frame... Could it be that i have not included the right dependencies?
I looked at the set-up tutorial for hector slam and the launch files send the required parameters correctly..
Files can be found here:- dropbox.com/sh/7i5f3kcygtyud5q/2-w1HGYw6X.
Errors brought up when using Bens suggested code
[ INFO] [1353684416.257402857]: lookupTransform base_footprint to /openni_depth_frame timed out. Could not transform laser scan into base_frame.
[ERROR] [1353684416.339196772]: Trajectory Server: Transform from /map to /base_link failed: Frame id /map does not exist! Frames (8): Frame /camera_depth_optical_frame exists with parent /camera_depth_frame.
Frame /camera_depth_frame exists with parent /camera_link.
Frame /camera_link exists with parent NO_PARENT.
Frame /camera_rgb_frame exists with parent /camera_link.
Frame /camera_rgb_optical_frame exists with parent /camera_rgb_frame.
Frame /openni_camera ...
That looks like a bug in tf. Did it generate a frames.pdf file? And which ROS version are you using? Fuerte?
yes i am using fuerte.. and the pdf file has /map at the top followed by /base stablized, /base_frame then a split into /camera_link and /nav, the camera_link is connected to the Camera rgb and depth frame... Could it be that i have not included the right dependencies?
Sounds good. As long as everything is connected its fine. You may have to change the
base_frame
parameter of hector_mapping to base_stabilized to get it working quick and dirty. But you should really consider building a valid tf tree for your robot and adapting the nodes to that one. :)I might be wrong.. but i was hoping to use hector slam and manually turn the kinect around rather than have a base robot. ill change the base frame parameter and get back to you.. thanks
Ok, that should work if you make sure, that the only movements happen along the x- and y-axis and the only rotation is yaw (along the z-Axis). The fake-laser should always be parallel to the ground if you dont have an position sensor at hand.
Ya i was planning to keep a constant Z axis but i still have the error? and Rviz still generates nothing.. because of the TF errors. :(
Could you upload the generated frames.pdf and post your current launch-files? There has to be some error in the tf-configuration. You could also try to replace every apperance of ´base_stabilized´ with ´base_link`.
I don’t have enough karam to upload it :( I could email them if its not too much of a bother! An error im seeing says: Transform from /map to /base_link failed: Frame id /base_link does not exist! ill try what youv said above