gazebosim / gz-tools

Command line tools for the Gazebo libraries.
https://gazebosim.org
Apache License 2.0
14 stars 18 forks source link

Could excess argc/argv be passed to plugins? #110

Open peci1 opened 1 year ago

peci1 commented 1 year ago

Desired behavior

Systems have a way of reading args passed on command line when launching an ign * command.

Alternatives considered

Systems are sad not knowing what the user wanted to tell them.

Implementation suggestion

I don't know exactly how to implement it. There's a few levels of Ruby/C indirection which would all need to be passed, and then there would probably need to be a way to make the arguments available to the systems in Configure().

Additional context

https://github.com/ros-controls/ign_ros_control/issues/3 would benefit from this. Not passing the CLI args further also means that when gz is launched as a ROS node, no remappings or namespaces will be applied to it, as these are specified as CLI args.

Gazebo Classic uses System plugins for parsing the rest of argc/argv. The good thing on the Classic approach is that the programmer explicitly specifies the order in which system plugins will be loaded, so even interactions between several system plugins can be resolved correctly, while being able to rely on a fact that something will be parsed later/earlier.