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

#include <RcsPyBot.h>

Inheritance diagram for Rcs::RcsPyBot:
Collaboration diagram for Rcs::RcsPyBot:

Public Member Functions

 RcsPyBot (PropertySource *propertySource)
 
virtual ~RcsPyBot ()
 
 RcsPyBot (const RcsPyBot &)=delete
 
RcsPyBotoperator= (const RcsPyBot &)=delete
 
 RcsPyBot (RcsPyBot &&)=delete
 
RcsPyBotoperator= (RcsPyBot &&)=delete
 
ExperimentConfiggetConfig ()
 
void setControlPolicy (ControlPolicy *controlPolicy, const MatNd *q_des=nullptr)
 
void syncGraphsToCurrent ()
 
ControlPolicygetControlPolicy () const
 
MatNd * getObservation () const
 
MatNd * getAction () const
 

Public Attributes

DataLogger logger
 
Rcs::SecondOrderLPFND * homePoseFilt
 

Protected Member Functions

virtual void updateControl ()
 

Protected Attributes

std::mutex controlPolicyMutex
 
ExperimentConfigconfig
 
bool allJointsPosCtrl
 
ControlPolicycontrolPolicy
 
MatNd * q_ctrl
 
MatNd * qd_ctrl
 
MatNd * T_ctrl
 
MatNd * observation
 
MatNd * action
 

Detailed Description

Definition at line 51 of file RcsPyBot.h.

Constructor & Destructor Documentation

◆ RcsPyBot() [1/3]

Rcs::RcsPyBot::RcsPyBot ( PropertySource propertySource)
explicit

Create the bot from the given property source.

Parameters
propertySourceconfiguration

Definition at line 66 of file RcsPyBot.cpp.

◆ ~RcsPyBot()

Rcs::RcsPyBot::~RcsPyBot ( )
virtual

Definition at line 107 of file RcsPyBot.cpp.

◆ RcsPyBot() [2/3]

Rcs::RcsPyBot::RcsPyBot ( const RcsPyBot )
delete

◆ RcsPyBot() [3/3]

Rcs::RcsPyBot::RcsPyBot ( RcsPyBot &&  )
delete

Member Function Documentation

◆ getAction()

MatNd * Rcs::RcsPyBot::getAction ( ) const

Get storage matrix for current action.

WARNING: the contents may update asynchronously. The dimensions are constant.

Definition at line 201 of file RcsPyBot.cpp.

◆ getConfig()

ExperimentConfig* Rcs::RcsPyBot::getConfig ( )
inline

Definition at line 65 of file RcsPyBot.h.

◆ getControlPolicy()

ControlPolicy* Rcs::RcsPyBot::getControlPolicy ( ) const
inline

Definition at line 77 of file RcsPyBot.h.

◆ getObservation()

MatNd * Rcs::RcsPyBot::getObservation ( ) const

Get storage matrix for current observation.

WARNING: the contents may update asynchronously. The dimensions are constant.

Definition at line 196 of file RcsPyBot.cpp.

◆ operator=() [1/2]

RcsPyBot& Rcs::RcsPyBot::operator= ( RcsPyBot &&  )
delete

◆ operator=() [2/2]

RcsPyBot& Rcs::RcsPyBot::operator= ( const RcsPyBot )
delete

◆ setControlPolicy()

void Rcs::RcsPyBot::setControlPolicy ( ControlPolicy controlPolicy,
const MatNd *  q_des = nullptr 
)

Replace the control policy. This method may be called while the bot is running. Setting controlPolicy tonullptr and q_des to a joint config causes the bot to go to this configuration. Does not take ownership.

Definition at line 129 of file RcsPyBot.cpp.

◆ syncGraphsToCurrent()

void Rcs::RcsPyBot::syncGraphsToCurrent ( )

Definition at line 206 of file RcsPyBot.cpp.

◆ updateControl()

void Rcs::RcsPyBot::updateControl ( )
protectedvirtual

Definition at line 156 of file RcsPyBot.cpp.

Member Data Documentation

◆ action

MatNd* Rcs::RcsPyBot::action
protected

Definition at line 122 of file RcsPyBot.h.

◆ allJointsPosCtrl

bool Rcs::RcsPyBot::allJointsPosCtrl
protected

Definition at line 111 of file RcsPyBot.h.

◆ config

ExperimentConfig* Rcs::RcsPyBot::config
protected

Experiment configuration.

Definition at line 110 of file RcsPyBot.h.

◆ controlPolicy

ControlPolicy* Rcs::RcsPyBot::controlPolicy
protected

Control policy.

Definition at line 114 of file RcsPyBot.h.

◆ controlPolicyMutex

std::mutex Rcs::RcsPyBot::controlPolicyMutex
mutableprotected

Control policy mutex (mutable to allow using it from const functions)

Definition at line 107 of file RcsPyBot.h.

◆ homePoseFilt

Rcs::SecondOrderLPFND* Rcs::RcsPyBot::homePoseFilt

Filter for going to the home pose.

Definition at line 101 of file RcsPyBot.h.

◆ logger

DataLogger Rcs::RcsPyBot::logger

Data logger.

Definition at line 84 of file RcsPyBot.h.

◆ observation

MatNd* Rcs::RcsPyBot::observation
protected

Definition at line 121 of file RcsPyBot.h.

◆ q_ctrl

MatNd* Rcs::RcsPyBot::q_ctrl
protected

Temporary matrices.

Definition at line 117 of file RcsPyBot.h.

◆ qd_ctrl

MatNd* Rcs::RcsPyBot::qd_ctrl
protected

Definition at line 118 of file RcsPyBot.h.

◆ T_ctrl

MatNd* Rcs::RcsPyBot::T_ctrl
protected

Definition at line 119 of file RcsPyBot.h.


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