RFC: Fixing incorrect loading of parameter files when multiple GazeboControlPlugins are used. #375
RFC: Fixing incorrect loading of parameter files when multiple GazeboControlPlugins are used. #375lkm1321 wants to merge 2 commits into
Conversation
…e specified in the controller yaml, even if the same file
|
@lkm1321 can we go with the 2nd proposal? Less changes in upstream packages is better. Execpt this will help you to run multi-robot setup on the hardware, but I assume that you have different machine for each HW. |
|
Sounds good. I'll clean up towards the second option. I'll be sending in the context inheritance PR to Which branch should I point the PR to? I noticed that |
|
I just commented on #166 (comment) about using |
|
This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete. |
Hi,
I found a bug in
IgnitionROS2ControlPlugin::Configurethat prevents using multiple controller managers with varying parameter files. IMO, this is a pretty important use case for people working on multi-robot simulation.This bug is caused because the parameter file is passed as arguments to
rclcpp::init:When multiple instances of
IgnitionROS2ControlPluginare used, the very first instance callsrclcpp::init, and sincerclcpp::ok()is true,rclcpp::initis not called from the second instance on. Therefore, the global default context only contains the parameters tag of the very first parameter file.I have two possible fixes for this, and would like to get your comment. The first is to use different
rclcpp::Contextfor different instances, and then pass the--params <params-file>as an argument toContext::init. The second is to use node options.The first gives more separation between controller manager instances, but requires a corresponding fix in controller manager so that controller node instances inherit controller manager's context.
The second shares the same global context, and works without modification if the controller parameter yaml ensures to specify the params_file (even if the same file).
What do you guys think?