Privacy
An open-source, flexible 3D physical simulation framework
mars::interfaces::MotorData Class Reference

MotorData is a struct to exchange motor information between the GUI and the simulation. More...

#include <MotorData.h>

Public Member Functions

 MotorData (const std::string &name="", MotorType type=MOTOR_TYPE_UNDEFINED)
 
void init (const std::string &name="", MotorType type=MOTOR_TYPE_UNDEFINED)
 initialize motor struct with zero values. More...
 
bool fromConfigMap (configmaps::ConfigMap *config, std::string filenamePrefix, LoadCenter *loadCenter=0)
 
void toConfigMap (configmaps::ConfigMap *config, bool skipFilenamePrefix=false)
 
void getFilesToSave (std::vector< std::string > *fileList)
 

Static Public Member Functions

static std::map< std::string, std::string > init_legacynames ()
 

Public Attributes

std::string name
 
unsigned long index
 
unsigned long jointIndex
 
unsigned long jointIndex2
 
int axis
 
sReal maxSpeed
 
sReal maxEffort
 
sReal maxAcceleration
 
MotorType type
 
sReal p
 
sReal i
 
sReal d
 
sReal value
 
sReal maxValue
 
sReal minValue
 
configmaps::ConfigMap config
 

Static Public Attributes

static std::map< std::string, std::string > legacynames = init_legacynames()
 

Detailed Description

MotorData is a struct to exchange motor information between the GUI and the simulation.

Definition at line 37 of file MotorData.h.

Constructor & Destructor Documentation

◆ MotorData()

mars::interfaces::MotorData::MotorData ( const std::string &  name = "",
MotorType  type = MOTOR_TYPE_UNDEFINED 
)
explicit

Definition at line 47 of file MotorData.cpp.

Member Function Documentation

◆ fromConfigMap()

bool mars::interfaces::MotorData::fromConfigMap ( configmaps::ConfigMap config,
std::string  filenamePrefix,
LoadCenter loadCenter = 0 
)

Definition at line 95 of file MotorData.cpp.

◆ getFilesToSave()

void mars::interfaces::MotorData::getFilesToSave ( std::vector< std::string > *  fileList)

Definition at line 170 of file MotorData.cpp.

◆ init()

void mars::interfaces::MotorData::init ( const std::string &  name = "",
MotorType  type = MOTOR_TYPE_UNDEFINED 
)

initialize motor struct with zero values.

mainly kept for compatibility with ZERO_MOTOR_STRUCT macro

Definition at line 77 of file MotorData.cpp.

◆ init_legacynames()

static std::map<std::string, std::string> mars::interfaces::MotorData::init_legacynames ( )
inlinestatic

Definition at line 75 of file MotorData.h.

◆ toConfigMap()

void mars::interfaces::MotorData::toConfigMap ( configmaps::ConfigMap config,
bool  skipFilenamePrefix = false 
)

Definition at line 144 of file MotorData.cpp.

Member Data Documentation

◆ axis

int mars::interfaces::MotorData::axis

Definition at line 60 of file MotorData.h.

◆ config

configmaps::ConfigMap mars::interfaces::MotorData::config

Definition at line 71 of file MotorData.h.

◆ d

sReal mars::interfaces::MotorData::d

Definition at line 67 of file MotorData.h.

◆ i

sReal mars::interfaces::MotorData::i

Definition at line 66 of file MotorData.h.

◆ index

unsigned long mars::interfaces::MotorData::index

Definition at line 58 of file MotorData.h.

◆ jointIndex

unsigned long mars::interfaces::MotorData::jointIndex

Definition at line 59 of file MotorData.h.

◆ jointIndex2

unsigned long mars::interfaces::MotorData::jointIndex2

Definition at line 59 of file MotorData.h.

◆ legacynames

std::map< std::string, std::string > mars::interfaces::MotorData::legacynames = init_legacynames()
static

Definition at line 73 of file MotorData.h.

◆ maxAcceleration

sReal mars::interfaces::MotorData::maxAcceleration

Definition at line 63 of file MotorData.h.

◆ maxEffort

sReal mars::interfaces::MotorData::maxEffort

Definition at line 62 of file MotorData.h.

◆ maxSpeed

sReal mars::interfaces::MotorData::maxSpeed

Definition at line 61 of file MotorData.h.

◆ maxValue

sReal mars::interfaces::MotorData::maxValue

Definition at line 69 of file MotorData.h.

◆ minValue

sReal mars::interfaces::MotorData::minValue

Definition at line 70 of file MotorData.h.

◆ name

std::string mars::interfaces::MotorData::name

Definition at line 57 of file MotorData.h.

◆ p

sReal mars::interfaces::MotorData::p

Definition at line 65 of file MotorData.h.

◆ type

MotorType mars::interfaces::MotorData::type

Definition at line 64 of file MotorData.h.

◆ value

sReal mars::interfaces::MotorData::value

Definition at line 68 of file MotorData.h.


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