Get velocity in map frame

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Get velocity in map frame

olofmat
Hi,

I would like to extract the twist information given on the "/rtabmap/odom "topic in the "map" frame. But I see that it is published in the "odom" frame and I'm not sure of how to go from one to the other. Is that possible and how would I do it in that case?

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: Get velocity in map frame

matlabbe
Administrator

Apply the rotation matrix of TF map->odom to twist? I think this could work: R x [vx, vy, vz]'
Reply | Threaded
Open this post in threaded view
|

Re: Get velocity in map frame

olofmat
Hi,

after a while we managed to solve it! The issue was not how we were making the transformation but the frames. It seems as if the twist message in /rtabmap/odom is actually in the "camera_link" frame and not the "odom" frame. When making the transformation between "camera_link" and "map" instead the result is great!

Olof
Reply | Threaded
Open this post in threaded view
|

Re: Get velocity in map frame

matlabbe
Administrator
For odometry topic:
# The pose in this message should be specified in the coordinate frame given by header.frame_id.
# The twist in this message should be specified in the coordinate frame given by the child_frame_id