ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

gazebo_ros_openni_kinect doesn't publish depth camera_info.

asked 2023-07-10 01:41:58 -0500

I'm trying to use the depthimage_to_laserscan package that requires depth images and depth camera_info. To simulate a kinect in gazebo, I used gazebo_ros_openni_kinect plugin which works perfectly except with the depth camera_info publishing and maybe acquiring. However, the plugin does publish a camera_info but not a depth camera_info. Can I use the camera_info instead of the depth camera_info for the depthimage_to_laserscan?

<gazebo reference="kinect_ros">

<sensor name="kinect_ros_camera" type="depth"> <pose>0 0 0 0 0 0</pose> <update_rate>0</update_rate> <camera> <horizontal_fov>1.047198</horizontal_fov> <image> <width>640</width> <height>480</height> <format>R8G8B8</format> </image> <clip> <near>0.05</near> <far>3</far> </clip>

    <save enabled="false">
  <path>/tmp/camera_save_tutorial</path>
</save>

</camera>
<plugin name="kinect_ros_controller" filename="libgazebo_ros_openni_kinect.so">

<depth_camera_output>true</depth_camera_output>
  <baseline>0.2</baseline>
  <alwaysOn>1</alwaysOn>
  <updateRate>0</updateRate>
  <cameraName>kinect_ros_camera_ir</cameraName>
  <imageTopicName>/kinect_ros_camera/color/image_raw</imageTopicName>
  <!-- <cameraInfoTopicName>/kinect_ros_camera/depth/camera_info</cameraInfoTopicName> -->
  <cameraInfoTopicName>/kinect_ros_camera/color/camera_info</cameraInfoTopicName>

  <depthImageTopicName>/kinect_ros_camera/depth/image_raw</depthImageTopicName>
  <!-- <depthImageInfoTopicName>/kinect_ros_camera/depth/camera_info</depthImageInfoTopicName>NOT THIS ONE -->
  <depthImageCameraInfoTopicName>/kinect_ros_camera/depth/camera_info</depthImageCameraInfoTopicName>
  <!-- <pointCloudTopicName>/kinect_ros_camera/depth/points</pointCloudTopicName> -->
  <frameName>kinect_ros</frameName>
  <pointCloudCutoff>0.5</pointCloudCutoff>
  <pointCloudCutoffMax>3.0</pointCloudCutoffMax>
  <distortionK1>0.00000001</distortionK1>
  <distortionK2>0.00000001</distortionK2>
  <distortionK3>0.00000001</distortionK3>
  <distortionT1>0.00000001</distortionT1>
  <distortionT2>0.00000001</distortionT2>
  <CxPrime>0</CxPrime>
  <Cx>0</Cx>
  <Cy>0</Cy>
  <focalLength>0</focalLength>
  <hackBaseline>0</hackBaseline>
</plugin>
  <visualize>true</visualize>

</sensor> </gazebo>

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-15 03:47:29 -0500

It turns out that the depth/camera_info doesn't start publishing until something subscribes to color/camera_info which is weird. Also, the data of the massages inside the depth/camera_info and the color_camera_info are the same. Are they suppose to be the same?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-10 01:41:58 -0500

Seen: 37 times

Last updated: Jul 15 '23