Visual Odometry error in rotation

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

Visual Odometry error in rotation

Ashu
Hi

I am performing Experiments on Visual Odometry using rtabmap_ros package but I am not getting correct values as expected while experiment.
Firstly when i rotate the robot in place, I am getting certain values along x and y direction.
Ex : pose:
    position:
      x: -0.0511606894433
      y: 0.0540189929307
      z: 0.0
    orientation:
      x: 0.0
      y: 0.0
      z: -0.702741882159
      w: 0.711445441593

As since i have performed in place rotation, I should get any values in x and y direction . Please can you help me what is going wrong. Here is my simple launch file visual_odometry_rtabmap.launch
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry error in rotation

matlabbe
Administrator
This post was updated on .
Hi,

what is your sensor? Be aware that on some cameras, the camera frame is not always at the center of the camera. Make sure TF is correctly set between the optical frame and the base of the camera.

See this post for more information about this problem: http://official-rtab-map-forum.206.s1.nabble.com/rtabmap-holonomic-rotational-odometry-accuracy-issue-td1052.html

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

Re: Visual Odometry error in rotation

Ashu
Thanks you very much you solution work for me
Yes the problem was in my tf .So I corrected my /base_liink to /camera_link tf . And I got my Odometery.

Now I have another doubt, I was performing Square shape to check my Odometery , But I didn't get the accepted output , Output was improper square .
I looked into the visual Odometery So at the time of in place rotation I was getting an warning : Quaternion not properly Normalised and some nan values in Odometery.

Please can you suggest me when would it get this warning and Why?
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry error in rotation

matlabbe
Administrator
Do you have a screenshot of the trajectory and output warnings?
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry error in rotation

Ashu
Yes , I have.
This is the trajectory image  And this is the data file of it square_2m_odom.log.
Reply | Threaded
Open this post in threaded view
|

Re: Visual Odometry error in rotation

matlabbe
Administrator
Hi,

[ WARN] [1493620713.420176292]: MSG to TF: Quaternion Not Properly Normalized
0	0	-nan
Do you convert odometry message to TF? If so, it seems that odometry sent null transform because it is lost. You can show odometry message on terminal at the same time to see if it is actually the case:
$ rostopic echo /rtabmap/odom

Your node subscribing to odometry should handle this situation. rgbd_odometry sends null transforms to notify it is lost. You could also set "publish_null_when_lost" (for rgbd_odometry node) to false so that rgbd_odometry doesn't send these messages, however you won't know that visual odometry cannot be computed.

cheers,
Mathieu