AURobotServers  4
Public Member Functions | List of all members
UPosRot Class Reference

#include <uposrot.h>

Inheritance diagram for UPosRot:
Inheritance graph

Public Member Functions

void clear ()
 
UPlane getCamToRobPlane (UPlane plane)
 Convert this plane from camera to robot coordinates. Assumes that this pose is the camera pose relative to the robot. More...
 
virtual const char * getDataType ()
 
double getKappa ()
 
UMatrix4 getMtoRMatrix ()
 
double getOmega ()
 
double getPhi ()
 
UPositiongetPos ()
 
UPosRotgetPosRot ()
 
UPlane getRobToCamPlane (UPlane plane)
 Convert this plane from robot to camera coordinates. Assumes that this pose is the camera pose relative to the robot. More...
 
URotationgetRot ()
 
UMatrix4 getRtoMMatrix ()
 
double getTheta ()
 
double getX ()
 
double getY ()
 
double getZ ()
 
UPosition pos ()
 
void print (const char *prestring)
 
URotation rot ()
 
void set (UPosition pos, URotation rot)
 
void set (double x, double y, double z, double Omega, double Phi, double Kappa)
 
void setCtoR (UPosRot *camera, UPosRot *guidemark, bool mirror)
 
void setFromPose (double x, double y, double h)
 
void setKappa (double value)
 
void setOmega (double value)
 
void setPhi (double value)
 
void setPos (UPosition pos)
 
void setRot (URotation rot)
 
void setRtoC (UPosRot *camera, UPosRot *guidemark)
 
void setTheta (double value)
 
void setX (double value)
 
void setY (double value)
 
void setZ (double value)
 
 UPosRot ()
 
 ~UPosRot ()
 
- Public Member Functions inherited from UPosition
void add (const UPosition *pos)
 
void add (const UPosition pos)
 
void add (const double ix, const double iy, const double iz)
 
UPosition added (UPosition *pos)
 
UPosition added (UPosition pos)
 
UMatrix4 asCol3 ()
 
UMatrix4 asCol4 ()
 
UMatrix4 asMatrix4x4 ()
 
UMatrix4 asRow3 ()
 
UMatrix4 asRow4 ()
 
UMatrix4 asVector3 (bool column)
 
UMatrix4 asVector4 (bool column)
 
void clear (void)
 
virtual const char * codeXml (char *buf, const int bufCnt, const char *extraAttr)
 
virtual const char * codeXml (const char *name, char *buf, const int bufCnt, const char *extraAttr)
 
int copy (UMatrix4 *pos)
 
int copy (const URotation *rot)
 
UPosition cross (UPosition p2)
 
void cross (UPosition p1, UPosition p2)
 
double dist (const UPosition *pTo)
 
double dist (UPosition To)
 
double dist ()
 
double distSq (const UPosition *pTo)
 
double distSq ()
 
double distXY ()
 
double distXY (UPosition p2)
 
double dot (UPosition p2)
 
double get (int idx)
 
UMatrix4 getPixelPos (UMatrix4 *A, UMatrix4 *b)
 
UPositiongetPos ()
 
UPosition getTangentPointXY (const UPosition centre, const double radius, const bool rightSide, bool *valid, double *ang=NULL)
 
bool load (const char *valueString)
 
int LoadFromReg (Uconfig *ini, const char *subject, const char *key)
 
UPosition operator* (const double scalar)
 
void operator*= (const double scalar)
 
UPosition operator+ (UPosition pos)
 
void operator+= (const UPosition pos)
 
UPosition operator- (UPosition pos)
 
void operator-= (const UPosition pos)
 
UPosition operator= (UMatrix4 vec)
 
UPosition operator= (const URotation rot)
 
UPosition operator= (const U2Dpos val)
 
void print (const char *leadString)
 
void println (const char *leadString)
 
bool save (FILE *fmap, const char *key)
 
int SaveToReg (Uconfig *ini, const char *subject, const char *key)
 
void scale (const double val)
 
UPosition scaled (const double val)
 
void set (const double ix, const double iy, const double iz)
 
void set (const int idx, const double value)
 
void setPos (UPosition fromPos)
 
void show (const char *leadString)
 
virtual void snprint (const char *leadString, char *s, const int bufferLength)
 
void sprint (char *s, const char *leadString)
 
void subtract (const UPosition *pos)
 
UPosition subtracted (UPosition *pos)
 
UPosition subtracted (UPosition pos)
 
int toUnitVector ()
 
void transfer (UMatrix4 *mA)
 
UPosition transferred (UMatrix4 *mA)
 
 UPosition ()
 
 UPosition (double ix, double iy, double iz)
 
 UPosition (double ix, double iy)
 
virtual ~UPosition ()
 
- Public Member Functions inherited from UDataBase
bool isA (const char *typeString)
 
virtual bool isAlsoA (const char *typeString)
 
 UDataBase ()
 
virtual ~UDataBase ()
 
