-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gazebo_plugins] camera sensor timestamp is one update old #408
Comments
…e most recent image was acquired in the sim. Haven't tested because getting: unsupported pickle protocol: 4 log4cxx: Could not read configuration file [/home/lucasw/.ros/rosconsole.config]. log4cxx: Could not read configuration file [/home/lucasw/.ros/rosconsole.config]. [urdf_spawner-3] process has died [pid 30719, exit code 1, cmd /home/lucasw/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model -urdf -model rrbot -param robot_description __name:=urdf_spawner __log:=/home/lucasw/.ros/log/f00e5c50-ec35-11e5-98b1-00dbdf11ceac/urdf_spawner-3.log]. log file: /home/lucasw/.ros/log/f00e5c50-ec35-11e5-98b1-00dbdf11ceac/urdf_spawner-3*.log when trying to run rrbot_gazebo. gazebo by itself seems to launch though.
…at has triggered the OnNewFrame, therefore it should go into the timestamp. (the OnNewFrame ought to contain the timestamp) There is no purpose to cur_time since the OnNewFrame is never triggered at a higher rate than gazebo sensor- maybe the idea was that a higher rate could be synthesized by sending the same image at the plugin rate even when the sensor rate was lower? Why does updateRate exist at all, it seems likely to cause confusion and be set to a non-zero number (like the same number as update_rate) that will result in skipped frames.
Is there a reason updateRate exists, when the gazebo sensor update_rate already controls the rate of the sensor callback? |
…ake run_tests_gazebo_plugins_rostest_test_camera_camera.test, but it fails when run from catkin_make run_tests_gazebo_plugins- the actual test succeeds, but then doesn't exit, and the time runs out. issue ros-simulation#408
… success immediately, the test doesn't run out of time. I'm guessing gazebo isn't shutting down properly at the end of the test?
I have a test now, and it works for
But
|
…gazebo tests in sequence doesn't work.
…rs is redundant, also commenting out the test since it can't be run_tested
…me that gazebo generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps.
…amps are currently outdated, will fix them similar to how the regular camera was fixed.
…an outdated, also reuse the same update code
…ght timestamp ros-simulation#408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff]
…g 0.6 seconds to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag ros-simulation#409
Nice work - I was having issues due to this bug and was about to fix it myself before I saw this. Note that the openni_kinect plugin also has the same problem. |
Check out #410 (which is stuck in limbo because the test infrastructure can't properly run the test? Also it has gained some merge conflicts...). Maybe you could make the same fixes for the kinect plugin in an independent pull request (I would guess very similar code and tests would work). |
…me that gazebo generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps.
…amps are currently outdated, will fix them similar to how the regular camera was fixed.
…an outdated, also reuse the same update code
…ght timestamp ros-simulation#408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff]
…g 0.6 seconds to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag ros-simulation#409
👍 Thanks for this! This issue is completely blocking for me, I'm so glad you already figured out the answer. For anyone having trouble finding the diff from @lucasw's branch, here is the simple comparison: Main change is to swap from (and the Get() version of these for Gazebo versions before 7). |
… generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps.
…ntly outdated, will fix them similar to how the regular camera was fixed.
…ght timestamp #408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff]
…to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag #409
…me that gazebo generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps.
…amps are currently outdated, will fix them similar to how the regular camera was fixed.
…an outdated, also reuse the same update code
…ght timestamp ros-simulation#408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff]
…g 0.6 seconds to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag ros-simulation#409
* Fix for issue #408. The last measurement time is the time that gazebo generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps. * #408 Making a test for multicamra that shows the timestamps are currently outdated, will fix them similar to how the regular camera was fixed. * #408 Make the multi camera timestamps current rather than outdated, also reuse the same update code * Adding depth camera world to use in test to make depth camera have right timestamp #408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff] * Disabling this test because of #409 * #408 Created test for depth camera, which fails, so next make it pass * #408 also test points publication * #408 fix timestamps for depth image, test passes now * #408 Increasing max time because some systems are taking 0.6 seconds to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag #409 * Adding @j-rivero default disabling of tests that require a display * change LastUpdateTime to LastMeasurementTime
Fixed in above mentioned merged PRs |
…me that gazebo generated the sensor data, so ought to be used. updateRate doesn't seem that useful. The other cameras need similar fixes to have the proper timestamps.
…amps are currently outdated, will fix them similar to how the regular camera was fixed.
…an outdated, also reuse the same update code
…ght timestamp ros-simulation#408- appears to be working (though only looking at horizon) but getting these sdf errors: Error [SDF.cc:789] Missing element description for [pointCloudTopicName] Error [SDF.cc:789] Missing element description for [depthImageCameraInfoTopicName] Error [SDF.cc:789] Missing element description for [pointCloudCutoff]
…g 0.6 seconds to receive the messages (still well less than 2.0 seconds). Also all the tests can be run with run_tests_gazebo_plugins_rostest but only with the -j1 flag ros-simulation#409
The camera message is getting sent out with a timestamp that is actually the last timestamp. This is very apparent when setting update_rate to a low value, like 0.1.
https://github.com/ros-simulation/gazebo_ros_pkgs/blob/jade-devel/gazebo_plugins/src/gazebo_ros_camera.cpp#L91
I think these first two functions need to pass in cur_time (or
this->parentSensor_->GetLastUpdateTime()
?), right now the sensor_update_time_ is getting set to last_update_time_ in these functions:I'll get a pr with a test together.
It looks like gazebo_ros_prosilica is doing it right, but gazebo_ros_multicamera, gazebo_ros_depth_camera, and gazebo_ros_openni_kinect are wrong.
http://answers.ros.org/question/229387/gazebo-camera-timestamp-is-10update_rate-out-of-date/
The text was updated successfully, but these errors were encountered: