UserCommands Class Reference
This system provides an Ignition Transport interface to execute commands while simulation is running. More...
#include <UserCommands.hh>
Public Member Functions | |
UserCommands () | |
Constructor. More... | |
~UserCommands () final | |
Destructor. More... | |
void | Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) override |
Configure the system. More... | |
void | PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) final |
All received commands are queued in order of reception and executed in order during PreUpdate. More... | |
Public Member Functions inherited from System | |
System ()=default | |
Constructor. More... | |
virtual | ~System ()=default |
Destructor. More... | |
Detailed Description
This system provides an Ignition Transport interface to execute commands while simulation is running.
- Todo:
- (louise) In the future, an interface undo/redo commands will also be provided.
Spawn entity
- Service:
/world/<world name>/create
- **Request type*: ignition.msgs.EntityFactory
- **Response type*: ignition.msgs.Boolean
Spawn multiple entities
This service can spawn multiple entities in the same iteration, thereby eliminating simulation steps between entity spawn times.
- Service:
/world/<world name>/create_multiple
- **Request type*: ignition.msgs.EntityFactory_V
- **Response type*: ignition.msgs.Boolean
Set entity pose
This service set the pose of entities
- Service:
/world/<world name>/set_pose
- **Request type*: ignition.msgs.Pose
- **Response type*: ignition.msgs.Boolean
Set multiple entity poses
This service set the pose of multiple entities
- Service:
/world/<world name>/set_pose_vector
- **Request type*: ignition.msgs.Pose_V
- **Response type*: ignition.msgs.Boolean
Try some examples described on examples/worlds/empty.sdf
Constructor & Destructor Documentation
◆ UserCommands()
|
explicit |
Constructor.
◆ ~UserCommands()
|
final |
Destructor.
Member Function Documentation
◆ Configure()
|
overridevirtual |
Configure the system.
- Parameters
-
[in] _entity The entity this plugin is attached to. [in] _sdf The SDF Element associated with this system plugin. [in] _ecm The EntityComponentManager of the given simulation instance. [in] _eventMgr The EventManager of the given simulation instance.
Implements ISystemConfigure.
◆ PreUpdate()
|
finalvirtual |
All received commands are queued in order of reception and executed in order during PreUpdate.
- Parameters
-
[in] _info Contains information about the current simulation iteration. [in] _ecm The entity component manager.
Implements ISystemPreUpdate.
The documentation for this class was generated from the following file: