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 Vector2< kt_double > &rPosition, kt_double heading)
 
 Pose2 (kt_double x, kt_double y, kt_double heading)
 
 Pose2 (const Pose3 &rPose)
 
 Pose2 (const Pose2 &rOther)
 
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 2044 of file Karto.h.

Constructor & Destructor Documentation

◆ Pose2() [1/4]

karto::Pose2::Pose2 ( )
inline

Default Constructor

Definition at line 2050 of file Karto.h.

◆ Pose2() [2/4]

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

Constructor initializing pose parameters

Parameters
rPositionposition
headingheading

Definition at line 2060 of file Karto.h.

◆ Pose2() [3/4]

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 2072 of file Karto.h.

◆ Pose2() [4/4]

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

Copy constructor

Definition at line 2086 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 2151 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 2133 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 2097 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 2115 of file Karto.h.

◆ operator!=()

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

Inequality operator

Definition at line 2197 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 2216 of file Karto.h.

◆ operator+=()

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

In place Pose2 add.

Definition at line 2205 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 2226 of file Karto.h.

◆ operator=()

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

Assignment operator

Definition at line 2178 of file Karto.h.

◆ operator==()

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

Equality operator

Definition at line 2189 of file Karto.h.

◆ serialize()

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

Definition at line 2254 of file Karto.h.

◆ SetHeading()

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

Sets the heading

Parameters
headingof the pose

Definition at line 2160 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 2142 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 2106 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 2124 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 2169 of file Karto.h.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 2252 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 2246 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 2235 of file Karto.h.

Member Data Documentation

◆ m_Heading

kt_double karto::Pose2::m_Heading
private

Definition at line 2263 of file Karto.h.

◆ m_Position

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

Definition at line 2261 of file Karto.h.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Sat Oct 3 2020 03:51:02