webots: Wrong time stamp for ros topic
I’m using webots 2020b now which I installed by .deb package. And I’m using ROS kinetic + Ubuntu 16.04. When I echo the topics published by webots node, I noticed that the time stamps are abnormal.
For example, I launched one of the tutorial projects by:
roslaunch webots_ros pioneer3at.launch
When the simulation finished starting up, I echo header of gps topic, and I got:

Then I echo another topic’s header, I got:

Another one:

Another one:

It seems that the time stamps ware frozen at some random value. It’s critical for me because in my project I need time stamp for tf lookup.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (11 by maintainers)
Ok then the problem is certainly at the ros controller level in Webots. We will try to fix this soon.
Or another alternative: 3. Wait that we finalize the fix (should be ready in maximum a few days: https://github.com/cyberbotics/webots/pull/2127) and then use a nightly build of R2020b-rev1.
I tried webots 2020b (still installed from .deb) today on a newly installed Ubuntu 18.04 with ROS melodic. The problem still exists. So I have two choice:
Even when creating the package locally and installing it, it works fine. It only fails when the package is created on travis and then installed on another machine. One explanation could be the fact that the ros headers changed and we are using old headers in our dependencies.
This is unfortunately not reproducible in the development environment.
I can finally reproduce it with this procedure:
WEBOTS_HOMEto point to the extracted tarball folder.ros-kinetic-webots-rospackage.roslaunch webots_ros pioneer3at.launch.rostopic echo /pioneer3at/gps/values/headerrostopic echo /pioneer3at/accelerometer/value/headerI am using ROS Noetic and tried using webots_ros both source compiled and the pre-compiled package to no avail.
Although In 2.1.0-1 the world files are 2020b style and some protos are not supported by 2020a. The topic’s time stamp works fine.