Gazebo | Ignition | Community
Ask Your Question

How to set tag arguments of stereo camera plugin (

asked 2018-05-13 04:01:05 -0500

luxiaojun gravatar image

I have some questions about how to use "" plugin. 1. what does <hackbaseline> </hackbaseline> tag arguments mean ? 2. Some arguments are both set in <camera> and <plugin>, for example distortion arguments like <distortionk1> </distortionk1>, <...K2> <...K2>, ...<...T2> <...T2> in <plugin>, as I have already set <camera><distortion>...</distortion></camera>, will they conflicts? Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-05-14 07:21:53 -0500

Raskkii gravatar image

When you're not sure what the tags do, it's best you check out the plugin's source code.

In this case it's here:
But the actual reading of the sdf tags happens here:

1) From what I found, the hack_baseline is only used in one spot for the camera projection matrix. I'm not entirely sure what it's for.

2) The tags you listed in your question should not conflict with one another. The tags in the plugin tag apply to the plugin only and do not affect the camera itself in any way.

edit flag offensive delete link more


Raskkii: thank you for your reply. what do you mean "one spot for the camera projection matrix" ? Why a plugin needs <distortion> parameters? As I am new to this, thank you for your reply.

luxiaojun gravatar imageluxiaojun ( 2018-05-15 06:34:46 -0500 )edit

So the plugin calculates a camera projection matrix (i'm not sure what it is, i just read it from the source code) and one of the values within the matrix uses the hack_baseline value. From what I can see in the source code, it seems like the distortion parameters are used for camera info only so you might aswell leave those values to 0 or just remove them entirely.

Raskkii gravatar imageRaskkii ( 2018-05-15 07:14:24 -0500 )edit

hackbaseline is the length of baseline, its an important parameter for stereo camera. see

robinshaun gravatar imagerobinshaun ( 2020-03-12 22:56:57 -0500 )edit

answered 2021-05-13 20:51:45 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

<hackbaseline> </hackbaseline> is the distance between two cameras. Without the correct value, you will have problem in viewing the point cloud in Rviz.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-05-13 04:01:05 -0500

Seen: 2,250 times

Last updated: May 14 '18