Gazebo | Ignition | Community
Ask Your Question
0

How to set tag arguments of stereo camera plugin (libgazebo_ros_multicamera.so)?

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

luxiaojun gravatar image

I have some questions about how to use "libgazebo_ros_multicamera.so" 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
0

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

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:
http://docs.ros.org/api/gazebo_plugins/html/gazebo__ros__multicamera_8cpp_source.html
But the actual reading of the sdf tags happens here: http://docs.ros.org/fuerte/api/gazebo_plugins/html/gazebo__ros__camera__utils_8cpp_source.html

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

Comments

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 -0600 )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 -0600 )edit

hackbaseline is the length of baseline, its an important parameter for stereo camera. see http://docs.ros.org/melodic/api/senso...

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

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

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

Stats

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

Seen: 2,358 times

Last updated: May 14 '18