Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo 2.2: Get mouse coordinates from external source into Gazebo Plugin

asked 2017-04-09 19:04:39 -0500

techknowfile gravatar image

I want to be able to read in the coordinates of a mouse click - preferably using a service, but subscribing to a topic would do - into my Gazebo 2.2 system plugin.

Trying to get some momentum behind this task, I tried following this tutorial, but if I even declare a ros::CallbackQueue variable or if I check ros::isInitialized() at any point in the execution of the plugin, Gazebo crashes, doesn't actually create the log file it says it made, and I get nowhere.

Any help is greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-10 09:57:59 -0500

Take a look at this question. GUI plugins are not supported on Gazebo 2.2, but you might be able to do it with a System plugin.

Just beware that Gazebo 2 has reached end of life, it's probably a better idea to upgrade to Gazebo 8.

edit flag offensive delete link more

Comments

Thanks chapulina. I'm able to get mouse events inside of my system plugin by interfacing directly with the gazebo client, but when I need to do is get the information from a topic, so that I can take the coordinates from a click on an HTML canvas and then use them inside of the client.

techknowfile gravatar imagetechknowfile ( 2017-04-10 15:47:40 -0500 )edit

Ohhh I see. Humm, and you want to use a ROS subscriber inside a Gazebo-ROS plugin to handle those coordinates? So the Gazebo-ROS plugin does not need to know about whatever you're doing to get those mouse coordinates, right? The tutorial you're following is for Gazebo 7, maybe try this one? http://gazebosim.org/tutorials?tut=ros_plugins&cat=connect_ros

chapulina gravatar imagechapulina ( 2017-04-10 15:53:49 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-04-09 19:04:39 -0500

Seen: 193 times

Last updated: Apr 10 '17