Home | Tutorials | Wiki | Issues
Ask Your Question
0

Problem: Depth camera plugin does not show any coloured images.

asked 2013-03-07 08:37:20 -0500

Morloth gravatar image

Hi everybody,

I'm currently trying to attach a camera to a robot. While that works fine, it seems that I can only see the depth images it produces and not the RGB images it should (I think?) also produce. Below is the SDF code I use to define the sensor:

<sensor name="downward_cam_camera_sensor" type="depth">
  <pose>0 0 0 0 1.57079632679 0</pose>
  <update_rate>20</update_rate>
  <always_on>true</always_on>
  <camera>
    <horizontal_fov>1.745</horizontal_fov>
    <image>
      <width>640</width>
      <height>480</height>
      <format>R8G8B8</format>
    </image>
    <clip>
      <near>0.01</near>
      <far>100</far>
    </clip>
  </camera>

  <plugin name="downward_cam_camera_controller" filename="libgazebo_ros_depth_camera.so">
    <cameraName>downward_cam</cameraName>
    <alwaysOn>true</alwaysOn>
    <updateRate>20</updateRate>
    <imageTopicName>camera/image</imageTopicName>
    <depthImageTopicName>camera/depth_image</depthImageTopicName>
    <cameraInfoTopicName>camera/camera_info</cameraInfoTopicName>
    <depthCameraInfoTopicName>camera/depth_camera_info</depthCameraInfoTopicName>
    <depthImageCameraInfoTopicName>camera/depth_image_camera_info</deptImageCameraInfoTopicName>
    <frameName>downward_cam_optical_frame</frameName>
    <interface:camera name="downward_cam_camera_iface"/>
  </plugin>
</sensor>

When I check out the depth image with the command:

rosrun image_view image_view image:=/downward_cam/camera/depth_image

then I see a grey scale image which is fine. But when I check the other topic:

rosrun image_view image_view image:=/downward_cam/camera/image

Nothing appears. I checked if that topic exists, which is the case. But when I check if any messages are coming though:

rostopic echo /downward_cam/camera/image

no messages appear...

Does anybody have an idea how I can extract coloured images from the camera? Am I using the wrong plugin, are my parameters wrong?

Any help is appreciated, thanks!

Bram

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-07 20:46:47 -0500

nkoenig gravatar image
edit flag offensive delete link more

Comments

The problem seems to be the class imagetransport::ImageTransport. In simulatorgazebo/gazeboplugin/gazeboroscamerautils.cpp we advertise the image service with:

this->imagepub = this->itnode->advertise( this->imagetopicname,1, boost::bind( &GazeboRosCameraUtils::ImageConnect,this), boost::bind( &GazeboRosCameraUtils::ImageDisconnect,this), ros::VoidPtr(), &this->cameraqueue);

However, the ImageConnect and ImageDisconnect are never called. So the variable image_co

Morloth gravatar imageMorloth ( 2013-03-08 08:08:50 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-03-07 08:37:20 -0500

Seen: 1,169 times

Last updated: Mar 07 '13