Gazebo | Ignition | Community
Ask Your Question

Defining a Stereo Camera in URDF for usage in Gazebo Simulations

asked 2016-08-18 18:11:26 -0600

atomoclast gravatar image

Hello all,

I have been struggling for the past few days to get a Gazebo simulation put together, and the hardest part has proven to be getting sensor data integrated in the simulation. I am trying to write a chunk of code that will represent a stereo camera, which seems to launch with no errors, but I'm not seeing any sensor related topics listed below. Can anyone help me sort out the issue?

Thanks in advance!

The relevant section from my URDF is as follows:

    xyz="-0.015875 1.2526E-17 1.4088E-05"
    rpy="0 0 0" />
    value="0.16007" />
    izz="0.00039512" />
    xyz="0 0 0"
    rpy="0 0 0" />
      filename="package://dante_eeTest/meshes/ZedCamera.STL" />
      rgba="0.50196 0.50196 0.50196 1" />
    xyz="0 0 0"
    rpy="0 0 0" />
      filename="package://dante_eeTest/meshes/ZedCamera.STL" />
<map name="sensor" flag="gazebo">
  <verbatim key="zed_camera">
    <controller:ros_stereo_camera name="$zed_gz_controller" plugin="">
      <focal_length>1.4</focal_length> <!-- image_width / (2*tan(hfov_radian /2)) -->
      <baseline>.12</baseline> <!-- home pos. of robot has +x forward, +y left -->
      <interface:stereocamera name="zed_iface" />


edit retag flag offensive close merge delete



I have used stereo cam once but i was not using zed stereo camera. I used camera from gazebo and a ros node (stereo_image_proc) to combine the two cameras :

Brosseau.F gravatar imageBrosseau.F ( 2016-08-19 01:24:56 -0600 )edit

hi is it possible to to tell me where to get the code for the controller for the stereo camera

Rajnunes gravatar imageRajnunes ( 2017-05-12 04:31:28 -0600 )edit

Hi, did you find solution for this ? Please let me know.

Sanjana gravatar imageSanjana ( 2020-07-10 10:11:14 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-17 10:24:49 -0600

yah130s gravatar image

updated 2017-05-17 10:26:06 -0600

You're defining physical parameters, but you also need to write plugin to "mock" your own sensor output values, or use existing plugins as @Brosseau.F said in the comment.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-08-18 18:11:26 -0600

Seen: 6,542 times

Last updated: May 17 '17