Automatically load required plugins for DriveToPoseController
#2773
Labels
enhancement
New feature or request
DriveToPoseController
#2773
Desired behavior
The DriveToPoseController system plugin (#2679) currently requires the
DiffDrive
andOdometryPublisher
plugins to be manually attached to the model entity. The controller fails to function without these.To improve usability, these dependencies should be loaded automatically if they are missing.
Alternatives considered
The current implementation verifies the existence of required publishers/subscribers and logs an error message if they are unavailable before exiting from the
Configure
callback and shutting down initialization.Implementation suggestion
Two possible approaches to automatically load the required plugins:
gz-transport
: Send a request to the/entity/system/add
service to load missing plugins dynamically, as shown in the following example implementation.gz-sim/src/gui/plugins/environment_loader/EnvironmentLoader.cc
Lines 166 to 191 in af92e29
LoadSdfPlugins
event: Create entities for the missing plugins and use theParentEntity
component to attach them to the model entity.gz-sim/include/gz/sim/Events.hh
Lines 57 to 62 in 13bf5be
Additional context
Refer to this conversation for more information.
The text was updated successfully, but these errors were encountered: