-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a more friendly way of ROS initialization #3
Comments
Hi @peci1, thanks for opening the issue. I am going to look into that in the next days. |
Hi @peci1 , what do you mean by initialize ROS? ign_ros_control is supposed to work similarly to gazebo_ros_control plugin. Can you provide an example or some lines of code so that I can fully get the problem? Thank you :) |
I'm talking about these lines: With this implementation, no other plugin can initialize ros. In gz classic, there is a specialized plugin (gazebo_ros_api_plugin) that is independent of all other plugins and is said to be the one that should call ros::init on behalf of all other plugins. All other gz-ros plugins just expect that somebody else has done the ros init call and do not try to make it themselves. |
I see your point, but I don't know how it is handled with Ignition. I think the equivalent with ros2 is here: I noticed that in the lines you pointed out there is no return, which means that it should work also if ros has been initialized from another plugin. Did you try that? In this case the ROS_ERROR should be converted into a ROS_WARN or ROS_INFO. |
You're right that technically, the program does not exit, so it runs in the end even if someone else started ROS. However, I still don't consider it correct as other systems might actually want to pass some non-trivial |
I've noticed this plugin assumes that it should be the one that initializes ROS. This doesn't seem to be very friendly to other plugins. Why doesn't it use a similar approach to gazebo_ros with a dedicated ROS API plugin that handles the CLI parameter loading, and all other gazebo-ros plugins just expect "somebody" has already done this for them? I see there isn't anything similar in ros_ign_gazebo, but I think that should be the way to go...
The text was updated successfully, but these errors were encountered: