rpos::core::Location Class

Represents a point position in XYZ right-hand axis.

Header File

rpos/core/pose.h

Applies to

  • Slamware
  • Mapper

Constructors

Location()

Create a new object with x,y,z all set to 0.

Location(double x, double y, double z)

Create a new object with the specified x,y,z value

Location(const Location&)

Copy constructor

Operators

Location& operator=(const Location&)

Assignement operator

bool operator==(const Location&) const

Compare whether the current location is equal with the target location

Methods

double x() const; double& x()

Getter and setter of the x field.

Example

Location location;
std::cout<<location.x()<<std::endl;  // output 0
location.x() = 10;
std::cout<<location.x()<<std::endl;  // output 10
double y() const; double& y()

Getter and setter of the y field.

double z() const; double& z()

Getter and setter of the z field.

double distanceTo(const Location& that) const

Calcuate the euler distance between two points.