RcsPySim
A robot control and simulation library
Rcs::PhysicsSimulationComponent Class Reference

#include <PhysicsSimulationComponent.h>

Inheritance diagram for Rcs::PhysicsSimulationComponent:
Collaboration diagram for Rcs::PhysicsSimulationComponent:

Public Member Functions

 PhysicsSimulationComponent (RcsGraph *graph, const char *engine="Bullet", const char *physicsCfgFile=NULL)
 
 PhysicsSimulationComponent (PhysicsBase *sim)
 
virtual ~PhysicsSimulationComponent ()
 
virtual void updateGraph (RcsGraph *graph)
 
virtual void setCommand (const MatNd *q_des, const MatNd *qp_des, const MatNd *T_des)
 
virtual void tare ()
 
virtual void setEnablePPS (bool enable)
 
virtual const char * getName () const
 
virtual double getCallbackUpdatePeriod () const
 
virtual double getLastUpdateTime () const
 
virtual void getLastPositionCommand (MatNd *q_des) const
 
virtual void setFeedForward (bool ffwd)
 
virtual PhysicsBase * getPhysicsSimulation () const
 
virtual int sprint (char *str, size_t size) const
 
virtual void start (double updateFreq=10.0, int prio=50)
 
virtual void setMutex (pthread_mutex_t *mtx)
 
virtual double getStartTime () const
 
bool startThread ()
 
bool stopThread ()
 

Private Member Functions

virtual void callback ()
 
void lock ()
 
void unlock ()
 

Private Attributes

RcsGraph * currentGraph
 
double dt
 
double dtSim
 
double tStart
 
PhysicsBase * sim
 
pthread_mutex_t * mtx
 
bool ffwd
 

Detailed Description

Definition at line 42 of file PhysicsSimulationComponent.h.

Constructor & Destructor Documentation

◆ PhysicsSimulationComponent() [1/2]

Rcs::PhysicsSimulationComponent::PhysicsSimulationComponent ( RcsGraph *  graphCurr,
const char *  engine = "Bullet",
const char *  cfgFile = NULL 
)

Constructor

Definition at line 43 of file PhysicsSimulationComponent.cpp.

◆ PhysicsSimulationComponent() [2/2]

Rcs::PhysicsSimulationComponent::PhysicsSimulationComponent ( PhysicsBase *  sim)

Definition at line 71 of file PhysicsSimulationComponent.cpp.

◆ ~PhysicsSimulationComponent()

Rcs::PhysicsSimulationComponent::~PhysicsSimulationComponent ( )
virtual

Definition at line 90 of file PhysicsSimulationComponent.cpp.

Member Function Documentation

◆ callback()

void Rcs::PhysicsSimulationComponent::callback ( )
privatevirtual

Definition at line 210 of file PhysicsSimulationComponent.cpp.

◆ getCallbackUpdatePeriod()

double Rcs::PhysicsSimulationComponent::getCallbackUpdatePeriod ( ) const
virtual

Definition at line 194 of file PhysicsSimulationComponent.cpp.

◆ getLastPositionCommand()

void Rcs::PhysicsSimulationComponent::getLastPositionCommand ( MatNd *  q_des) const
virtual

Definition at line 218 of file PhysicsSimulationComponent.cpp.

◆ getLastUpdateTime()

double Rcs::PhysicsSimulationComponent::getLastUpdateTime ( ) const
virtual

Definition at line 202 of file PhysicsSimulationComponent.cpp.

◆ getName()

const char * Rcs::PhysicsSimulationComponent::getName ( ) const
virtual

Definition at line 186 of file PhysicsSimulationComponent.cpp.

◆ getPhysicsSimulation()

Rcs::PhysicsBase * Rcs::PhysicsSimulationComponent::getPhysicsSimulation ( ) const
virtual

Definition at line 226 of file PhysicsSimulationComponent.cpp.

◆ getStartTime()

double Rcs::PhysicsSimulationComponent::getStartTime ( ) const
virtual

Definition at line 251 of file PhysicsSimulationComponent.cpp.

◆ lock()

void Rcs::PhysicsSimulationComponent::lock ( )
private

Definition at line 117 of file PhysicsSimulationComponent.cpp.

◆ setCommand()

void Rcs::PhysicsSimulationComponent::setCommand ( const MatNd *  q_des,
const MatNd *  qp_des,
const MatNd *  T_des 
)
virtual

Definition at line 160 of file PhysicsSimulationComponent.cpp.

◆ setEnablePPS()

void Rcs::PhysicsSimulationComponent::setEnablePPS ( bool  enable)
virtual

Definition at line 178 of file PhysicsSimulationComponent.cpp.

◆ setFeedForward()

void Rcs::PhysicsSimulationComponent::setFeedForward ( bool  ffwd)
virtual

Definition at line 243 of file PhysicsSimulationComponent.cpp.

◆ setMutex()

void Rcs::PhysicsSimulationComponent::setMutex ( pthread_mutex_t *  mtx)
virtual

Definition at line 109 of file PhysicsSimulationComponent.cpp.

◆ sprint()

int Rcs::PhysicsSimulationComponent::sprint ( char *  str,
size_t  size 
) const
virtual

Definition at line 234 of file PhysicsSimulationComponent.cpp.

◆ start()

void Rcs::PhysicsSimulationComponent::start ( double  updateFreq = 10.0,
int  prio = 50 
)
virtual

Definition at line 99 of file PhysicsSimulationComponent.cpp.

◆ startThread()

bool Rcs::PhysicsSimulationComponent::startThread ( )

Definition at line 256 of file PhysicsSimulationComponent.cpp.

◆ stopThread()

bool Rcs::PhysicsSimulationComponent::stopThread ( )

Definition at line 262 of file PhysicsSimulationComponent.cpp.

◆ tare()

void Rcs::PhysicsSimulationComponent::tare ( )
virtual

Definition at line 171 of file PhysicsSimulationComponent.cpp.

◆ unlock()

void Rcs::PhysicsSimulationComponent::unlock ( )
private

Definition at line 127 of file PhysicsSimulationComponent.cpp.

◆ updateGraph()

void Rcs::PhysicsSimulationComponent::updateGraph ( RcsGraph *  graph)
virtual

Definition at line 137 of file PhysicsSimulationComponent.cpp.

Member Data Documentation

◆ currentGraph

RcsGraph* Rcs::PhysicsSimulationComponent::currentGraph
private

Definition at line 95 of file PhysicsSimulationComponent.h.

◆ dt

double Rcs::PhysicsSimulationComponent::dt
private

Definition at line 96 of file PhysicsSimulationComponent.h.

◆ dtSim

double Rcs::PhysicsSimulationComponent::dtSim
private

Definition at line 96 of file PhysicsSimulationComponent.h.

◆ ffwd

bool Rcs::PhysicsSimulationComponent::ffwd
private

Definition at line 99 of file PhysicsSimulationComponent.h.

◆ mtx

pthread_mutex_t* Rcs::PhysicsSimulationComponent::mtx
private

Definition at line 98 of file PhysicsSimulationComponent.h.

◆ sim

PhysicsBase* Rcs::PhysicsSimulationComponent::sim
private

Definition at line 97 of file PhysicsSimulationComponent.h.

◆ tStart

double Rcs::PhysicsSimulationComponent::tStart
private

Definition at line 96 of file PhysicsSimulationComponent.h.


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