Rosanswers logo

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">
  <!-- Keep this zero, update_rate in the parent <sensor> tag
    will control the frame rate. -->

Is there some issue behind tf not being published properly?

Thanks in advance!

Originally posted by aaditya_saraiya on ROS Answers with karma: 105 on 2018-05-01

Post score: 0


1 Answer 1


Rosanswers logo

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/232534/gazebo-camera-frame-is-inconsistent-with-rviz-opencv-convention/?answer=232562#post-id-232562)

Originally posted by josephcoombe with karma: 697 on 2018-05-01

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by aaditya_saraiya on 2018-05-01:
Thank you so much! It was a silly error on my part. Will look into the optical frame part as well.

Comment by josephcoombe on 2018-05-01:
No problem. Good luck with your project!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.