Hello,
I'm currently learning to work with ros and use it to build a mapping tool. I'm trying to get the current pose out of the RTABMAP algoritme, with only RGBD data.
I've mapped the room where I want to localize myself. And made a picture with a ground floor of the area. On the ground floor there is a red dot showing the location of the "camera"/"person" and an arrow with the view direction (yaw). This all works while building a map, until i start the localization.
I suppose that i'm not currently on a known position on the map, so i press reset odomotry from the menu. Then it takes the program some time to match the map with my current view, but it works perfectly. Yet the location of the person is all wrong.
Topic I'm using for the data : /rtabmap/odom
I guess the problem lies with me not using the topics as i should, because i get data in a different scale.
Output of topic before localization and reset odom:
POSITION FROM TOPIC x: 0.012990 y: -0.394857
POSITION FROM TOPIC x: 0.014069 y: -0.384452
POSITION FROM TOPIC x: 0.011949 y: -0.382053
POSITION FROM TOPIC x: 0.012687 y: -0.372685
POSITION FROM TOPIC x: 0.013236 y: -0.370237
POSITION FROM TOPIC x: 0.011633 y: -0.360908
POSITION FROM TOPIC x: 0.004766 y: -0.361776
Output after reset and localization in map:
POSITION FROM TOPIC x: 0.000000 y: 0.000000
POSITION FROM TOPIC x: -0.000545 y: -0.001833
POSITION FROM TOPIC x: -0.003815 y: 0.006487
As i noticed the position X and Y are 10 times smaller, so when i use the scale factor ( devide by 0.005) i always get a zero, while before the reset i got the result i wished for.
EDIT
Output of rosrun tf tf_echo /map /base_link
Failure at 1461013681.102334178
Exception thrown:"base_link" passed to lookupTransform argument source_frame does not exist.
The current list of frames is:
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 odom.
Frame odom exists with parent map.
Frame camera_rgb_frame exists with parent camera_link.
Frame camera_rgb_optical_frame exists with parent camera_rgb_frame.
Output of $ rosrun tf tf_echo /map /camera_link
Failure at 1461013479.628889493
Exception thrown:Lookup would require extrapolation into the past. Requested time 1459949359.363947774 but the earliest data is at time 1460911947.649899845, when looking up transform from frame [camera_link] to frame [map]
The current list of frames is:
Frame camera_depth_frame exists with parent camera_link.
Frame camera_link exists with parent odom.
Frame camera_rgb_frame exists with parent camera_link.
Frame camera_depth_optical_frame exists with parent camera_depth_frame.
Frame camera_rgb_optical_frame exists with parent camera_rgb_frame.
Frame odom exists with parent map.
Output of $ rosrun tf tf_echo /odom /camera_link
At time 1459949360.228
- Translation: [0.119, -0.752, 0.062]
- Rotation: in Quaternion [0.042, -0.056, -0.297, 0.952]
in RPY (radian) [0.113, -0.083, -0.610]
in RPY (degree) [6.500, -4.736, -34.952]
Output of rosrun tf tf_echo /map /odom
At time 1460911972.251
- Translation: [0.000, -0.000, 0.000]
- Rotation: in Quaternion [-0.000, 0.000, 0.000, 1.000]
in RPY (radian) [-0.000, 0.000, 0.000]
in RPY (degree) [-0.000, 0.000, 0.000]
At time 1460911973.249
- Translation: [-0.000, -0.000, 0.000]
- Rotation: in Quaternion [-0.000, 0.000, 0.000, 1.000]
in RPY (radian) [-0.000, 0.000, 0.000]
in RPY (degree) [-0.000, 0.000, 0.000]
Like you can see the camera_link form /odom gives a good position with a 3 digit value. The /odom from the /map gives me a value smaller then 3 digits, hence the -0.000 and 0.000 (i didn't add the minus sign)
Originally posted by anonymous24903 on ROS Answers with karma: 20 on 2016-04-17
Post score: 0