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

RTAB-MAP camera pose

asked 2016-12-21 05:55:32 -0500

ap gravatar image

updated 2016-12-21 07:43:59 -0500

Hi

I am running RTAB-MAP according to the answer here as I don't have /tf topic in my bag. It seems to be working fine.

But I am having trouble getting the camera pose. I tried using File->Export poses RGBD-SLAM format, on RTABMAPVIZ. But I get this

1473175676,151992 0,000000 0,000000 0,000000 0,000000 0,707107 -0,707107 0,000000
1473175677,171096 -0,125588 -0,005437 -0,007817 0,014805 -0,706043 0,707805 -0,017195

Assuming this in time, x, y, z, qx, qy, qz, qr format, I don't seem to be getting the correct quaternion value. Shouldn't qr be close to 1 ?

Also tried rostopic echo -p /rtabmap/mapGraph/poses > poses.txt from here but I get this in terminal

WARNING: no messages received and simulated time is active.
Is /clock being published?

and this in txt file

%time,field0.position.x,field0.position.y,field0.position.z,field0.orientation.x,field0.orientation.y,field0.orientation.z,field0.orientation.w
1473175676706887069,0.0,0.0,0.0,0.0,0.0,0.0,1.0
1473175677270606420,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175678288004707,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175679327744141,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175680324714251,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175681351450610,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175682368804729,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175683376402483,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335
1473175684393268913,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.00543722277507,-0.125587925315,-0.00781658384949,0.00168941153349,-0.00124576914274,0.0226275103559,0.999741759335

for the same run. The quaternion value seems OK for the first timestamp. But the output has some extra values (looks like its missing a timestamp after 8 values) in the lines that follow.

Please let me know what I'm doing wrong here.

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-25 12:10:37 -0500

matlabbe gravatar image

When exporting in RGBD-SLAM format, a rotation is done so that poses are transformed in RGBD-SLAM world/ground truth coordinates (x-left, y-backward, z-up, instead of x-forward, y-left, z-up).

cheers

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-12-21 05:55:32 -0500

Seen: 874 times

Last updated: Apr 25 '18