Simulator Class Reference

The Simulator class holds an instance of the AmrarXPhysicsWorld and communicates to ArmarX. More...

#include <ArmarXSimulation/components/Simulator/Simulator.h>

+ Inheritance diagram for Simulator:

Public Member Functions

void activateObject (const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
 
void actuateRobotJoints (const std::string &robotName, const NameValueMap &angles, const NameValueMap &velocities, const Ice::Current &c=Ice::emptyCurrent) override
 
void actuateRobotJointsPos (const std::string &robotName, const NameValueMap &angles, const Ice::Current &c=Ice::emptyCurrent) override
 
void actuateRobotJointsTorque (const std::string &robotName, const NameValueMap &torques, const Ice::Current &c=Ice::emptyCurrent) override
 
void actuateRobotJointsVel (const std::string &robotName, const NameValueMap &velocities, const Ice::Current &c=Ice::emptyCurrent) override
 
void addBox (float width, float height, float depth, float massKG, const DrawColor &color, const std::string &instanceName, const PoseBasePtr &globalPose, bool isStatic=false, const Ice::Current &c=Ice::emptyCurrent) override
 
void addObject (const memoryx::ObjectClassBasePtr &objectClassBase, const std::string &instanceName, const PoseBasePtr &globalPose, bool isStatic=false, const Ice::Current &c=Ice::emptyCurrent) override
 
void addObjectFromFile (const armarx::data::PackagePath &packagePath, const std::string &instanceName, const PoseBasePtr &globalPose, bool isStatic=false, const Ice::Current &c=Ice::emptyCurrent) override
 
std::string addRobot (const std::string &filename, const Ice::Current &c=Ice::emptyCurrent) override
 
std::string addRobotFromFile (const armarx::data::PackagePath &packagePath, const Ice::Current &c=Ice::emptyCurrent) override
 
std::string addScaledRobot (const std::string &filename, float scale, const Ice::Current &c=Ice::emptyCurrent) override
 
std::string addScaledRobotName (const std::string &instanceName, const std::string &filename, float scale, const Ice::Current &c=Ice::emptyCurrent) override
 
bool addSnapshot (memoryx::WorkingMemorySnapshotInterfacePrx snapshotInterfacePrx)
 
void applyForceObject (const std::string &objectName, const Vector3BasePtr &force, const Ice::Current &c=Ice::emptyCurrent) override
 
void applyForceRobotNode (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &force, const Ice::Current &c=Ice::emptyCurrent) override
 
void applyTorqueObject (const std::string &objectName, const Vector3BasePtr &torque, const Ice::Current &c=Ice::emptyCurrent) override
 
void applyTorqueRobotNode (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &torque, const Ice::Current &c=Ice::emptyCurrent) override
 
PropertyDefinitionsPtr createPropertyDefinitions () override
 
ContactInfoSequence getContacts (const Ice::Current &c=Ice::emptyCurrent) override
 Returns a list of all contacts. Note that you must call updateContacts() first to enable contacts handling. More...
 
std::string getDefaultName () const override
 Retrieve default name of component. More...
 
DistanceInfo getDistance (const std::string &robotName, const std::string &robotNodeName, const std::string &worldObjectName, const Ice::Current &c=Ice::emptyCurrent) override
 
int getFixedTimeStepMS (const Ice::Current &c=Ice::emptyCurrent) override
 
ObjectClassInformationSequence getObjectClassPoses (const std::string &robotName, const std::string &frameName, const std::string &className, const Ice::Current &c=Ice::emptyCurrent) override
 
PoseBasePtr getObjectPose (const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
 
Vector3BasePtr getRobotAngularVelocity (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
ForceTorqueDataSeq getRobotForceTorqueSensors (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotJointAngle (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
NameValueMap getRobotJointAngles (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotJointLimitHi (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotJointLimitLo (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
NameValueMap getRobotJointTorques (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
NameValueMap getRobotJointVelocities (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotJointVelocity (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
Vector3BasePtr getRobotLinearVelocity (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotMass (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
float getRobotMaxTorque (const std::string &robotName, const std::string &nodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
Ice::StringSeq getRobotNames (const Ice::Current &) override
 
DistanceInfo getRobotNodeDistance (const std::string &robotName, const std::string &robotNodeName1, const std::string &robotNodeName2, const Ice::Current &c=Ice::emptyCurrent) override
 
PoseBasePtr getRobotNodePose (const std::string &robotName, const std::string &robotNodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
PoseBasePtr getRobotPose (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
SimulatedRobotState getRobotState (const std::string &robotName, const Ice::Current &) override
 
SceneVisuData getScene (const Ice::Current &c=Ice::emptyCurrent) override
 
float getSimTime (const Ice::Current &c=Ice::emptyCurrent) override
 
SimulatorInformation getSimulatorInformation (const ::Ice::Current &=Ice::emptyCurrent) override
 
Ice::Float getSpeed (const Ice::Current &c=Ice::emptyCurrent) override
 
Ice::Int getStepTimeMS (const ::Ice::Current &=Ice::emptyCurrent) override
 
Ice::Long getTime (const Ice::Current &c=Ice::emptyCurrent) override
 
bool hasObject (const std::string &instanceName, const Ice::Current &c=Ice::emptyCurrent) override
 
bool hasRobot (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent) override
 
bool hasRobotNode (const std::string &robotName, const std::string &robotNodeName, const Ice::Current &c=Ice::emptyCurrent) override
 
bool isRunning (const Ice::Current &c=Ice::emptyCurrent) override
 
bool loadAgentsFromSnapshot (memoryx::WorkingMemorySnapshotInterfacePrx snapshotInterfacePrx)
 
void objectGrasped (const std::string &robotName, const std::string &robotNodeName, const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
 create a joint More...
 
void objectReleased (const std::string &robotName, const std::string &robotNodeName, const std::string &objectName, const Ice::Current &c=Ice::emptyCurrent) override
 remove a joint More...
 
void onConnectComponent () override
 Pure virtual hook for the subclass. More...
 
void onDisconnectComponent () override
 Hook for subclass. More...
 
void onExitComponent () override
 Hook for subclass. More...
 
void onInitComponent () override
 Pure virtual hook for the subclass. More...
 
void pause (const Ice::Current &c=Ice::emptyCurrent) override
 
void reInitialize (const Ice::Current &c=Ice::emptyCurrent) override
 reInitialize Re-initializes the scene. Removes all robots and objects (and, in case the scene was loaded via a MemoryX snapshot, the working memory is cleared) Then, the setup is re-loaded similar to the startup procedure. More...
 
void removeObject (const std::string &instanceName, const Ice::Current &) override
 
bool removeRobot (const std::string &robotName, const Ice::Current &c=Ice::emptyCurrent)
 
void run () override
 
void setObjectPose (const std::string &objectName, const PoseBasePtr &globalPose, const Ice::Current &c=Ice::emptyCurrent) override
 
void setObjectSimulationType (const std::string &objectName, armarx::SimulationType type, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotAngularVelocity (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &vel, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotAngularVelocityRobotRootFrame (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &vel, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotLinearVelocity (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &vel, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotLinearVelocityRobotRootFrame (const std::string &robotName, const std::string &robotNodeName, const Vector3BasePtr &vel, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotMaxTorque (const std::string &robotName, const std::string &nodeName, float maxTorque, const Ice::Current &c=Ice::emptyCurrent) override
 
void setRobotPose (const std::string &robotName, const PoseBasePtr &globalPose, const Ice::Current &c=Ice::emptyCurrent) override
 
void setSpeed (Ice::Float newSpeed, const Ice::Current &c=Ice::emptyCurrent) override
 setSpeed sets the scaling factor for the speed of passing of time e.g. More...
 
void showContacts (bool enable, const std::string &layerName, const Ice::Current &c=Ice::emptyCurrent) override
 
 Simulator ()
 
void start (const Ice::Current &c=Ice::emptyCurrent) override
 
void step (const Ice::Current &c=Ice::emptyCurrent) override
 
void stop (const Ice::Current &c=Ice::emptyCurrent) override
 
void updateContacts (bool enable, const Ice::Current &c=Ice::emptyCurrent) override
 Enables the handling of contacts. If you intend to use getContacts(), call this method with enabled = true first. More...
 
 ~Simulator () override
 
- Public Member Functions inherited from Component
virtual void componentPropertiesUpdated (const std::set< std::string > &changedProperties)
 Implement this function if you would like to react to changes in the properties. More...
 
void forceComponentCreatedByComponentCreateFunc ()
 forces the flag to be set to true that the object instance was created by the Component::create function More...
 
std::vector< PropertyUserPtrgetAdditionalPropertyUsers () const
 
template<typename PropertyType >
Property< PropertyType > getProperty (const std::string &name)
 
template<typename PropertyType >
Property< PropertyType > getProperty (const std::string &name) const
 
template<class T >
void getProperty (std::atomic< T > &val, const std::string &name) const
 
template<class T >
void getProperty (T &val, const std::string &name) const
 
template<class ProxyType >
ProxyType getProxyFromProperty (const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
 Get a proxy whose name is specified by the given property. More...
 
template<class ProxyType >
void getProxyFromProperty (ProxyType &proxy, const std::string &propertyName, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
 
template<class TopicProxyType >
TopicProxyType getTopicFromProperty (const std::string &propertyName)
 Get a topic proxy whose name is specified by the given property. More...
 
template<class TopicProxyType >
void getTopicFromProperty (TopicProxyType &top, const std::string &propertyName)
 
void initializeProperties (const std::string &configName, Ice::PropertiesPtr const &properties, const std::string &configDomain)
 initializes the properties of this component. More...
 
void injectPropertyDefinitions (PropertyDefinitionsPtr &props) override
 
void offeringTopicFromProperty (const std::string &propertyName)
 Offer a topic whose name is specified by the given property. More...
 
virtual void preOnConnectComponent () override
 
virtual void preOnInitComponent () override
 
bool usingProxyFromProperty (const std::string &propertyName, const std::string &endpoints="")
 Use a proxy whose name is specified by the given property. More...
 
void usingTopicFromProperty (const std::string &propertyName, bool orderedPublishing=false)
 Use a topic whose name is specified by the given property. More...
 
- Public Member Functions inherited from ManagedIceObject
void enableProfiler (bool enable)
 setProfiler allows setting ManagedIceObject::profiler to a new instance (if the new instance is actually not a null pointer) More...
 
std::string generateSubObjectName (const std::string &subObjectName)
 Generates a unique name for a sub object from a general name. More...
 
ArmarXManagerPtr getArmarXManager () const
 Returns the ArmarX manager used to add and remove components. More...
 
ManagedIceObjectConnectivity getConnectivity () const
 Retrieve connectivity of the object (topcis as well as proxies) More...
 
IceManagerPtr getIceManager () const
 Returns the IceManager. More...
 
VariantBasePtr getMetaInfo (const std::string &id)
 
StringVariantBaseMap getMetaInfoMap () const
 
std::string getName () const
 Retrieve name of object. More...
 
Ice::ObjectAdapterPtr getObjectAdapter () const
 Returns object's Ice adapter. More...
 
ArmarXObjectSchedulerPtr getObjectScheduler () const
 
PeriodicTaskPtr getPeriodicTask (const std::string &name)
 
Profiler::ProfilerPtr getProfiler () const
 getProfiler returns an instance of armarx::Profiler More...
 
template<class ProxyTarg , class... Args>
void getProxy (const char *name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&... args)
 
template<class ProxyType >
ProxyType getProxy (const std::string &name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
 Retrieves a proxy object. More...
 
template<class ProxyTarg , class... Args>
void getProxy (const std::string &name, IceInternal::ProxyHandle< ProxyTarg > &proxy, Args &&... args)
 
template<class ProxyTarg , class... Args>
void getProxy (IceInternal::ProxyHandle< ProxyTarg > &proxy, const char *name, Args &&... args)
 
template<class ProxyTarg , class... Args>
void getProxy (IceInternal::ProxyHandle< ProxyTarg > &proxy, const std::string &name, Args &&... args)
 Assigns a proxy to proxy. More...
 
Ice::ObjectPrx getProxy (long timeoutMs=0, bool waitForScheduler=true) const
 Returns the proxy of this object (optionally it waits for the proxy) More...
 
template<class Prx >
Prx getProxy (long timeoutMs=0, bool waitForScheduler=true) const
 
template<class ProxyType >
void getProxy (ProxyType &proxy, const char *name, bool addToDependencies=false, const std::string &endpoints="", bool throwOnProxyError=true)
 Overload to allow using string literals as name (solve ambiguous overload). More...
 
template<class Prx >
void getProxy (Prx &prx, long timeoutMs=0, bool waitForScheduler=true) const
 
int getState () const
 Retrieve current state of the ManagedIceObject. More...
 
template<class TopicProxyType >
TopicProxyType getTopic (const std::string &name)
 Returns a proxy of the specified topic. More...
 
template<class TopicProxyType >
void getTopic (TopicProxyType &topicProxy, const std::string &name)
 Assigns a proxy of the specified topic to topicProxy. More...
 
std::vector< std::string > getUnresolvedDependencies () const
 returns the names of all unresolved dependencies More...
 
 ManagedIceObject (ManagedIceObject const &other)
 
void offeringTopic (const std::string &name)
 Registers a topic for retrival after initialization. More...
 
void preambleGetTopic (std::string const &name)
 
void setMetaInfo (const std::string &id, const VariantBasePtr &value)
 Allows to set meta information that can be queried live via Ice interface on the ArmarXManager. More...
 
void startPeriodicTask (const std::string &uniqueName, std::function< void(void)> f, int periodMs, bool assureMeanInterval=false, bool forceSystemTime=true)
 
bool stopPeriodicTask (const std::string &name)
 
bool unsubscribeFromTopic (const std::string &name)
 Unsubscribe from a topic. More...
 
bool usingProxy (const std::string &name, const std::string &endpoints="")
 Registers a proxy for retrieval after initialization and adds it to the dependency list. More...
 
void usingTopic (const std::string &name, bool orderedPublishing=false)
 Registers a proxy for subscription after initialization. More...
 
void waitForObjectScheduler ()
 Waits until the ObjectScheduler could resolve all dependencies. More...
 
void waitForProxy (std::string const &name, bool addToDependencies)
 
- Public Member Functions inherited from Logging
SpamFilterDataPtr deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
 disables the logging for the current line for the given amount of seconds. More...
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More...
 
void setTag (const LogTag &tag)
 
void setTag (const std::string &tagName)
 
virtual ~Logging ()
 
- Public Member Functions inherited from PropertyUser
std::vector< std::string > getComponentProxyNames ()
 
Ice::PropertiesPtr getIceProperties () const
 Returns the set of Ice properties. More...
 
template<typename PropertyType >
Property< PropertyType > getProperty (const std::string &name)
 Property creation and retrieval. More...
 
template<typename PropertyType >
Property< PropertyType > getProperty (const std::string &name) const
 Hack to allow using getProperty in const-modified methods. More...
 
template<class T >
void getProperty (std::atomic< T > &val, const std::string &name) const
 
template<class T >
void getProperty (T &val, const std::string &name) const
 
template<class T >
std::vector< TgetPropertyAsCSV (const std::string &name, const std::string &splitBy=",;", bool trimElements=true, bool removeEmptyElements=true)
 
template<class ContainerT >
void getPropertyAsCSV (ContainerT &val, const std::string &name, const std::string &splitBy=",;", bool trimElements=true, bool removeEmptyElements=true)
 
PropertyDefinitionsPtr getPropertyDefinitions ()
 Returns the component's property definition container. More...
 
std::vector< std::string > getSubscribedTopicNames ()
 
std::vector< std::string > getTopicProxyNames ()
 
bool hasProperty (const std::string &name)
 
 PropertyUser ()
 
virtual void setIceProperties (Ice::PropertiesPtr properties)
 Sets the Ice properties. More...
 
bool tryAddProperty (const std::string &propertyName, const std::string &value)
 
virtual void updateIceProperties (const std::map< std::string, std::string > &changes)
 
void updateProperties ()
 
void updateProxies (IceManagerPtr)
 
 ~PropertyUser () override
 

Protected Member Functions

std::string addRobot (std::string robotInstanceName, const std::string &robFileGlobal, Eigen::Matrix4f gp, const std::string &robFile, double pid_p=10.0, double pid_i=0.0, double pid_d=0.0, bool isStatic=false, float scaling=1, bool colModel=false, std::map< std::string, float > initConfig=std::map< std::string, float >(), bool selfCollisions=false)
 Returns the name. On failure an empty string is returned. More...
 
void initializeData ()
 
void reportDataLoop ()
 
void reportVisuLoop ()
 
memoryx::GridFileManagerPtr requestFileManager ()
 
void resetData (bool clearWorkingMemory=false)
 resetData Clears all data More...
 
void shutdownSimulationLoop ()
 stop the simulation and join the simulation thread More...
 
void simulationLoop ()
 
SimulatedRobotState stateFromRobotInfo (RobotInfo const &robot, IceUtil::Time timestamp)
 
bool updateRobotTopics ()
 
- Protected Member Functions inherited from Component
void addPropertyUser (const PropertyUserPtr &subPropertyUser)
 Add additional property users here that should show up in the application help text. More...
 
 Component ()
 Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead. More...
 
std::string getConfigDomain ()
 Retrieve config domain for this component as set in constructor. More...
 
std::string getConfigIdentifier ()
 Retrieve config identifier for this component as set in constructor. More...
 
std::string getConfigName ()
 Retrieve config name for this component as set in constructor. More...
 
virtual void icePropertiesInitialized ()
 
- Protected Member Functions inherited from ManagedIceObject
template<class PluginT , class... ParamsT>
PluginT * addPlugin (const std::string prefix="", ParamsT &&... params)
 
template<class PluginT , class... ParamsT>
void addPlugin (PluginT *&targ, const std::string prefix="", ParamsT &&... params)
 
template<class PluginT , class... ParamsT>
void addPlugin (std::experimental::observer_ptr< PluginT > &targ, const std::string prefix="", ParamsT &&... params)
 
Ice::CommunicatorPtr getCommunicator () const
 
std::unique_ptr< ManagedIceObjectPlugin > & getPluginPointer (std::type_info const &type, std::string const &prefix)
 
 ManagedIceObject ()
 Protected default constructor. More...
 
virtual void postOnConnectComponent ()
 
virtual void postOnDisconnectComponent ()
 
virtual void postOnExitComponent ()
 
virtual void postOnInitComponent ()
 
virtual void preOnDisconnectComponent ()
 
virtual void preOnExitComponent ()
 
bool removeProxyDependency (const std::string &name)
 This function removes the dependency of this object on the in parameter name specified object. More...
 
void setName (std::string name)
 Override name of well-known object. More...
 
void terminate ()
 Initiates termination of this IceManagedObject. More...
 
 ~ManagedIceObject () override
 
- Protected Member Functions inherited from Logging
bool checkLogLevel (MessageTypeT level) const
 
const LogSenderPtrgetLogSender () const
 Retrieve log sender. More...
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 

Protected Attributes

std::map< std::string, std::vector< std::string > > classInstanceMap
 Stores all instances that belong to a class. More...
 
std::string commonStorageName
 
std::condition_variable condSimulatorThreadRunning
 
std::string contactLayerName
 
float currentComTimeMS = 0
 Stores the time that was needed for communictaion. More...
 
float currentSimTimeMS = 0
 Stores the time that was needed to perform the last simulation loop. More...
 
float currentSyncTimeMS = 0
 stores the time that was needed to sync the data More...
 
memoryx::EntityDrawerInterfacePrx entityDrawerPrx
 Drawing contacts. More...
 
memoryx::GridFileManagerPtr fileManager
 
GlobalRobotPoseLocalizationListenerPrx globalRobotLocalization
 
int lastPublishedContacts = 0
 
memoryx::LongtermMemoryInterfacePrx longtermMemoryPrx
 
memoryx::WorkingMemoryInterfacePrx memoryPrx
 
ObjectFinder objectFinder
 Constructed once based on the ObjectPackage property. More...
 
SimulatedWorldPtr physicsWorld
 
std::string priorKnowledgeName
 
memoryx::PriorKnowledgeInterfacePrx priorKnowledgePrx
 
bool publishContacts = false
 
PeriodicTask< Simulator >::pointer_type reportDataTask
 The report data task. More...
 
bool reportRobotPose = false
 
PeriodicTask< Simulator >::pointer_type reportVisuTask
 The report visu task. More...
 
std::atomic< floatreportVisuTimeMS = 0
 
PeriodicTask< Simulator >::pointer_type simulationTask
 The sim task. More...
 
SimulatorResetEventPrx simulatorResetEventTopic
 
std::mutex simulatorRunningMutex
 
bool simulatorThreadRunning = false
 
bool simulatorThreadShutdown = false
 
SimulatorListenerInterfacePrx simulatorVisuUpdateListenerPrx
 
SimulatorTimeServerProxyPtr timeserverProxy
 Proxy object to offer the Timeserver proxy. More...
 
float timeServerSpeed = 0
 Scaling factor for the passing of time. More...
 
TimeServerListenerPrx timeTopicPrx
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Additional Inherited Members

- Public Types inherited from ManagedIceObject
using PeriodicTaskPtr = IceUtil::Handle< SimplePeriodicTask< std::function< void(void)> >>
 
- Static Public Member Functions inherited from Component
template<class T , class TPtr = IceInternal::Handle<T>>
static TPtr create (Ice::PropertiesPtr properties=Ice::createProperties(), const std::string &configName="", const std::string &configDomain="ArmarX")
 Factory method for a component. More...
 
- Static Public Member Functions inherited from ManagedIceObject
static std::string generateSubObjectName (const std::string &superObjectName, const std::string &subObjectName)
 Generates a unique name for a sub object from a general name and unique name. More...
 
static std::string GetObjectStateAsString (int state)
 
- Static Public Attributes inherited from ManagedIceObject
static const ManagedIceObjectPtr NullPtr
 A nullptr to be used when a const ref to a nullptr is required. More...
 

Detailed Description

The Simulator class holds an instance of the AmrarXPhysicsWorld and communicates to ArmarX.

The following optional parameters can be used.

  • RobotFileName
    Simox/VirtualRobot robot file name, e.g. robot_model.xml.
  • InitialRobotPose.x/y/z/roll/pitch/yaw
    The initial pose of the robot
  • LogRobot
    Default: false, If true, the complete robot state is logged to a file.
  • RobotControllerPID.p/i/d
    Setup robot controllers: PID paramters
  • LongtermMemory.SnapshotName
    Name of snapshot to load the scene
  • SceneFileName
    Simox/VirtualRobot scene file name, e.g. myScene.xml. Usually, sceneas are loaded via MemoryX-snapshots, but in order to test a setup, a scene can be imported directly.
  • FloorPlane
    Indicates if the should be created or not. Default: true.
  • FloorTexture
    The texture file for the floor. By default, a standard texture is used
  • FixedTimeStepLoopNrSteps
    The maximal number of internal simulation loops (fixed time step mode). After the maximum number of internal steps is performed, the simulator interpolates the remaining time.
  • FixedTimeStepStepTimeMS
    The simulation's internal timestep (fixed time step mode)
  • ReportVisuFrequency
    How often should the visualization data be published. Value is given in Hz. (0 to disable, default: 30)
  • ReportVisuTopicName
    The topic on which the visualization updates are published. Default: ReportVisuTopicName
  • ReportDataFrequency
    How often should the robot data be published. Value is given in Hz. (0 to disable, default: 30)

Definition at line 118 of file Simulator.h.

Constructor & Destructor Documentation

◆ Simulator()

Simulator ( )

Definition at line 247 of file Simulator.cpp.

◆ ~Simulator()

~Simulator ( )
override

Definition at line 264 of file Simulator.cpp.

Member Function Documentation

◆ activateObject()

void activateObject ( const std::string &  objectName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1719 of file Simulator.cpp.

◆ actuateRobotJoints()

void actuateRobotJoints ( const std::string &  robotName,
const NameValueMap &  angles,
const NameValueMap &  velocities,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1325 of file Simulator.cpp.

◆ actuateRobotJointsPos()

void actuateRobotJointsPos ( const std::string &  robotName,
const NameValueMap &  angles,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1334 of file Simulator.cpp.

◆ actuateRobotJointsTorque()

void actuateRobotJointsTorque ( const std::string &  robotName,
const NameValueMap &  torques,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1350 of file Simulator.cpp.

◆ actuateRobotJointsVel()

void actuateRobotJointsVel ( const std::string &  robotName,
const NameValueMap &  velocities,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1342 of file Simulator.cpp.

◆ addBox()

void addBox ( float  width,
float  height,
float  depth,
float  massKG,
const DrawColor &  color,
const std::string &  instanceName,
const PoseBasePtr &  globalPose,
bool  isStatic = false,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1563 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addObject()

void addObject ( const memoryx::ObjectClassBasePtr &  objectClassBase,
const std::string &  instanceName,
const PoseBasePtr &  globalPose,
bool  isStatic = false,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1413 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addObjectFromFile()

void addObjectFromFile ( const armarx::data::PackagePath &  packagePath,
const std::string &  instanceName,
const PoseBasePtr &  globalPose,
bool  isStatic = false,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1490 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addRobot() [1/2]

std::string addRobot ( const std::string &  filename,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2618 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRobot() [2/2]

std::string addRobot ( std::string  robotInstanceName,
const std::string &  robFileGlobal,
Eigen::Matrix4f  gp,
const std::string &  robFile,
double  pid_p = 10.0,
double  pid_i = 0.0,
double  pid_d = 0.0,
bool  isStatic = false,
float  scaling = 1,
bool  colModel = false,
std::map< std::string, float initConfig = std::map<std::string, float>(),
bool  selfCollisions = false 
)
protected

Returns the name. On failure an empty string is returned.

Definition at line 2038 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addRobotFromFile()

std::string addRobotFromFile ( const armarx::data::PackagePath &  packagePath,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2014 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addScaledRobot()

std::string addScaledRobot ( const std::string &  filename,
float  scale,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2589 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addScaledRobotName()

std::string addScaledRobotName ( const std::string &  instanceName,
const std::string &  filename,
float  scale,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2599 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ addSnapshot()

bool addSnapshot ( memoryx::WorkingMemorySnapshotInterfacePrx  snapshotInterfacePrx)

Definition at line 1137 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ applyForceObject()

void applyForceObject ( const std::string &  objectName,
const Vector3BasePtr &  force,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1395 of file Simulator.cpp.

◆ applyForceRobotNode()

void applyForceRobotNode ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  force,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1375 of file Simulator.cpp.

◆ applyTorqueObject()

void applyTorqueObject ( const std::string &  objectName,
const Vector3BasePtr &  torque,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1404 of file Simulator.cpp.

◆ applyTorqueRobotNode()

void applyTorqueRobotNode ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  torque,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1385 of file Simulator.cpp.

◆ createPropertyDefinitions()

PropertyDefinitionsPtr createPropertyDefinitions ( )
inlineoverridevirtual
See also
PropertyUser::createPropertyDefinitions()

Reimplemented from Component.

Definition at line 392 of file Simulator.h.

+ Here is the call graph for this function:

◆ getContacts()

ContactInfoSequence getContacts ( const Ice::Current &  c = Ice::emptyCurrent)
override

Returns a list of all contacts. Note that you must call updateContacts() first to enable contacts handling.

Definition at line 2566 of file Simulator.cpp.

◆ getDefaultName()

std::string getDefaultName ( ) const
overridevirtual

Retrieve default name of component.

Implement this method in each IceManagedObject. The default name of a is used if no name is specified in the factory method.

Returns
default name of the component (e.g. "KinematicUnit")

Implements ManagedIceObject.

Definition at line 270 of file Simulator.cpp.

◆ getDistance()

DistanceInfo getDistance ( const std::string &  robotName,
const std::string &  robotNodeName,
const std::string &  worldObjectName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2170 of file Simulator.cpp.

◆ getFixedTimeStepMS()

int getFixedTimeStepMS ( const Ice::Current &  c = Ice::emptyCurrent)
override
Returns
The number of steps * the timestep in MS

Definition at line 1725 of file Simulator.cpp.

◆ getObjectClassPoses()

ObjectClassInformationSequence getObjectClassPoses ( const std::string &  robotName,
const std::string &  frameName,
const std::string &  className,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2131 of file Simulator.cpp.

◆ getObjectPose()

PoseBasePtr getObjectPose ( const std::string &  objectName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1899 of file Simulator.cpp.

◆ getRobotAngularVelocity()

Vector3BasePtr getRobotAngularVelocity ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1835 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ getRobotForceTorqueSensors()

ForceTorqueDataSeq getRobotForceTorqueSensors ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1771 of file Simulator.cpp.

◆ getRobotJointAngle()

float getRobotJointAngle ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1743 of file Simulator.cpp.

◆ getRobotJointAngles()

NameValueMap getRobotJointAngles ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1737 of file Simulator.cpp.

◆ getRobotJointLimitHi()

float getRobotJointLimitHi ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1785 of file Simulator.cpp.

◆ getRobotJointLimitLo()

float getRobotJointLimitLo ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1777 of file Simulator.cpp.

◆ getRobotJointTorques()

NameValueMap getRobotJointTorques ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1765 of file Simulator.cpp.

◆ getRobotJointVelocities()

NameValueMap getRobotJointVelocities ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1751 of file Simulator.cpp.

◆ getRobotJointVelocity()

float getRobotJointVelocity ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1757 of file Simulator.cpp.

◆ getRobotLinearVelocity()

Vector3BasePtr getRobotLinearVelocity ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1826 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ getRobotMass()

float getRobotMass ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1731 of file Simulator.cpp.

◆ getRobotMaxTorque()

float getRobotMaxTorque ( const std::string &  robotName,
const std::string &  nodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1800 of file Simulator.cpp.

◆ getRobotNames()

Ice::StringSeq getRobotNames ( const Ice::Current &  )
override

Definition at line 1647 of file Simulator.cpp.

◆ getRobotNodeDistance()

DistanceInfo getRobotNodeDistance ( const std::string &  robotName,
const std::string &  robotNodeName1,
const std::string &  robotNodeName2,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2179 of file Simulator.cpp.

◆ getRobotNodePose()

PoseBasePtr getRobotNodePose ( const std::string &  robotName,
const std::string &  robotNodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1817 of file Simulator.cpp.

◆ getRobotPose()

PoseBasePtr getRobotPose ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1793 of file Simulator.cpp.

◆ getRobotState()

SimulatedRobotState getRobotState ( const std::string &  robotName,
const Ice::Current &   
)
override

Definition at line 2628 of file Simulator.cpp.

◆ getScene()

SceneVisuData getScene ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 1932 of file Simulator.cpp.

◆ getSimTime()

float getSimTime ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 1926 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ getSimulatorInformation()

SimulatorInformation getSimulatorInformation ( const ::Ice::Current &  = Ice::emptyCurrent)
override

Definition at line 1941 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ getSpeed()

Ice::Float getSpeed ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2304 of file Simulator.cpp.

◆ getStepTimeMS()

Ice::Int getStepTimeMS ( const ::Ice::Current &  = Ice::emptyCurrent)
override

Definition at line 2310 of file Simulator.cpp.

◆ getTime()

Ice::Long getTime ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2316 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ hasObject()

bool hasObject ( const std::string &  instanceName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2224 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ hasRobot()

bool hasRobot ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1884 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ hasRobotNode()

bool hasRobotNode ( const std::string &  robotName,
const std::string &  robotNodeName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1890 of file Simulator.cpp.

◆ initializeData()

void initializeData ( )
protected

Definition at line 854 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRunning()

bool isRunning ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2359 of file Simulator.cpp.

◆ loadAgentsFromSnapshot()

bool loadAgentsFromSnapshot ( memoryx::WorkingMemorySnapshotInterfacePrx  snapshotInterfacePrx)

Definition at line 1270 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ objectGrasped()

void objectGrasped ( const std::string &  robotName,
const std::string &  robotNodeName,
const std::string &  objectName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

create a joint

Definition at line 1916 of file Simulator.cpp.

◆ objectReleased()

void objectReleased ( const std::string &  robotName,
const std::string &  robotNodeName,
const std::string &  objectName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

remove a joint

Definition at line 1906 of file Simulator.cpp.

◆ onConnectComponent()

void onConnectComponent ( )
overridevirtual

Pure virtual hook for the subclass.

Is called once all dependencies of the object have been resolved and Ice connection is established. This hook is called whenever the dependencies are found. That means if the a depedency crashes or shuts down, the ManagedIceObject goes into disconnected state. When the dependencies are found again, this hook is called again.

See also
onDisconnectComponent()

Implements ManagedIceObject.

Definition at line 981 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ onDisconnectComponent()

void onDisconnectComponent ( )
overridevirtual

Hook for subclass.

Is called if a dependency of the object got lost (crash, network error, stopped, ...). This hook should be the inverse to onConnectComponent(). So that onDisconnectComponent() and onConnectComponent() can be called alternatingly and the ManagedIceObject remains in valid states. *

See also
onConnectComponent

Reimplemented from ManagedIceObject.

Definition at line 1042 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ onExitComponent()

void onExitComponent ( )
overridevirtual

Hook for subclass.

Is called once the component terminates. Use for cleanup. Only called once.

Reimplemented from ManagedIceObject.

Definition at line 1062 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ onInitComponent()

void onInitComponent ( )
overridevirtual

Pure virtual hook for the subclass.

Is called once initialization of the ManagedIceObject is done. This hook is called in the implenting class once and never again during the lifecyle of the object. This function is called as soon as the ManagedIceObject was added to the ArmarXManager. Called in an own thread and not the thread it was created in.

Implements ManagedIceObject.

Definition at line 276 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ pause()

void pause ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2286 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ reInitialize()

void reInitialize ( const Ice::Current &  c = Ice::emptyCurrent)
override

reInitialize Re-initializes the scene. Removes all robots and objects (and, in case the scene was loaded via a MemoryX snapshot, the working memory is cleared) Then, the setup is re-loaded similar to the startup procedure.

Definition at line 2215 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ removeObject()

void removeObject ( const std::string &  instanceName,
const Ice::Current &   
)
override

Definition at line 1656 of file Simulator.cpp.

◆ removeRobot()

bool removeRobot ( const std::string &  robotName,
const Ice::Current &  c = Ice::emptyCurrent 
)

Definition at line 2612 of file Simulator.cpp.

◆ reportDataLoop()

void reportDataLoop ( )
protected

Definition at line 2508 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reportVisuLoop()

void reportVisuLoop ( )
protected

Definition at line 2365 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requestFileManager()

memoryx::GridFileManagerPtr requestFileManager ( )
protected

Definition at line 953 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetData()

void resetData ( bool  clearWorkingMemory = false)
protected

resetData Clears all data

Parameters
clearWorkingMemoryIf set, the working memory is also cleared.

Definition at line 1106 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ run()

void run ( )
override

Definition at line 2248 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ setObjectPose()

void setObjectPose ( const std::string &  objectName,
const PoseBasePtr &  globalPose,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1686 of file Simulator.cpp.

◆ setObjectSimulationType()

void setObjectSimulationType ( const std::string &  objectName,
armarx::SimulationType  type,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1704 of file Simulator.cpp.

◆ setRobotAngularVelocity()

void setRobotAngularVelocity ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  vel,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1854 of file Simulator.cpp.

◆ setRobotAngularVelocityRobotRootFrame()

void setRobotAngularVelocityRobotRootFrame ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  vel,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1874 of file Simulator.cpp.

◆ setRobotLinearVelocity()

void setRobotLinearVelocity ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  vel,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1844 of file Simulator.cpp.

◆ setRobotLinearVelocityRobotRootFrame()

void setRobotLinearVelocityRobotRootFrame ( const std::string &  robotName,
const std::string &  robotNodeName,
const Vector3BasePtr &  vel,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1864 of file Simulator.cpp.

◆ setRobotMaxTorque()

void setRobotMaxTorque ( const std::string &  robotName,
const std::string &  nodeName,
float  maxTorque,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1808 of file Simulator.cpp.

◆ setRobotPose()

void setRobotPose ( const std::string &  robotName,
const PoseBasePtr &  globalPose,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 1358 of file Simulator.cpp.

◆ setSpeed()

void setSpeed ( Ice::Float  newSpeed,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

setSpeed sets the scaling factor for the speed of passing of time e.g.

setSpeed(2) leads to 2 virtual seconds passing every 1 real second (provided the simulation is able to keep up)

Parameters
newSpeednew scaling factor for speed

Definition at line 2298 of file Simulator.cpp.

◆ showContacts()

void showContacts ( bool  enable,
const std::string &  layerName,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Definition at line 2188 of file Simulator.cpp.

◆ shutdownSimulationLoop()

void shutdownSimulationLoop ( )
protected

stop the simulation and join the simulation thread

Definition at line 1087 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ simulationLoop()

void simulationLoop ( )
protected

Definition at line 2125 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ start()

void start ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2230 of file Simulator.cpp.

+ Here is the caller graph for this function:

◆ stateFromRobotInfo()

SimulatedRobotState stateFromRobotInfo ( RobotInfo const &  robot,
IceUtil::Time  timestamp 
)
protected

Definition at line 922 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step()

void step ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2322 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

void stop ( const Ice::Current &  c = Ice::emptyCurrent)
override

Definition at line 2292 of file Simulator.cpp.

+ Here is the call graph for this function:

◆ updateContacts()

void updateContacts ( bool  enable,
const Ice::Current &  c = Ice::emptyCurrent 
)
override

Enables the handling of contacts. If you intend to use getContacts(), call this method with enabled = true first.

Definition at line 2583 of file Simulator.cpp.

◆ updateRobotTopics()

bool updateRobotTopics ( )
protected

Definition at line 2084 of file Simulator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ classInstanceMap

std::map<std::string, std::vector<std::string> > classInstanceMap
protected

Stores all instances that belong to a class.

Definition at line 491 of file Simulator.h.

◆ commonStorageName

std::string commonStorageName
protected

Definition at line 473 of file Simulator.h.

◆ condSimulatorThreadRunning

std::condition_variable condSimulatorThreadRunning
protected

Definition at line 448 of file Simulator.h.

◆ contactLayerName

std::string contactLayerName
protected

Definition at line 486 of file Simulator.h.

◆ currentComTimeMS

float currentComTimeMS = 0
protected

Stores the time that was needed for communictaion.

Definition at line 454 of file Simulator.h.

◆ currentSimTimeMS

float currentSimTimeMS = 0
protected

Stores the time that was needed to perform the last simulation loop.

Definition at line 456 of file Simulator.h.

◆ currentSyncTimeMS

float currentSyncTimeMS = 0
protected

stores the time that was needed to sync the data

Definition at line 458 of file Simulator.h.

◆ entityDrawerPrx

memoryx::EntityDrawerInterfacePrx entityDrawerPrx
protected

Drawing contacts.

Definition at line 483 of file Simulator.h.

◆ fileManager

memoryx::GridFileManagerPtr fileManager
protected

Definition at line 477 of file Simulator.h.

◆ globalRobotLocalization

GlobalRobotPoseLocalizationListenerPrx globalRobotLocalization
protected

Definition at line 465 of file Simulator.h.

◆ lastPublishedContacts

int lastPublishedContacts = 0
protected

Definition at line 488 of file Simulator.h.

◆ longtermMemoryPrx

memoryx::LongtermMemoryInterfacePrx longtermMemoryPrx
protected

Definition at line 476 of file Simulator.h.

◆ memoryPrx

memoryx::WorkingMemoryInterfacePrx memoryPrx
protected

Definition at line 474 of file Simulator.h.

◆ objectFinder

ObjectFinder objectFinder
protected

Constructed once based on the ObjectPackage property.

Definition at line 480 of file Simulator.h.

◆ physicsWorld

SimulatedWorldPtr physicsWorld
protected

Definition at line 450 of file Simulator.h.

◆ priorKnowledgeName

std::string priorKnowledgeName
protected

Definition at line 472 of file Simulator.h.

◆ priorKnowledgePrx

memoryx::PriorKnowledgeInterfacePrx priorKnowledgePrx
protected

Definition at line 475 of file Simulator.h.

◆ publishContacts

bool publishContacts = false
protected

Definition at line 485 of file Simulator.h.

◆ reportDataTask

PeriodicTask<Simulator>::pointer_type reportDataTask
protected

The report data task.

Definition at line 442 of file Simulator.h.

◆ reportRobotPose

bool reportRobotPose = false
protected

Definition at line 466 of file Simulator.h.

◆ reportVisuTask

PeriodicTask<Simulator>::pointer_type reportVisuTask
protected

The report visu task.

Definition at line 440 of file Simulator.h.

◆ reportVisuTimeMS

std::atomic<float> reportVisuTimeMS = 0
protected

Definition at line 470 of file Simulator.h.

◆ simulationTask

PeriodicTask<Simulator>::pointer_type simulationTask
protected

The sim task.

Definition at line 438 of file Simulator.h.

◆ simulatorResetEventTopic

SimulatorResetEventPrx simulatorResetEventTopic
protected

Definition at line 499 of file Simulator.h.

◆ simulatorRunningMutex

std::mutex simulatorRunningMutex
protected

Definition at line 447 of file Simulator.h.

◆ simulatorThreadRunning

bool simulatorThreadRunning = false
protected

Definition at line 445 of file Simulator.h.

◆ simulatorThreadShutdown

bool simulatorThreadShutdown = false
protected

Definition at line 446 of file Simulator.h.

◆ simulatorVisuUpdateListenerPrx

SimulatorListenerInterfacePrx simulatorVisuUpdateListenerPrx
protected

Definition at line 468 of file Simulator.h.

◆ timeserverProxy

SimulatorTimeServerProxyPtr timeserverProxy
protected

Proxy object to offer the Timeserver proxy.

This is a hack to allow offering the proxies "Simulator" and "MasterTimeServer" at once

Definition at line 498 of file Simulator.h.

◆ timeServerSpeed

float timeServerSpeed = 0
protected

Scaling factor for the passing of time.

Definition at line 461 of file Simulator.h.

◆ timeTopicPrx

TimeServerListenerPrx timeTopicPrx
protected

Definition at line 463 of file Simulator.h.


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