Main MRPT website > C++ reference for MRPT 1.5.6
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

Detailed Description

Lightweight 2D pose.

Allows coordinate access using [] operator.

See Also
mrpt::poses::CPose2D

Definition at line 148 of file lightweight_geom_data.h.

#include <mrpt/math/lightweight_geom_data.h>

Public Types

enum  { static_size = 3 }
 

Public Member Functions

 TPose2D (const TPoint2D &p)
 Implicit constructor from TPoint2D. More...
 
 TPose2D (const TPoint3D &p)
 Constructor from TPoint3D, losing information. More...
 
 TPose2D (const TPose3D &p)
 Constructor from TPose3D, losing information. More...
 
 TPose2D (const mrpt::poses::CPose2D &p)
 Implicit constructor from heavyweight type. More...
 
 TPose2D (double xx, double yy, double pphi)
 Constructor from coordinates. More...
 
 TPose2D ()
 Default fast constructor. More...
 
double & operator[] (size_t i)
 Coordinate access using operator[]. More...
 
const double & operator[] (size_t i) const
 Coordinate access using operator[]. More...
 
void getAsVector (std::vector< double > &v) const
 Transformation into vector. More...
 
void asString (std::string &s) const
 Returns a human-readable textual representation of the object (eg: "[x y yaw]", yaw in degrees) More...
 
std::string asString () const
 
mrpt::math::TPose2D operator+ (const mrpt::math::TPose2D &b) const
 Operator "oplus" pose composition: "ret=this \oplus b". More...
 
mrpt::math::TPose2D operator- (const mrpt::math::TPose2D &b) const
 Operator "ominus" pose composition: "ret=this \ominus b". More...
 
void composePoint (const TPoint2D l, TPoint2D &g) const
 
void inverseComposePoint (const TPoint2D g, TPoint2D &l) const
 
double norm () const
 Returns the norm of the (x,y) vector (phi is not used) More...
 
void fromString (const std::string &s)
 Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45.0]" ) More...
 

Static Public Member Functions

static size_t size ()
 

Public Attributes

double x
 
double y
 X,Y coordinates. More...
 
double phi
 Orientation (rads) More...
 

Member Enumeration Documentation

anonymous enum
Enumerator
static_size 

Definition at line 149 of file lightweight_geom_data.h.

Constructor & Destructor Documentation

mrpt::math::TPose2D::TPose2D ( const TPoint2D p)

Implicit constructor from TPoint2D.

Zeroes the phi coordinate.

See Also
TPoint2D

Definition at line 60 of file lightweight_geom_data.cpp.

mrpt::math::TPose2D::TPose2D ( const TPoint3D p)
explicit

Constructor from TPoint3D, losing information.

Zeroes the phi coordinate.

See Also
TPoint3D

Definition at line 61 of file lightweight_geom_data.cpp.

mrpt::math::TPose2D::TPose2D ( const TPose3D p)
explicit

Constructor from TPose3D, losing information.

The phi corresponds to the original pose's yaw.

See Also
TPose3D

Definition at line 62 of file lightweight_geom_data.cpp.

mrpt::math::TPose2D::TPose2D ( const mrpt::poses::CPose2D p)

Implicit constructor from heavyweight type.

See Also
mrpt::poses::CPose2D

Definition at line 63 of file lightweight_geom_data.cpp.

mrpt::math::TPose2D::TPose2D ( double  xx,
double  yy,
double  pphi 
)
inline

Constructor from coordinates.

Definition at line 174 of file lightweight_geom_data.h.

mrpt::math::TPose2D::TPose2D ( )
inline

Default fast constructor.

Initializes to garbage.

Definition at line 178 of file lightweight_geom_data.h.

Member Function Documentation

void mrpt::math::TPose2D::asString ( std::string s) const

Returns a human-readable textual representation of the object (eg: "[x y yaw]", yaw in degrees)

See Also
fromString

Definition at line 64 of file lightweight_geom_data.cpp.

