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

Robotic base platform description. More...

#include <laeDesc.h>

Public Member Functions

 LaeDescBase ()
 Default constructor.
 
virtual ~LaeDescBase ()
 Destructor.
 
LaeDescBase operator= (const LaeDescBase &rhs)
 Assignment operator. More...
 
void clear ()
 Clear description.
 
void calcDimensions (double fTireRadius, double fTireWidth)
 Calculate robot dimensions. More...
 
virtual void print (int indent=0)
 Print out description to stdout. More...
 

Public Attributes

std::string m_strKey
 base name
 
Dim m_dimRobot
 robot full dimensions(m)
 
Dim m_dimBody
 body dimensions(m)
 
double m_fWheelbase
 wheelbase(m)
 
double m_fWheeltrack
 wheeltrack(m)
 
int m_nNumMotorCtlrs
 number of motor controllers
 
int m_nNumMotors
 number of motors
 

Detailed Description

Robotic base platform description.

A base includes the body, suspension, power supply, and fixed interfaces.

Definition at line 113 of file laeDesc.h.

Member Function Documentation

void LaeDescBase::calcDimensions ( double  fTireRadius,
double  fTireWidth 
)

Calculate robot dimensions.

Parameters
fTireRadiusTire radius (meters).
fTireWidthTire width (meters).

Definition at line 140 of file laeDesc.cxx.

References LaeDimFrontBumper, LaeDimWheelShaftOffset, m_dimBody, m_dimRobot, m_fWheelbase, m_fWheeltrack, laelaps::Dim::m_height, laelaps::Dim::m_length, and laelaps::Dim::m_width.

Referenced by laelaps::LaePlatform::configure(), and LaeDescBase().

141 {
142  //
143  // Robot outer dimensions.
144  //
147  2.0 * fTireWidth;
148 
151  fTireRadius;
152 
155 
156  //
157  // Wheelbase is measured from the centers of rotation of the front and rear
158  // axes.
159  //
162 
163  //
164  // Wheeltrack is measured from the centers of width between the left and right
165  // tires.
166  //
169  fTireWidth;
170 }
double m_fWheelbase
wheelbase(m)
Definition: laeDesc.h:119
double m_length
object length (meters)
Definition: laeUtils.h:529
static const Dim LaeDimFrontBumper(0.025, 0.038, 0.190)
Front bumper dimensions (W x H x L).
double m_height
object height (meters)
Definition: laeUtils.h:528
Dim m_dimBody
body dimensions(m)
Definition: laeDesc.h:118
static const Dim LaeDimWheelShaftOffset(0.005,-0.015,-0.015)
Center of wheel shaft offset from body (dW x dH x dL).
Dim m_dimRobot
robot full dimensions(m)
Definition: laeDesc.h:117
double m_fWheeltrack
wheeltrack(m)
Definition: laeDesc.h:120
double m_width
object width (meters)
Definition: laeUtils.h:527
LaeDescBase LaeDescBase::operator= ( const LaeDescBase rhs)

Assignment operator.

Parameters
rhsRight hand side object.
Returns
this.

Definition at line 116 of file laeDesc.cxx.

References m_dimBody, m_dimRobot, m_fWheelbase, m_fWheeltrack, m_nNumMotorCtlrs, m_nNumMotors, and m_strKey.

117 {
118  m_strKey = rhs.m_strKey;
119  m_dimRobot = rhs.m_dimRobot;
120  m_dimBody = rhs.m_dimBody;
125 
126  return *this;
127 }
double m_fWheelbase
wheelbase(m)
Definition: laeDesc.h:119
int m_nNumMotors
number of motors
Definition: laeDesc.h:122
std::string m_strKey
base name
Definition: laeDesc.h:116
int m_nNumMotorCtlrs
number of motor controllers
Definition: laeDesc.h:121
Dim m_dimBody
body dimensions(m)
Definition: laeDesc.h:118
Dim m_dimRobot
robot full dimensions(m)
Definition: laeDesc.h:117
double m_fWheeltrack
wheeltrack(m)
Definition: laeDesc.h:120
void LaeDescBase::print ( int  indent = 0)
virtual

Print out description to stdout.

Parameters
indentLeft indentation.

Definition at line 172 of file laeDesc.cxx.

References m_dimBody, m_dimRobot, m_fWheelbase, m_fWheeltrack, laelaps::Dim::m_height, laelaps::Dim::m_length, m_nNumMotorCtlrs, m_nNumMotors, m_strKey, and laelaps::Dim::m_width.

Referenced by laelaps::LaeDesc::getProdHwVer(), and laelaps::LaeDesc::print().

173 {
174  printf("%*sPlatform Description =\n", indent, "");
175  printf("%*s{\n", indent, "");
176 
177  printf("%*sKey = %s\n", indent+2, "", m_strKey.c_str());
178 
179  printf("%*sOuter Dimensions =\n", indent+2, "");
180  printf("%*s{\n", indent+2, "");
181  printf("%*sWidth = %.3lf\n", indent+4, "", m_dimRobot.m_width);
182  printf("%*sHeight = %.3lf\n", indent+4, "", m_dimRobot.m_height);
183  printf("%*sLength = %.3lf\n", indent+4, "", m_dimRobot.m_length);
184  printf("%*s}\n", indent+2, "");
185 
186  printf("%*sBody Dimensions =\n", indent+2, "");
187  printf("%*s{\n", indent+2, "");
188  printf("%*sWidth = %.3lf\n", indent+4, "", m_dimBody.m_width);
189  printf("%*sHeight = %.3lf\n", indent+4, "", m_dimBody.m_height);
190  printf("%*sLength = %.3lf\n", indent+4, "", m_dimBody.m_length);
191  printf("%*s}\n", indent+2, "");
192 
193  printf("%*sWheelbase = %.3lf\n", indent+2, "", m_fWheelbase);
194  printf("%*sWheeltrack = %.3lf\n", indent+2, "", m_fWheeltrack);
195  printf("%*sNumber of Motors Ctlrs = %d\n", indent+2, "", m_nNumMotorCtlrs);
196  printf("%*sNumber of Motors = %d\n", indent+2, "", m_nNumMotors);
197 
198  printf("%*s}\n", indent, "");
199 }
double m_fWheelbase
wheelbase(m)
Definition: laeDesc.h:119
int m_nNumMotors
number of motors
Definition: laeDesc.h:122
double m_length
object length (meters)
Definition: laeUtils.h:529
std::string m_strKey
base name
Definition: laeDesc.h:116
int m_nNumMotorCtlrs
number of motor controllers
Definition: laeDesc.h:121
double m_height
object height (meters)
Definition: laeUtils.h:528
Dim m_dimBody
body dimensions(m)
Definition: laeDesc.h:118
Dim m_dimRobot
robot full dimensions(m)
Definition: laeDesc.h:117
double m_fWheeltrack
wheeltrack(m)
Definition: laeDesc.h:120
double m_width
object width (meters)
Definition: laeUtils.h:527

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