ros-visualization / rqt_image_view

http://wiki.ros.org/rqt_image_view
26 stars 59 forks source link

Dynamically redefine the image topic #16

Open AndyZe opened 6 years ago

AndyZe commented 6 years ago

I'm interested in programmatically defining the image topic so I can switch between multiple cameras. Please advise if you would welcome a PR to do that, and if you would prefer it to be accomplished via ROS service or a dynamically configurable parameter (or maybe some other way)...

I think I would prefer to do it via ROS service.

dirk-thomas commented 6 years ago

A service sounds like the better idea to me. A PR would certainly be welcome :bowing_man:

gstavrinos commented 6 years ago

Which service type would be the preferred one for such functionality?

AndyZe commented 6 years ago

You can check out the PR here: https://github.com/ros-visualization/rqt_image_view/pull/17/files

I did a string request, empty response. Hopefully that works for you, @gstavrinos.

gstavrinos commented 6 years ago

Looking good @AndyZe! Check your PRs for a quick fix. There is still a problem though, described in the commit message.

Cheers,

George

AndyZe commented 6 years ago

Cool, I tested your PR it works well. In my opinion, the other problem that you mentioned (clashing when rosrun-ing multiple instances) is a minor concern. If you wanted multiple, separate image views, why not use image_view? rqt_image_view is specifically intended to run from the GUI, I think.

Thanks!

gstavrinos commented 6 years ago

I hope so. Maybe Dirk or some other ROS master can tell us their opinion on the matter.