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_ros_depth_camera not publishing depth camera_info #1174

Open
corot opened this issue Oct 2, 2020 · 11 comments
Open

gazebo_ros_depth_camera not publishing depth camera_info #1174

corot opened this issue Oct 2, 2020 · 11 comments

Comments

@corot
Copy link

corot commented Oct 2, 2020

The code is commented both in melodic and noetic: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/noetic-devel/gazebo_plugins/src/gazebo_ros_depth_camera.cpp#L477

This simple PR fixed the issue on kinetic: #97, and the same works on melodic.

Btw, I saw the problem mentioned in other issues, e.g. #569, #757.

@HighPriest
Copy link

HighPriest commented Oct 12, 2020

There seem to be a clusterfuck of issues and merges related to camera plugin.
It's baffling how such a prelevant sensor is so badly documented and maintained. eg. #127 is still hanging even though the issue has been resolved.
And the best documentation for both ROS1 and ROS2 implementation is hidden here ROS2 Migration: Camera

Anyway, I am having the same issue on ROS2 Foxy, Gazebo11.12, no data is published by (in this case) gazebo_ros_camera.

@chapulina
Copy link
Contributor

Contributions are always welcome. This includes not only ticketing issues, which is very appreciated, but also opening and reviewing pull requests, commenting on issues that are resolved...

@corot , #97 was merged well before the Kinetic / Melodic / Noetic releases. If you can figure out what the fix is for the newer distros, a PR would be appreciated.

@HighPriest , I believe you're a bit confused. This issue is about the depth camera on ROS 1, and it looks like you're having some troubles with the camera on ROS 2? Please open a new issue explaining your exact issue and how to reproduce it. Or even better, open a pull request proposing a fix. The camera info was working when first ported to ROS 2 on #827.

@HighPriest
Copy link

HighPriest commented Oct 13, 2020

@chapulina ros_depth_camera has been merged with other vision related plugins into single ros_camera. The goal behind it was to differentiate them with sensor type. HERE

`Offtopic:
As I am working with my team, we are slowly wrapping our heads around the ROS GAZEBO ecosystem. Ros2 is a huge mess of undocumented and unmaintained snippets of code, but saying that, it's still much better than Ros1.

With all the legacy code that needs to be kept alive for people still using outdated codebases, it's amazing that Gazebo works at all. (But it's not a place for this type of discussion)`

@chapulina
Copy link
Contributor

ros_depth_camera has been merged with other vision related plugins into single ros_camera

Oh yeah you're right. In any case, I think the ROS 2 issue, if there's any, should be independent of this one. I still don't know how to reproduce your issue.


I completely understand your frustration, there's a lot to be improved. But the way you've approached this issue isn't productive. I recommend you take a look at our code of conduct.

@HighPriest
Copy link

@chapulina We have found a workaround for the broken camera and camera_depth in gazebo11 / ros_foxy,
We took source of gazebo_ros_pkgs/dashing and built the whole dir gazebo_plugins against gazebo11 and ros_foxy (both from package manager). Probably it's enough to just build gazebo_ros_camera and gazebo_ros_depth_camera from gazebo_plugins

Then we attached the newly built .so files to the robot definition. (filename="absolute/path/to/gazebo_ros_depth_camera.so") [in our case we want depth] and all vision data is now correctly pushed to ros topic.

@chapulina
Copy link
Contributor

Thanks for the update, @HighPriest 👍 It would be interesting to know exactly what's the difference between the dashing and ros2 branches that's making that work.

@HighPriest
Copy link

HighPriest commented Oct 15, 2020

@chapulina
There were so many changes in between dashing and foxy release (including some damn PROFILER that makes the code a mashup of crap, that none of my teammates are able to decipher), that make us unable to understand the code and debug the issue. But I don't think anyone is willing to rollback from the PROFILER implementation or think of some more readable way to do it.

From our initial debugging session, we have found that the "publish" function in current (gazebo_ros_pkgs/ros2) gazebo_ros_camera is reached and executed, no data ends up on the topic.

@corot
Copy link
Author

corot commented Dec 2, 2020

Not 100% sure, but we may be mixing 2 different issues here. One is that gazebo_ros_depth_camera not publishing depth camera_info on melodic, what gets fixed by re-making #97 with melodic (that's why I don't open a PR myself).

The other is that, with the recent addition of the profiler to gazebo (on version 9.15), all camera plugins have stopped to work. To contour that 2nd problem, I'm now compiling gazebo 9.14 from sources, but the camera info is still missing

@corot
Copy link
Author

corot commented Mar 23, 2021

Probably much clearer with a PR: #1260, This trivial change fixes the issue

@HighPriest
Copy link

Indeed this issue has been fixed in the latest versions of Gazebo11.
This ticket can be closed.

@corot
Copy link
Author

corot commented May 30, 2021

I think this is not the same as #1175; that came from adding profiler to gazebo, afaik. Here we are missing a publish, which was added to Kinetic but not melodic (the matching PR is #1260)

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