References mrpt::mrpt::format(), phi, and mrpt::mrpt::utils::RAD2DEG().

Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), and mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().

std::string mrpt::math::TPose2D::asString ( ) const
inline

Definition at line 194 of file lightweight_geom_data.h.

References asString().

Referenced by asString().

void mrpt::math::TPose2D::composePoint ( const TPoint2D  l,
TPoint2D g 
) const
inline

Definition at line 198 of file lightweight_geom_data.h.

References mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.

void mrpt::math::TPose2D::fromString ( const std::string s)

Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -45.0]" )

See Also
asString
Exceptions
std::exceptionOn invalid format

Definition at line 67 of file lightweight_geom_data.cpp.

References ASSERTMSG_, DEG2RAD, phi, mrpt::mrpt::math::size(), and THROW_EXCEPTION.

void mrpt::math::TPose2D::getAsVector ( std::vector< double > &  v) const
inline

Transformation into vector.

Definition at line 186 of file lightweight_geom_data.h.

void mrpt::math::TPose2D::inverseComposePoint ( const TPoint2D  g,
TPoint2D l 
) const
inline
double mrpt::math::TPose2D::norm ( ) const
inline

Returns the norm of the (x,y) vector (phi is not used)

Definition at line 209 of file lightweight_geom_data.h.

References mrpt::mrpt::math::hypot_fast().

mrpt::math::TPose2D mrpt::math::TPose2D::operator+ ( const mrpt::math::TPose2D b) const

Operator "oplus" pose composition: "ret=this \oplus b".

See Also
CPose2D

Definition at line 76 of file lightweight_geom_data.cpp.

References phi, mrpt::math::wrapToPi(), x, and y.

mrpt::math::TPose2D mrpt::math::TPose2D::operator- ( const mrpt::math::TPose2D b) const

Operator "ominus" pose composition: "ret=this \ominus b".

See Also
CPose2D

Definition at line 87 of file lightweight_geom_data.cpp.

References phi, mrpt::math::wrapToPi(), x, and y.

double& mrpt::math::TPose2D::operator[] ( size_t  i)
inline

Coordinate access using operator[].

Order: x,y,phi

Definition at line 180 of file lightweight_geom_data.h.

const double& mrpt::math::TPose2D::operator[] ( size_t  i) const
inline

Coordinate access using operator[].

Order: x,y,phi

Definition at line 182 of file lightweight_geom_data.h.

static size_t mrpt::math::TPose2D::size ( )
inlinestatic

Member Data Documentation

double mrpt::math::TPose2D::phi

Orientation (rads)

Definition at line 151 of file lightweight_geom_data.h.

