Skip to content
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

Correct the timestamp used by the camera (kinetic-devel) #540

Merged
merged 14 commits into from
Feb 16, 2017

Conversation

j-rivero
Copy link
Contributor

{ port of pull request #410 }

Fix for #408

The last measurement time is the time that gazebo generated the sensor data, so ought to be used. The other cameras need similar fixes to have the proper timestamps. There is a test to show that the timestamp is good, but issue #409 has lead me to comment it out for now.

There probably ought to be a separate issue about what updateRate is supposed to be for, and if it isn't useful remove it (from all the sensors that have it) in another PR.

j-rivero and others added 14 commits February 13, 2017 15:13
… 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
Copy link
Collaborator

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See minor comments

# if GAZEBO_MAJOR_VERSION >= 7
common::Time sensor_update_time = this->parentSensor_->LastMeasurementTime();
# else
common::Time sensor_update_time = this->parentSensor_->GetLastMeasurementTime();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a use case when the kinetic-devel branch will be used with a version of Gazebo less than 7? Seems this compiler directive can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with removing support for gazebo < 7 in the kinetic branch but let's do it a single PR and do not spread removals all over the place to keep PRs clean.

&CameraTest::imageCallback,
dynamic_cast<CameraTest*>(this));

#if 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain when this test should be re-enabled (link to issue) or remove this commented out code

test/camera/camera.test
test/camera/camera.cpp)
target_link_libraries(camera-test ${catkin_LIBRARIES})
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome tests!

@davetcoleman
Copy link
Collaborator

The build is failing because of a CMake warning from gazebo_ros_control:

08:37:08 CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
08:37:08   catkin_package() DEPENDS on 'gazebo' but neither 'gazebo_INCLUDE_DIRS' nor
08:37:08   'gazebo_LIBRARIES' is defined.
08:37:08 Call Stack (most recent call first):
08:37:08   /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
08:37:08   CMakeLists.txt:22 (catkin_package)

That I believe I fixed in my PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants