Closed g-arjones closed 4 months ago
It looks like we need a new API for adding systems programmatically with XML content. The current System::AddSystem
API calls SimulationRunner::AddSystem
with the default arguments, which has sdf::ElementPtr
set to std::nullopt
.
Unfortunately, both SystemManager
and SimulationRunner
are private classes so I don't see any way around this. Is there a reason why this wasn't implemented? Would you guys accept a patch?
Yes, I think it would be great to have a Server::AddSystem
that mirrors SimulationRunner::AddSystem
but has the additional _worldIndex
parameter. A patch for that would be awesome!
Another thought is to extend ServerConfig
to allow adding plugins in addition to the ones loaded by default or listed in the SDFormat file. This would be useful for https://github.com/gazebosim/ros_gz/pull/500
Another thought is to extend ServerConfig to allow adding plugins in addition to the ones loaded by default or listed in the SDFormat file. This would be useful for https://github.com/gazebosim/ros_gz/pull/500
Not sure I get this one... Isn't this possible already through these interfaces:
Unfortunately, those APIs don't work if the SDF file doesn't have any plugins and instead wants to just use the default set. When calling ServerConfig::AddPlugin
, just the plugins in the ServerConfig
get loaded, but the default set of plugins doesn't. I haven't actually what happens if the SDF file actually has plugins listed and we call ServerConfig::AddPlugin
.
I see. OK, I will give it a try.
@azeey I have submitted a patch to fix the original issue. The feature you proposed seemed a bit more involved and is worth a separate PR IMO. I will work on the other one if we can merge #2324 .
Environment
Description
Steps to reproduce
SystemLoader
(extracted from here):Output
You should get on your console:
When you should actually be getting something like: