Setting up cameras for visual odometry in gazebo

asked 2021-04-16 06:20:29 -0500

Alex_Lok gravatar image

I am trying to use the visual odometry for stereo from the rtabmap_ros package, but the tf odom during movement in rviz does not display correctly and jumps occur from time to time. I created the stereo camera as two separate monocular cameras in gazebo and pass their topics to the visual odom node.

My question is, do I need to preset the stereo pair consisting of two regular cameras created in gazebo, since the distance between the two cameras may be different when changing the robot model in urdf?

edit retag flag offensive close merge delete


I'm not sure I understand your question fully... But I'll take a stab and you can tell me if I've missed the mark.

Yes the baseline (distance between the two cameras) and their respective poses should be identical in both your simulation representation and your urdf representation. Ideally you would have a single urdf or xacro file that gets passed both to rviz/robot state publisher/whatever you're using, and Gazebo. That way, you change the value once and it matches.

shonigmann gravatar image shonigmann  ( 2021-04-16 12:02:19 -0500 )edit