AURobotServers
4
|
#include <uposrot.h>
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 () |
UPosition * | getPos () |
UPosRot * | getPosRot () |
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... | |
URotation * | getRot () |
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) |
UPosition * | getPos () |
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) |
URotation * | getRot () |
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 |
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.
UPosRot::UPosRot | ( | ) |
Constructor
UPosRot::~UPosRot | ( | ) |
Destructor
|
inline |
Clear all values
References UPosition::clear(), and URotation::clear().
Referenced by UResLaserIfSf::handleSF(), and UPcpItem::UPcpItem().
Convert this plane from camera to robot coordinates. Assumes that this pose is the camera pose relative to the robot.
plane | is the plane to convert. |
References getMtoRMatrix(), UPlane::getOnPlane(), getRtoMMatrix(), and UPlane::set().
Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), and setTheta().
|
inlinevirtual |
Get (end) type of this structure
Reimplemented from UPosition.
|
inline |
Get kappa - rotation on z-axis (in radians)
References URotation::Kappa.
Referenced by UFunctionLaser::handleSetCommand().
|
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().
|
inline |
Get omega - rotation on x-axis (in radians)
References URotation::Omega.
Referenced by UFunctionLaser::handleSetCommand().
|
inline |
Get phi - rotation on y-axis (in radians)
References URotation::Phi.
Referenced by ULaserMeasurement::clear(), UFunctionLaser::handleSetCommand(), ULaserData::setFakeDataRad(), and ULaserScan::setScan().
|
inline |
Get position only
References UPosition::getPos().
Referenced by UCamPool::decodeReplayLine(), UClientFuncLaserGui::doRepaint(), USmlTag::getGmk(), getMtoRMatrix(), getRtoMMatrix(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UFunctionLaser::handleSetCommand(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UCamPush::print(), UFunctionCamGmk::sendGmk(), setCtoR(), setRtoC(), UResCamIfGmk::snprint(), and testUPosRot().
|
inline |
Get UPosRot
Referenced by UFunctionCamGmk::handleGmkGetCommand(), and UResCamIfGmk::newDataAvailable().
Convert this plane from robot to camera coordinates. Assumes that this pose is the camera pose relative to the robot.
plane | is the plane to convert. |
References getMtoRMatrix(), UPlane::getOnPlane(), getRtoMMatrix(), and UPlane::set().
Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), and setTheta().
|
inline |
Get rotation only
References URotation::getRot().
Referenced by UCamPool::decodeReplayLine(), ULaserDevice::getDeviceRot(), USmlTag::getGmk(), UClientFuncSF::handlePass(), UResLaserIfSf::handlePass(), UFunctionLaser::handleSetCommand(), UClientFuncSF::handleSF(), UResLaserIfSf::handleSF(), UCamPush::print(), UFunctionCamGmk::sendGmk(), and testUPosRot().
|
inline |
Get conversion matrix, that can convert a 3D position from a local coordinate system to the global coordinate system, when this posRot is the position of the local coordinate system in the global. Returns a UMatrix4 value
References URotation::asMatrix4x4RtoM(), and getPos().
Referenced by UPaintBase::addCircleCloud(), UObstacleGroupLaser::addObst(), UFuncBallKL::calculateBallPosition(), UFuncBall::calculateBallPosition(), UFuncBall_improved::calculateBallPosition(), UNamedBoxes::doDetect(), UClientFuncLaserGui::doRepaint(), UFuncStraightLine::findWoldPoints(), getCamToRobPlane(), getRobToCamPlane(), UPaintLaserScan::makeScanCloud(), USFData::moveLocalToMap(), UFeatureData::moveLocalToOdo(), UNavPaint::paintCams(), UNavPaint::paintGmks(), UNavPaint::paintHistScan(), UClientFuncLaserGui::paintHistScan(), UNavPaint::paintScanNewest(), UObstaclePool::pointsToPolygon(), setCtoR(), setRtoC(), UImg3Dpoints::toRobotCoordinates(), UPaintPcp::update(), and UResRoadLine::update().
|
inline |
Get Theta (same as kappa) - rotation on z-axis (in radians)
References URotation::Kappa.
|
inline |
Get x - front in meter
References UPosition::x.
Referenced by UFunctionLaser::handleSetCommand(), UNavPaint::paint(), UNavPaint::paintGmks(), UNavPaint::paintRangeRings(), UClientFuncLaserGui::paintRobotMmr(), UClientFuncLaserGui::paintRobotSmr(), and UFuncEfLine::sendBoxPose().
|
inline |
Get y - left in meter
References UPosition::y.
Referenced by UFunctionLaser::handleSetCommand(), UNavPaint::paintGmks(), and UNavPaint::paintRangeRings().
|
inline |
Get z - height in meter
References UPosition::z.
Referenced by ULaserMeasurement::clear(), UResPassable::combineNearIntervals(), UFunctionLaser::handleSetCommand(), ULaserData::setFakeDataRad(), and ULaserScan::setScan().
|
inline |
Get position only
References UPosition::getPos().
Referenced by UGmk::getCode(), UCamMounted::getPos(), and UResCamIfGmk::newDataAvailable().
void UPosRot::print | ( | const char * | prestring | ) |
Print values
References URotation::Kappa, URotation::Omega, URotation::Phi, UPosition::x, UPosition::y, and UPosition::z.
Referenced by getMtoRMatrix(), UClientFuncImage::gotNewCamInfo(), and testUPosRot().
|
inline |
Get rotation only
References URotation::getRot().
Referenced by UGmk::getCode(), UCamMounted::getRot(), set(), setCtoR(), and setRtoC().
Set from position and rotation
References rot(), UPosition::setPos(), and URotation::setRot().
Referenced by UVariable::get6D(), UCamMounted::getPosRot(), UResCamIfCam::gotNewData(), UFunctionCamGmk::handleGmkGetCommand(), UResLaserIfScan::handleLaserScan(), UNavPaint::paint(), UNavView::paint(), UNavPaint::paintCams(), UCamMounted::setPosOnRobot(), UCamMounted::setPosOnRobotCC(), testUPosRot(), and UResPassable::UResPassableInit().
|
inline |
Set directly from 6 values
References URotation::Kappa, UPosition::set(), and URotation::set().
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().
|
inline |
Set from pose
References UPosition::set(), and URotation::set().
Referenced by UPaintBase::addCircleCloud(), and UResRoadLine::update().
|
inline |
Get kappa - rotation on z-axis (in radians)
References URotation::Kappa.
Referenced by UFunctionLaser::handleSetCommand().
|
inline |
Get omega - rotation on x-axis (in radians)
Referenced by UFunctionLaser::handleSetCommand().
|
inline |
Get phi - rotation on y-axis (in radians)
Referenced by UObstacleGroupLaser::addObst(), UFunctionLaser::handleSetCommand(), and UObstaclePool::pointsToPolygon().
|
inline |
Set from position part only
References UPosition::setPos().
Referenced by UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UGmk::set(), setCtoR(), and setRtoC().
|
inline |
Set from rotation part only
References URotation::setRot().
Referenced by UResLaserIfScan::handleLaserScan(), UClientFuncLaser::handleLaserScan(), UGmk::set(), setCtoR(), and setRtoC().
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().
|
inline |
Get Theta (same as kappa) - rotation on z-axis (in radians)
References getCamToRobPlane(), getRobToCamPlane(), and URotation::Kappa.
|
inline |
Set x - front in meter
Referenced by UFunctionLaser::handleSetCommand(), and UClientFuncLaser::handleWpf().
|
inline |
Set y - left in meter
Referenced by UFunctionLaser::handleSetCommand(), and UClientFuncLaser::handleWpf().
|
inline |
Get z - height in meter
Referenced by UObstacleGroupLaser::addObst(), UFunctionLaser::handleSetCommand(), UClientFuncLaser::handleWpf(), and UObstaclePool::pointsToPolygon().