- Public Member Functions inherited from URotation
void add (URotation *rot)
 
void add (URotation rot)
 
void add (double iOmega, double iPhi, double iKappa)
 
URotation added (URotation *rot)
 
UMatrix4 asMatrix3x3CtoW ()
 
UMatrix4 asMatrix3x3K ()
 
UMatrix4 asMatrix3x3Kt ()
 
UMatrix4 asMatrix3x3MtoR ()
 
UMatrix4 asMatrix3x3O ()
 
UMatrix4 asMatrix3x3Ot ()
 
UMatrix4 asMatrix3x3P ()
 
UMatrix4 asMatrix3x3Pt ()
 
UMatrix4 asMatrix3x3RtoM ()
 
UMatrix4 asMatrix3x3WtoC ()
 
UMatrix4 asMatrix4x4CtoW ()
 
UMatrix4 asMatrix4x4CtoW (UPosition *pos)
 
UMatrix4 asMatrix4x4MtoR ()
 
UMatrix4 asMatrix4x4MtoR (UPosition *pos)
 
UMatrix4 asMatrix4x4MtoR (UPosition pos)
 
UMatrix4 asMatrix4x4RtoM ()
 
UMatrix4 asMatrix4x4RtoM (UPosition *pos)
 
UMatrix4 asMatrix4x4RtoM (UPosition pos)
 
UMatrix4 asMatrix4x4WtoC ()
 
UMatrix4 asMatrix4x4WtoC (UPosition *pos)
 
UMatrix4 asUnitZVector3CtoW ()
 
UMatrix4 asUnitZVector4CtoW ()
 
UMatrix4 asVector3 ()
 
UMatrix4 asVector4 ()
 
void clear (void)
 
virtual const char * codeXml (char *buff, const int buffCnt, const char *extra)
 
virtual const char * codeXml (const char *name, char *buff, const int buffCnt, const char *extra)
 
int copy (UMatrix4 *rot)
 
int copy (UPosition *pos)
 
URotationgetRot ()
 
void LimitToPi ()
 
void limitToPi ()
 
bool load (const char *valueString)
 
int LoadFromReg (Uconfig *ini, const char *subject, const char *key)
 
URotation operator* (double val)
 
void operator*= (double val)
 
URotation operator+ (URotation rot)
 
void operator+= (URotation rot)
 
URotation operator- (URotation rot)
 
void operator-= (URotation rot)
 
URotation operator= (UMatrix4 vec)
 
URotation operator= (UPosition pos)
 
void print (const char *leadString)
 
bool save (FILE *fmap, const char *key)
 
int SaveToReg (Uconfig *ini, const char *subject, const char *key)
 
void scale (double val)
 
URotation scaled (double val)
 
void set (double iOmega, double iPhi, double iKappa)
 
void setFromYZ (UPosition posY, UPosition posZ)
 
void setRot (URotation rot)
 
void show (const char *leadString)
 
void snprint (const char *leadString, bool inDegree, char *s, const int bufferLength)
 
void sprint (char *s, const char *leadString, bool inDegree=true)
 
void subtract (URotation *rot)
 
URotation subtracted (URotation *rot)
 
 URotation ()
 
 URotation (double iOmega, double iPhi, double iKappa)
 
virtual ~URotation ()
 

Additional Inherited Members

- Static Public Member Functions inherited from UPosition
static UPosition position (double ix, double iy, double iz)
 
- Public Attributes inherited from UPosition
double x
 
double y
 
double z
 
- Public Attributes inherited from URotation
double Kappa
 
double Omega
 
double Phi
 

Detailed Description

A combination of position and orientation in 3D. This could describe an oriented coordinate system, where the position is that translation and the rotation is the rotation relative to a reference system.

Author
Christian Andersen

Constructor & Destructor Documentation

UPosRot::UPosRot ( )

Constructor

UPosRot::~UPosRot ( )

Destructor

Member Function Documentation

void UPosRot::clear ( void  )
inline

Clear all values

References UPosition::clear(), and URotation::clear().

Referenced by UResLaserIfSf::handleSF(), and UPcpItem::UPcpItem().

UPlane UPosRot::getCamToRobPlane ( UPlane  plane)

Convert this plane from camera to robot coordinates. Assumes that this pose is the camera pose relative to the robot.

Parameters
planeis the plane to convert.
Returns
the same plane in robot coordinates.

References getMtoRMatrix(), UPlane::getOnPlane(), getRtoMMatrix(), and UPlane::set().

Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), and setTheta().

virtual const char* UPosRot::getDataType ( )
inlinevirtual

Get (end) type of this structure

Reimplemented from UPosition.

double UPosRot::getKappa ( )
inline

Get kappa - rotation on z-axis (in radians)

References URotation::Kappa.

Referenced by UFunctionLaser::handleSetCommand().

UMatrix4 UPosRot::getMtoRMatrix ( )
inline

