Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laelaps::LaeDescPowertrain Class Reference

Robotic powertrain description. More...

#include <laeDesc.h>

Public Member Functions

 LaeDescPowertrain ()
 Default constructor.
 
 LaeDescPowertrain (const std::string &strKey)
 Initialization constructor.
 
virtual ~LaeDescPowertrain ()
 Destructor.
 
LaeDescPowertrain operator= (const LaeDescPowertrain &rhs)
 Assignment operator. More...
 
void clear ()
 Clear description.
 
virtual void print (int indent=0)
 Print out description to stdout. More...
 

Public Attributes

std::string m_strKey
 powertrain key
 
int m_nMotorId
 unique robot motor id
 
int m_nMotorCtlrId
 unique motor controller id
 
int m_nMotorIndex
 motor controller unique motor index
 
LaeJointType m_eJointType
 powertrain joint type
 
LaeEncType m_eEncType
 encoder type
 
double m_fGearRatio
 motor gear ratio
 
int m_nDir
 normalize cw/ccw direction.
 

Detailed Description

Robotic powertrain description.

A powertrain includes the motor and drivetrain. The drivetrain is the group of components that deliver power to the driving wheel(s) including encoders, gears, axles, wheels, and tires.

Definition at line 177 of file laeDesc.h.

Member Function Documentation

LaeDescPowertrain LaeDescPowertrain::operator= ( const LaeDescPowertrain rhs)

Assignment operator.

Parameters
rhsRight hand side object.
Returns
this.

Definition at line 255 of file laeDesc.cxx.

References m_eEncType, m_eJointType, m_fGearRatio, m_nDir, m_nMotorCtlrId, m_nMotorId, m_nMotorIndex, laelaps::LaeDescBase::m_strKey, and m_strKey.

256 {
257  m_strKey = rhs.m_strKey;
258  m_nMotorId = rhs.m_nMotorId;
262  m_eEncType = rhs.m_eEncType;
264  m_nDir = rhs.m_nDir;
265 
266  return *this;
267 }
LaeEncType m_eEncType
encoder type
Definition: laeDesc.h:185
LaeJointType m_eJointType
powertrain joint type
Definition: laeDesc.h:184
int m_nDir
normalize cw/ccw direction.
Definition: laeDesc.h:187
int m_nMotorId
unique robot motor id
Definition: laeDesc.h:181
double m_fGearRatio
motor gear ratio
Definition: laeDesc.h:186
int m_nMotorCtlrId
unique motor controller id
Definition: laeDesc.h:182
std::string m_strKey
powertrain key
Definition: laeDesc.h:180
int m_nMotorIndex
motor controller unique motor index
Definition: laeDesc.h:183
void LaeDescPowertrain::print ( int  indent = 0)
virtual

Print out description to stdout.

Parameters
indentLeft indentation.

Definition at line 281 of file laeDesc.cxx.

References laelaps::LaeDescBase::m_strKey.

282 {
283  printf("%*sPowertrain[%s] Description =\n", indent, "", m_strKey.c_str());
284  printf("%*s{\n", indent, "");
285  printf("%*sKey = %s\n", indent+2, "", m_strKey.c_str());
286  printf("%*sMotor Id = %d\n", indent+2, "", m_nMotorId);
287  printf("%*sMotor Ctlr Id = %d\n", indent+2, "", m_nMotorCtlrId);
288  printf("%*sMotor Index = %d\n", indent+2, "", m_nMotorIndex);
289  printf("%*sJoint Type = %d\n", indent+2, "", m_eJointType);
290  printf("%*sEncoder Type = 0x%02x\n", indent+2, "", m_eEncType);
291  printf("%*sDirection = %d\n", indent+2, "", m_nDir);
292  printf("%*s}\n", indent, "");
293 }
LaeEncType m_eEncType
encoder type
Definition: laeDesc.h:185
LaeJointType m_eJointType
powertrain joint type
Definition: laeDesc.h:184
int m_nDir
normalize cw/ccw direction.
Definition: laeDesc.h:187
int m_nMotorId
unique robot motor id
Definition: laeDesc.h:181
int m_nMotorCtlrId
unique motor controller id
Definition: laeDesc.h:182
std::string m_strKey
powertrain key
Definition: laeDesc.h:180
int m_nMotorIndex
motor controller unique motor index
Definition: laeDesc.h:183

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