Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

How to add Gazebo Plugin to Simulation?

$
0
0
Hello! So I am writing a program that will, in theory, ask the user for a (variable) number of robots and spawn the correct number of pioneer2DX models in an empty gazebo world, all done through ROS. I want to add Gazebo plugins that will allow the ROS node to communicate with each pioneer spawned in the simulation. So I would like to write a plugin that can be linked to each of the pioneers I spawned in the empty world. Is there a way to accomplish this through ROS? Since the models are spawned during run time, I need the ROS node to be able to do the linking. Is there a way to do this? Or perhaps an alternative method that will still allow my ROS node to communicate with the dynamic number of robots spawned? I've been looking through the tutorials but I can't seem to find much that helps here. Thanks!! **** **##UPDATE##**
To be more specific, I would like to create a plugin that can be attached to ANY pioneer2DX model I add (i.e. each model runs the plugin). I would like the plugin to have control functions (i.e. moving forward, backward, turning; retrieve sensor values, etc.) that can directly manipulate the robot in the simulation. I would like these functions to be accessible by my ROS node. For example, if my ROS node wants to move a model, it can call these functions from the plugin to do so. Additionally, since there are going to be a variable number of robots each time the simulation is run (this number will be given by the user), I would like the ROS node to have the ability to link the said plugin to each robot in the simulation (which will be named pionner1, ... , pioneer[n]). This will happen when the simulation starts. And when the plugin is linked to the model, the ROS node should be able to communicate with it and call its functions to command the robot to move and give its sensor values as needed. I hope this clears things up a bit. Sorry for being a bit vague before.

Viewing all articles
Browse latest Browse all 7017

Trending Articles