ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
742 stars 766 forks source link

Feature request: add optional parameter for naming static node #1492

Open RBT22 opened 1 year ago

RBT22 commented 1 year ago

Hello,

Our team uses a VisualPlugins and we would also make use of the static node "functionlality" which can be shared by several plugins. Currently the static node is created with the name "gazebo" always, and there is no option to give a different name to it. This can cause problems with visual plugins, because you can get multiple gazebo named nodes, by calling the gazebo_ros::Node::Get() function if you run a gazebo client besides the server.

Our solution was to provide an optional node_name argument in the gazebo_ros::Node::Get() function which sets the name of the static_node if it has not been initialized before. Something like: https://github.com/EnjoyRobotics/gazebo_ros_pkgs/pull/1/commits/15f221260b4295255ba3da3ddcf87b7c3571034e

Is it something that could be supported? Or is there a better solution to address this problem? Thank you!