Public Member Functions | Private Attributes | Friends | List of all members
karto::Pose2 Class Reference

#include <Karto.h>

Public Member Functions

kt_double GetHeading () const
 
const Vector2< kt_double > & GetPosition () const
 
kt_double GetX () const
 
kt_double GetY () const
 
kt_bool operator!= (const Pose2 &rOther) const
 
Pose2 operator+ (const Pose2 &rOther) const
 
void operator+= (const Pose2 &rOther)
 
Pose2 operator- (const Pose2 &rOther) const
 
Pose2operator= (const Pose2 &rOther)
 
kt_bool operator== (const Pose2 &rOther) const
 
 Pose2 ()
 
 Pose2 (const Pose2 &rOther)
 
 Pose2 (const Pose3 &rPose)
 
 Pose2 (const Vector2< kt_double > &rPosition, kt_double heading)
 
 Pose2 (kt_double x, kt_double y, kt_double heading)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
void SetHeading (kt_double heading)
 
void SetPosition (const Vector2< kt_double > &rPosition)
 
void SetX (kt_double x)
 
void SetY (kt_double y)
 
kt_double SquaredDistance (const Pose2 &rOther) const
 

Private Attributes

kt_double m_Heading
 
Vector2< kt_doublem_Position
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &rStream, const Pose2 &rPose)
 
std::istream & operator>> (std::istream &rStream, const Pose2 &)
 

Detailed Description

Defines a position (x, y) in 2-dimensional space and heading.

Definition at line 2046 of file Karto.h.

Constructor & Destructor Documentation

◆ Pose2() [1/5]

karto::Pose2::Pose2 ( )
inline

Default Constructor

Definition at line 2052 of file Karto.h.

◆ Pose2() [2/5]

karto::Pose2::Pose2 ( const Vector2< kt_double > &  rPosition,
kt_double  heading 
)
inline

Constructor initializing pose parameters

Parameters
rPositionposition
headingheading

Definition at line 2062 of file Karto.h.

◆ Pose2() [3/5]

karto::Pose2::Pose2 ( kt_double  x,
kt_double  y,
kt_double  heading 
)
inline

Constructor initializing pose parameters

Parameters
xx-coordinate
yy-coordinate
headingheading

Definition at line 2074 of file Karto.h.

◆ Pose2() [4/5]

karto::Pose2::Pose2 ( const Pose3 rPose)
inline

Constructs a Pose2 object from a Pose3.

Definition at line 7121 of file Karto.h.

◆ Pose2() [5/5]

karto::Pose2::Pose2 ( const Pose2 rOther)
inline

Copy constructor

Definition at line 2088 of file Karto.h.

Member Function Documentation

◆ GetHeading()

kt_double karto::Pose2::GetHeading ( ) const
inline

Returns the heading of the pose (in radians)

Returns
the heading of the pose

Definition at line 2153 of file Karto.h.

◆ GetPosition()

const Vector2<kt_double>& karto::Pose2::GetPosition ( ) const
inline

Returns the position

Returns
the position of the pose

Definition at line 2135 of file Karto.h.

◆ GetX()

kt_double karto::Pose2::GetX ( ) const
inline

Returns the x-coordinate

Returns
the x-coordinate of the pose

Definition at line 2099 of file Karto.h.

◆ GetY()

kt_double karto::Pose2::GetY ( ) const
inline

Returns the y-coordinate

Returns
the y-coordinate of the pose

Definition at line 2117 of file Karto.h.

◆ operator!=()

kt_bool karto::Pose2::operator!= ( const Pose2 rOther) const
inline

Inequality operator

Definition at line 2199 of file Karto.h.

◆ operator+()

Pose2 karto::Pose2::operator+ ( const Pose2 rOther) const
inline

Binary Pose2 add

Parameters
rOther
Returns
Pose2 sum

Definition at line 2218 of file Karto.h.

◆ operator+=()

void karto::Pose2::operator+= ( const Pose2 rOther)
inline

In place Pose2 add.

Definition at line 2207 of file Karto.h.

◆ operator-()

Pose2 karto::Pose2::operator- ( const Pose2 rOther) const
inline

Binary Pose2 subtract

Parameters
rOther
Returns
Pose2 difference

Definition at line 2228 of file Karto.h.

◆ operator=()

Pose2& karto::Pose2::operator= ( const Pose2 rOther)
inline

Assignment operator

Definition at line 2180 of file Karto.h.

◆ operator==()

kt_bool karto::Pose2::operator== ( const Pose2 rOther) const
inline

Equality operator

Definition at line 2191 of file Karto.h.

◆ serialize()

template<class Archive >
void karto::Pose2::serialize ( Archive &  ar,
const unsigned int  version 
)
inline

Definition at line 2256 of file Karto.h.

◆ SetHeading()

void karto::Pose2::SetHeading ( kt_double  heading)
inline

Sets the heading

Parameters
headingof the pose

Definition at line 2162 of file Karto.h.

◆ SetPosition()

void karto::Pose2::SetPosition ( const Vector2< kt_double > &  rPosition)
inline

Sets the position

Parameters
rPositionof the pose

Definition at line 2144 of file Karto.h.

◆ SetX()

void karto::Pose2::SetX ( kt_double  x)
inline

Sets the x-coordinate

Parameters
xthe x-coordinate of the pose

Definition at line 2108 of file Karto.h.

◆ SetY()

void karto::Pose2::SetY ( kt_double  y)
inline

Sets the y-coordinate

Parameters
ythe y-coordinate of the pose

Definition at line 2126 of file Karto.h.

◆ SquaredDistance()

kt_double karto::Pose2::SquaredDistance ( const Pose2 rOther) const
inline

Return the squared distance between two Pose2

Returns
squared distance

Definition at line 2171 of file Karto.h.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 2254 of file Karto.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  rStream,
const Pose2 rPose 
)
friend

Write this pose onto output stream

Parameters
rStreamoutput stream
rPoseto read

Definition at line 2248 of file Karto.h.

◆ operator>>

std::istream& operator>> ( std::istream &  rStream,
const Pose2  
)
friend

Read pose from input stream

Parameters
rStreaminput stream

Definition at line 2237 of file Karto.h.

Member Data Documentation

◆ m_Heading

kt_double karto::Pose2::m_Heading
private

Definition at line 2265 of file Karto.h.

◆ m_Position

Vector2<kt_double> karto::Pose2::m_Position
private

Definition at line 2263 of file Karto.h.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:56