Referenced by asString(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::obs::carmen_log_parse_line(), mrpt::math::createFromPoseAndVector(), mrpt::math::createFromPoseX(), mrpt::math::createFromPoseY(), mrpt::nav::CParameterizedTrajectoryGenerator::debugDumpInFiles(), mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::nav::PoseDistanceMetric< TNodeSE2 >::distance(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), fromString(), mrpt::poses::CRobot2DPoseEstimator::getCurrentEstimate(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentGTVelLocal(), mrpt::kinematics::CVehicleSimulVirtualBase::getCurrentOdometricVelLocal(), mrpt::poses::CRobot2DPoseEstimator::getLatestRobotPose(), mrpt::nav::CPTG_Holo_Blend::getPathPose(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathPose(), mrpt::utils::CRobotSimulator::getPHI(), mrpt::hwdrivers::CRovio::getPosition(), mrpt::slam::CICP::ICP_Method_Classic(), mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize(), mrpt::kinematics::CVehicleSimul_Holo::internal_simulControlStep(), mrpt::kinematics::CVehicleSimul_DiffDriven::internal_simulControlStep(), mrpt::graphs::detail::graph_ops< GRAPH_T >::load_graph_of_poses_from_text_file(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), mrpt::math::operator!=(), operator+(), operator-(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), mrpt::poses::CPosePDFGaussianInf::readFromStream(), mrpt::poses::CPosePDFParticles::resetAroundSetOfPoses(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::tfest::se2_l2(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), mrpt::nav::PlannerRRT_SE2_TPS::solve(), TEST(), mrpt::nav::CAbstractNavigator::updateCurrentPoseAndSpeeds(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

double mrpt::math::TPose2D::x

Definition at line 150 of file lightweight_geom_data.h.

Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::PoseDistanceMetric< TNodeSE2 >::cannotBeNearerThan(), mrpt::nav::PoseDistanceMetric< TNodeSE2_TP >::cannotBeNearerThan(), mrpt::obs::carmen_log_parse_line(), mrpt::poses::CPose2D::CPose2D(), mrpt::math::createFromPoseAndVector(), mrpt::math::createFromPoseX(), mrpt::math::createFromPoseY(), mrpt::nav::CParameterizedTrajectoryGenerator::debugDumpInFiles(), mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::nav::PoseDistanceMetric< TNodeSE2 >::distance(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), mrpt::poses::CRobot2DPoseEstimator::getLatestRobotPose(), mrpt::nav::CPTG_Holo_Blend::getPathPose(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathPose(), mrpt::hwdrivers::CRovio::getPosition(), mrpt::hwdrivers::CRovio::getRovioState(), mrpt::utils::CRobotSimulator::getX(), mrpt::slam::CICP::ICP_Method_Classic(), mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize(), mrpt::graphs::detail::graph_ops< GRAPH_T >::load_graph_of_poses_from_text_file(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), mrpt::math::operator!=(), operator+(), operator-(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::poses::CPosePDFGaussianInf::readFromStream(), mrpt::nav::CParameterizedTrajectoryGenerator::renderPathAsSimpleLine(), mrpt::poses::CPosePDFParticles::resetAroundSetOfPoses(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::tfest::se2_l2(), mrpt::kinematics::CVehicleSimulVirtualBase::simulateOneTimeStep(), TEST(), mrpt::nav::CParameterizedTrajectoryGenerator::updateNavDynamicState(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

double mrpt::math::TPose2D::y

X,Y coordinates.

Definition at line 150 of file lightweight_geom_data.h.

Referenced by mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::PoseDistanceMetric< TNodeSE2 >::cannotBeNearerThan(), mrpt::nav::PoseDistanceMetric< TNodeSE2_TP >::cannotBeNearerThan(), mrpt::obs::carmen_log_parse_line(), mrpt::poses::CPose2D::CPose2D(), mrpt::math::createFromPoseAndVector(), mrpt::math::createFromPoseX(), mrpt::math::createFromPoseY(), mrpt::nav::CParameterizedTrajectoryGenerator::debugDumpInFiles(), mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::nav::PoseDistanceMetric< TNodeSE2 >::distance(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), mrpt::poses::CRobot2DPoseEstimator::getLatestRobotPose(), mrpt::nav::CPTG_Holo_Blend::getPathPose(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathPose(), mrpt::hwdrivers::CRovio::getPosition(), mrpt::utils::CRobotSimulator::getY(), mrpt::slam::CICP::ICP_Method_Classic(), mrpt::maps::CPointsMap::internal_computeObservationLikelihood(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize(), mrpt::graphs::detail::graph_ops< GRAPH_T >::load_graph_of_poses_from_text_file(), mrpt::nav::CParameterizedTrajectoryGenerator::loadFromConfigFile(), mrpt::math::operator!=(), operator+(), operator-(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), mrpt::nav::CAbstractNavigator::performNavigationStepNavigating(), mrpt::poses::CPosePDFGaussianInf::readFromStream(), mrpt::nav::CParameterizedTrajectoryGenerator::renderPathAsSimpleLine(), mrpt::poses::CPosePDFParticles::resetAroundSetOfPoses(), mrpt::nav::CParameterizedTrajectoryGenerator::saveToConfigFile(), mrpt::tfest::se2_l2(), TEST(), mrpt::nav::CParameterizedTrajectoryGenerator::updateNavDynamicState(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018