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

Kinect sensor unable to see objects placed in front of it

asked 2018-05-01 15:12:54 -0500

Hey everyone!

I am Aaditya Saraiya and to start of my GSoC 2018 project, I wish to simulate a Kinect sensor in Gazebo. I followed the Gazebo tutorial to simulate a Kinect sensor which uses the OpenNI driver. I am running ROS Kinetic on Ubuntu 16.04, Gazebo version 7 and RViz version 1.12.15 (kinetic).

Initially, rostopic list was not showing the depth and image topics.This post helped me to solve that issue. However, even though the point cloud data is being posted, the sphere placed in front of the Kinect is not visible in RViz, which can be observed in the image. I tried moving the Kinect near and farther away from the objects considering the fact that Kinect has a minimum and maximum depth of visibility.

image description

Some peculiar things which I noted was that on using rostopic echo on the /tf topic, there is warning message which is as follows:

WARNING: no messages received and simulated time is active. Is /clock being published?

However, infact, the /clock is being published (automatically by Gazebo I think).

Secondly, Fixed frame window under the Global status in Rviz has the following warning.

No tf data. Actual error: Fixed Frame [camera_link] does not exist.

I have added the camera plugin as well which has been taken from the Gazebo tutorial.

 <plugin name="camera_plugin" filename="libgazebo_ros_openni_kinect.so">
  <baseline>0.2</baseline>
  <alwaysOn>true</alwaysOn>
  <!-- Keep this zero, update_rate in the parent <sensor> tag
    will control the frame rate. -->
  <updateRate>0.0</updateRate>
  <cameraName>camera_ir</cameraName>
  <imageTopicName>/camera/depth/image_raw</imageTopicName>
  <cameraInfoTopicName>/camera/depth/camera_info</cameraInfoTopicName>
  <depthImageTopicName>/camera/depth/image_raw</depthImageTopicName>
  <depthImageInfoTopicName>/camera/depth/camera_info</depthImageInfoTopicName>
  <pointCloudTopicName>/camera/depth/points</pointCloudTopicName>
  <frameName>camera_link</frameName>
  <pointCloudCutoff>0.05</pointCloudCutoff>
  <distortionK1>0</distortionK1>
  <distortionK2>0</distortionK2>
  <distortionK3>0</distortionK3>
  <distortionT1>0</distortionT1>
  <distortionT2>0</distortionT2>
  <CxPrime>0</CxPrime>
  <Cx>0</Cx>
  <Cy>0</Cy>
  <focalLength>0</focalLength>
  <hackBaseline>0</hackBaseline>
</plugin>

Is there some issue behind tf not being published properly?

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-05-01 16:39:26 -0500

updated 2018-05-01 17:19:50 -0500

In the left frame, it looks as if the sphere & cube are behind the Kinect, not in front of it.


Make sure you've added an optical frame to get a properly transformed depth cloud in RViz (see: https://answers.ros.org/question/2325... )

edit flag offensive delete link more

Comments

Thank you so much! It was a silly error on my part. Will look into the optical frame part as well.

aaditya_saraiya gravatar image aaditya_saraiya  ( 2018-05-01 17:18:06 -0500 )edit

No problem. Good luck with your project!

josephcoombe gravatar image josephcoombe  ( 2018-05-01 17:19:13 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-05-01 15:12:54 -0500

Seen: 688 times

Last updated: May 01 '18