Get conversion matrix, that can convert a 3D position from a global coordinate system to the local coordinate system, when this posRot is the position of the local coordinate system in the global. Returns a UMatrix4 value

References URotation::asMatrix4x4MtoR(), getPos(), print(), setCtoR(), and setRtoC().

Referenced by UNamedBoxes::doDetect(), getCamToRobPlane(), UCamMounted::getMtoPix(), getRobToCamPlane(), setRtoC(), and testUPosRot().

double UPosRot::getOmega ( )
inline

Get omega - rotation on x-axis (in radians)

References URotation::Omega.

Referenced by UFunctionLaser::handleSetCommand().

double UPosRot::getPhi ( )
inline

Get phi - rotation on y-axis (in radians)

References URotation::Phi.

Referenced by ULaserMeasurement::clear(), UFunctionLaser::handleSetCommand(), ULaserData::setFakeDataRad(), and ULaserScan::setScan().

UPosition* UPosRot::getPos ( )
inline
UPosRot* UPosRot::getPosRot ( )
inline
UPlane UPosRot::getRobToCamPlane ( UPlane  plane)

Convert this plane from robot to camera coordinates. Assumes that this pose is the camera pose relative to the robot.

Parameters
planeis the plane to convert.
Returns
the same plane in camera coordinates.

References getMtoRMatrix(), UPlane::getOnPlane(), getRtoMMatrix(), and UPlane::set().

Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), and setTheta().

URotation* UPosRot::getRot ( )
inline
UMatrix4 UPosRot::getRtoMMatrix ( )
inline
double UPosRot::getTheta ( )
inline

Get Theta (same as kappa) - rotation on z-axis (in radians)

References URotation::Kappa.

double UPosRot::getX ( )
inline
double UPosRot::getY ( )
inline
double UPosRot::getZ ( )
inline
UPosition UPosRot::pos ( )
inline
void UPosRot::print ( const char *  prestring)
URotation UPosRot::rot ( )
inline

Get rotation only

References URotation::getRot().

Referenced by UGmk::getCode(), UCamMounted::getRot(), set(), setCtoR(), and setRtoC().

void UPosRot::set ( UPosition  pos,
URotation  rot 
)
inline
void UPosRot::set ( double  x,
double  y,
double  z,
double  Omega,
double  Phi,
double  Kappa 
)
inline

Set directly from 6 values

References URotation::Kappa, UPosition::set(), and URotation::set().

void UPosRot::setCtoR ( UPosRot camera,
UPosRot guidemark,
bool  mirror 
)

Convert this (guidemark) position and Rotation to map coordinates, when thw guidemark is seen from this (camera) position. If mirror is true, the guidemark is rotated to face the camera. Otherwise it is assumed to face the camera already (the values are not inspected).

References getPos(), getRtoMMatrix(), rot(), UPosition::set(), URotation::setFromYZ(), setPos(), and setRot().

Referenced by getMtoRMatrix(), UFunctionCamGmk::handleGmkGetCommand(), and testUPosRot().

void UPosRot::setFromPose ( double  x,
double  y,
double  h 
)
inline

Set from pose

References UPosition::set(), and URotation::set().

Referenced by UPaintBase::addCircleCloud(), and UResRoadLine::update().

void UPosRot::setKappa ( double  value)
inline

Get kappa - rotation on z-axis (in radians)

References URotation::Kappa.

Referenced by UFunctionLaser::handleSetCommand().

void UPosRot::setOmega ( double  value)
inline

Get omega - rotation on x-axis (in radians)

Referenced by UFunctionLaser::handleSetCommand().

void UPosRot::setPhi ( double  value)
inline

Get phi - rotation on y-axis (in radians)

Referenced by UObstacleGroupLaser::addObst(), UFunctionLaser::handleSetCommand(), and UObstaclePool::pointsToPolygon().

void UPosRot::setPos ( UPosition  pos)
inline
void UPosRot::setRot ( URotation  rot)
inline
void UPosRot::setRtoC ( UPosRot camera,
UPosRot guidemark 
)

Convert this (guidemark) position and Rotation to camera coordinates, when the guidemark and camera is in map coordinates.

References getMtoRMatrix(), getPos(), getRtoMMatrix(), rot(), URotation::setFromYZ(), setPos(), and setRot().

Referenced by getMtoRMatrix(), UFunctionCamGmk::handleGmkGetCommand(), and testUPosRot().

void UPosRot::setTheta ( double  value)
inline

Get Theta (same as kappa) - rotation on z-axis (in radians)

References getCamToRobPlane(), getRobToCamPlane(), and URotation::Kappa.

void UPosRot::setX ( double  value)
inline

Set x - front in meter

Referenced by UFunctionLaser::handleSetCommand(), and UClientFuncLaser::handleWpf().

void UPosRot::setY ( double  value)
inline

Set y - left in meter

Referenced by UFunctionLaser::handleSetCommand(), and UClientFuncLaser::handleWpf().

void UPosRot::setZ ( double  value)
inline

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