0
$\begingroup$

Rosanswers logo

Hi, I am a total ROS/gazebo noob. I recently installed groovy on ubuntu 12.10 and I am running the TUM's gazebo simulator for a quadrotor.

My question - There is an image topic being published by the simulator(which is the 2D image of the world that the quadrotor sees using its camera). I can view this image in rviz or using image_view package.

How do I create a gui window where I can display this image and when I click at a location in the image, I get the mouse click event(location of the click within the image window)?

I would appreciate if the solution is a bit more detailed or guiding as I am a total noob to ROS itself.(the solution need not be related to rviz)


Originally posted by devesh on ROS Answers with karma: 104 on 2013-02-24

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

One way to do it might be to create a new panel in Rviz that displays the image. Then you can capture the click event and do what you need to with it. If that sounds like it meets your needs, this tutorial is probably a good place to start: http://ros.org/doc/groovy/api/rviz_plugin_tutorials/html/panel_plugin_tutorial.html


Originally posted by Jeffrey Kane Johnson with karma: 452 on 2013-02-25

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by devesh on 2013-02-28:
Sorry jj56. But I haven't been able to use that link because I am finding it hard. I believe I am much more of a noob than someone who could follow that tutorial. I still don't know how to add an image display panel.

Comment by Jeffrey Kane Johnson on 2013-02-28:
Ah, yeah, it's definitely not a beginner tutorial. You might be able to do something similar by making your own GUI in python, but I haven't done that kind of thing before, so I can't really offer any advice.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Finally got something working using this link below. http://ros.org/rosdoclite/groovy/api/rviz_python_tutorial/html/

To create an image panel, all I needed to do was write a config file(which included a image display panel and the topic to subscribe from) and then load that config file.

Instead of manually creating the config file, I open rviz and then created a Display Panel in that and then added image to the Display and then set the topic in the properties for the image. Then, I saved these configs in from the File menu and am currently using it.


Originally posted by devesh with karma: 104 on 2013-03-17

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.