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

Revision history [back]

click to hide/show revision 1
initial version

I haven't looked at it in awhile, so someone correct me if I'm wrong or fill in missing details. As far as I know, you can't directly put that YAML file into ORB_SLAM2. The GitHub repo provides documentation and some example configuration files, where the camera section looks like this:

#--------------------------------------------------------------------------------------------
# Camera Parameters. Adjust them!
#--------------------------------------------------------------------------------------------

# Camera calibration and distortion parameters (OpenCV) 
Camera.fx: 517.306408
Camera.fy: 516.469215
Camera.cx: 318.643040
Camera.cy: 255.313989

Camera.k1: 0.262383
Camera.k2: -0.953104
Camera.p1: -0.005358
Camera.p2: 0.002628
Camera.k3: 1.163314

# Camera frames per second 
Camera.fps: 30.0

# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 1

To help translate between this format and the one you already have, you can use the sensor_msgs/CameraInfo documentation as a cheat sheet. The first 4 parameters are in your camera_matrix, which is formatted as K = [fx 0 cx 0 fy cy 0 0 1]. The next 5 are your distortion_coefficients, which is formatted as D = [k1 k2 p1 p2 k3].