Visual Odometry Starts in odom Frame vs base_link Frame

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

Visual Odometry Starts in odom Frame vs base_link Frame

rodrigo55
Hi,

I've implemented RGBD VO from RTABMAP on my robot simulation, and I've noticed that the odometry messages start right on the odom frame (vo_frame_id parameter). For some reason yet to discover (I think due to the gazebo simulation) my base_link frame drifts a little with respect to the odom frame, so when I start the simulation, the visual odometry (red arrow) has a little offset in respect to the real wheel odometry (green arrow) coming from the simulation:





In this case, my wheel odometry starts right on the base_link frame, which makes more sense to me. I know that at the beginning odom and base link should be the same and this would eliminate this drift, but when I specify the vo_frame_id parameter to base_link, the visual odometry comes out as double what it should be.



My question is, shouldn't the odometry start off the base_link frame and have no doubling issues in case the odom and base link frames don't start out in the same place?

Thank you,

Rodrigo Gonzalez
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry Starts in odom Frame vs base_link Frame

matlabbe
Administrator
Hi Rodrigo,

Look at the model in Gazebo, the physics could make the robot move without the wheels rotating. The wheel odometry will tell zero movement, but vo could "see" that the robot is drifting.

For the double scale, it is maybe just a calibration problem. You could try to show the point cloud of the camera to see if everything is double the real scale.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry Starts in odom Frame vs base_link Frame

rodrigo55
Thank you for your answer, I will look into the gazebo model that is causing that drift without wheel movement.

For the double scale, however, I don't think it's a point cloud issue, since the VO works well when specifying the vo_frame_id = odom frame. However, I don't want this, because I want the odometry to show on the base_link in case the odom frame and the base_link frame don't start in the same spot. When I switch the vo_frame_id = base_link, that's where the doubling occurs.
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry Starts in odom Frame vs base_link Frame

matlabbe
Administrator

vo_frame_id should not be base_link but odom or odom_vo, frame_id should be base_link. If you want to use wheel odometry as guess for visual odometry, set guess_frame_id to "odom" (the frame is by wheel odometry), vo_frame_id to "odom_vo" and frame_id to "base_link".