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

gazebo_plugins: gazebo_ros_openni_kinect plugin not publishing depth and rgb camera info #95

Closed
bit-pirate opened this issue Aug 1, 2013 · 8 comments

Comments

@bit-pirate
Copy link
Contributor

I believe the important function to publish the camera info is

GazeboRosOpenniKinect::PublishCameraInfo()

However, I don't see anything calling it ever, which might be the cause of this issue.
For testing I have added a call of this function in OnNewDepthFrame(), but I am not sure this is the right place.

@bit-pirate
Copy link
Contributor Author

Once we find a solution for this, I can add it to my pull request #96.

@piyushk
Copy link
Contributor

piyushk commented Aug 6, 2013

This was originally fixed in https://code.ros.org/trac/ros-pkg/ticket/5596, but somehow got reverted in 0696de6

Simply re-implementing my original patch did nothing, and I'll dig deeper into the code later tonight.

@piyushk
Copy link
Contributor

piyushk commented Aug 6, 2013

Here's the cause: 0696de6#L11L555

This worked because originally the function was virtual and called by the base class, a call that has now been removed. I believe your method of calling it in OnNewDepthFrame() is probably best. A bit more code is needed to ensure that subscribers to only the camera_info message receive it.

@bit-pirate
Copy link
Contributor Author

That should be ensured, since PublishCameraInfo() has its own subscriber counter and publisher. It would also be called outside the subscriber checks for the depth image, point cloud and image streams and hence would always be called when a new depth frame arrives.

Only minor back draw is, that the camera info cannot be published at a rate higher than the sensor's update rate. The inverse - camera info publishing rate < depth image publishing rate - however works.

@davetcoleman
Copy link
Collaborator

Commit 0696de6#L11L555 was me syncing the updates from the DRC Virtual Robotics Challenge code base back into the main gazebo repository. I did not remove that line myself so am not sure why it was removed, but @hsu probably knows why it was deleted.

@bit-pirate
Copy link
Contributor Author

Could someone re-release gazebo pkgs with this fix? Thanks!

@davetcoleman
Copy link
Collaborator

Will do.

@davetcoleman
Copy link
Collaborator

ros/rosdistro#1702

cohen39 pushed a commit to cohen39/gazebo_ros_pkgs that referenced this issue Nov 15, 2021
cohen39 pushed a commit to cohen39/gazebo_ros_pkgs that referenced this issue Nov 15, 2021
gazebo_ros_openni_kinect plugin: adds publishing of the camera info again (fixes ros-simulation#95)
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

No branches or pull requests

3 participants