Gazebo Gazebo

API Reference

6.16.0
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

Spawn multiple entities

This service can spawn multiple entities in the same iteration, thereby eliminating simulation steps between entity spawn times.

Set entity pose

This service set the pose of entities

Set multiple entity poses

This service set the pose of multiple entities

Try some examples described on examples/worlds/empty.sdf

Constructor & Destructor Documentation

◆ UserCommands()

UserCommands ( )
explicit

Constructor.

◆ ~UserCommands()

~UserCommands ( )
final

Destructor.

Member Function Documentation

◆ Configure()

void Configure ( const Entity _entity,
const std::shared_ptr< const sdf::Element > &  _sdf,
EntityComponentManager _ecm,
EventManager _eventMgr 
)
overridevirtual

Configure the system.

Parameters
[in]_entityThe entity this plugin is attached to.
[in]_sdfThe SDF Element associated with this system plugin.
[in]_ecmThe EntityComponentManager of the given simulation instance.
[in]_eventMgrThe EventManager of the given simulation instance.

Implements ISystemConfigure.

◆ PreUpdate()

void PreUpdate ( const UpdateInfo _info,
EntityComponentManager _ecm 
)
finalvirtual

All received commands are queued in order of reception and executed in order during PreUpdate.

Parameters
[in]_infoContains information about the current simulation iteration.
[in]_ecmThe entity component manager.

Implements ISystemPreUpdate.


The documentation for this class was generated from the following file: