Simulated camra -> do I need to rectify its image?

asked 2018-05-17 08:12:43 -0500

markus gravatar image

Hey there,

I wonder if I need to rectify an image of a simulated camera (actually I need the images to be rectified)

I currently use this code to simulate a realsense camer a R200: <sensor type="camera" name="${name}_rgb"> <always_on>1</always_on> <update_rate>$(arg camera_fps)</update_rate> <camera> <horizontal_fov>${70.0 * pi/180.0}</horizontal_fov> <image> <format>B8G8R8</format> <width>$(arg camera_width)</width> <height>$(arg camera_height)</height> </image> <clip> <near>0.001</near> <far>100</far> </clip>

      <!-- disortion tag does not work in indigo -> go for kinetic! TODO
      <distortion>
        <k1>0.0</k1>
        <k2>0.0</k2>
        <k3>0.0</k3>
        <p1>-0.0</p1>
        <p2>-0.00</p2>
        <center>0.5 0.5</center>
      </distortion> -->
    </camera>
    <plugin name="${name}_camera_depth_controller" filename="libgazebo_ros_camera.so">
      <robotNamespace>$(arg robot_name)/sensor/${name}/rgb</robotNamespace>
      <imageTopicName>image_raw</imageTopicName>
      <cameraInfoTopicName>camera_info</cameraInfoTopicName>
      <frameName>${name}_rgb_optical_frame</frameName>
    </plugin>
  </sensor>

However I just get these topics:

/my_camera/sensor/camera/rgb/camera_info
/my_camera/sensor/camera/rgb/image_raw
/my_camera/sensor/camera/rgb/image_raw/compressed
/my_camera/sensor/camera/rgb/image_raw/compressed/parameter_descriptions
/my_camera/sensor/camera/rgb/image_raw/compressed/parameter_updates
/my_camera/sensor/camera/rgb/image_raw/compressedDepth
/my_camera/sensor/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/my_camera/sensor/camera/rgb/image_raw/compressedDepth/parameter_updates
/my_camera/sensor/camera/rgb/image_raw/theora
/my_camera/sensor/camera/rgb/image_raw/theora/parameter_descriptions
/my_camera/sensor/camera/rgb/image_raw/theora/parameter_updates

So no rectified image....

How can I also simulate a camera and get its rectified image?

edit retag flag offensive close merge delete

Comments

Excuse my ignorance, but out of curiosity, what do you mean by a rectified image?

josephcoombe gravatar imagejosephcoombe ( 2018-05-17 08:49:42 -0500 )edit

It is one that compensates for lens distortion based off of the calibration file correct?

cmfuhrman gravatar imagecmfuhrman ( 2018-05-18 10:14:14 -0500 )edit
1

Yes correct check here: http://wiki.ros.org/image_proc

markus gravatar imagemarkus ( 2018-05-24 14:17:56 -0500 )edit