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: wrong_time_stamp

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

Another one: wrong_time_stamp_2

Another one: wrong_time_stamp_3

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)

Most upvoted comments

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:

  1. Try compiling webots from code, and see if the issue still exist.
  2. Stay with 2020a temporarily until 2020b-rev1 comes out.

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:

  • Get Webots R2020b from the tarball and extract it.
  • Set WEBOTS_HOME to point to the extracted tarball folder.
  • Install the debian ros-kinetic-webots-ros package.
  • Start the launch file: roslaunch webots_ros pioneer3at.launch.
  • Echo two topic headers:
    • rostopic echo /pioneer3at/gps/values/header
    • rostopic echo /pioneer3at/accelerometer/value/header

@SherlockSheep ok, let us know if it works on R2020a for you too. P.S. @jhonasiv and @SherlockSheep which version of ROS are you using?

I 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.