Time stamp error in Gazebo simulated kinect

asked 2013-07-12 06:41:51 -0500

agonzamart gravatar image

updated 2013-07-12 12:57:16 -0500

I have a Gazebo-Ros simulation where I use a range laser to get scans which is working properly and I am able to use the autonomous navigation on a simulated environment. Now I wanted to use a kinect as a sensor to get scans using the depthimage to laserscan node to substitute the range laser. After simulating this kinect, including all the different config files, nodes... I am able to read the scans after the cloudthrottle, so I think I have much of it correctly configured, but I am having problems with the tf's tranformations for this simulated kinect, when I try to read the topic inside rviz I get an error that the message is to old. I am able to se the image for this camera in rviz ( I really don't know why I do not get the same error in rviz with this topic because it's time stamp is not correct either) If I do a rostopich echo of the /scan topic created from this depth image I see that the time stamp is different from the other topics such as the /map topic which, as normally, I use as static frame. All the rostopic echo I do from the topics of the camera simulated in Gazebo have a different time stamp than the rest.

For the /scan created from this kinect I have a static transformation, after remapping the output frame topic of depth imagetolaserscan to /camera_depth

< node pkg="tf" type="statictransformpublisher" name "depthcamtf" args="0 -0.02 0 0 0 0 /baselink /cameradepth >

The viewframes tree seems correct, using tfmonitor everything looks is being publish with the proper freq. So the problem must be this difference in the time stamp.

Anyone can help me with this issue?

Gazebo is not publishing in the /clock topic. I have /usesimtime set to "true". Is there anything else needed to publish Gazebo's clock?

Thank u!

edit retag flag offensive close merge delete

Comments

not sure if this helps, but ~/world_stats message contains the simulation time, real time, and other useful information

Peter Mitrano gravatar imagePeter Mitrano ( 2016-04-07 02:11:28 -0500 )edit

Thank you so much for the answer. I eventually was able to get that working about three years ago ;)

agonzamart gravatar imageagonzamart ( 2016-04-07 16:39:20 -0500 )edit

hahaha whoops. I was just scrolling through unanswered questions...

Peter Mitrano gravatar imagePeter Mitrano ( 2016-04-11 00:15:59 -0500 )edit

hey ! I'm facing the same issue right now. TF links broadcasted by Gazebo are stamped with the starting date, and not updated. Therefore they are like 80 secs old in my tf tree, after I wait 80 secs after having started the simulation. How did you manage to solve this issue ? thanks a lot for you help !

GuillaumeHauss gravatar imageGuillaumeHauss ( 2017-10-23 03:17:12 -0500 )edit