Typedefs | Functions
ecl::odometry Namespace Reference

Typedefs

typedef Eigen::Matrix< float, 6, 1 > Odom2D
 Float representation of 2D odometry (x, y, heading, v_x, v_y, w). More...
 
typedef Eigen::Matrix< float, 6, Eigen::Dynamic > Odom2DTrajectory
 Float collection of 2D odometries (x, y, heading, v_x, v_y, w). More...
 
typedef Eigen::Matrix2Xf Path2D
 Float representation of a path in 2D (x1,y1; x2,y2; ..; xn,yn). More...
 
typedef Eigen::Vector3f Pose2D
 Float representation of a pose in 2D (x, y, heading). More...
 
typedef Eigen::Vector2f Position2D
 Float representation for a 2D position (x-, y-position). More...
 
typedef Eigen::Matrix3Xf Trajectory2D
 Float representation of a trajectory in 2D (poses in 2D). More...
 
typedef Eigen::Vector3f Twist2D
 Float representation of velocities in 2D (v_x, v_y, w). More...
 
typedef Eigen::Matrix3Xf Twist2DVector
 Float collection of 2D twists (twist: v_x, v_y, w). More...
 

Functions

ecl_geometry_PUBLIC void addAtEnd (Odom2DTrajectory &target, const Odom2DTrajectory &addition)
 
ecl_geometry_PUBLIC void addAtEnd (Trajectory2D &target, const Trajectory2D &addition)
 Concat two odometry trajectories. More...
 
ecl_geometry_PUBLIC double distance (const Odom2D &a, const Odom2D &b)
 Distance between the positions of odometries. More...
 
ecl_geometry_PUBLIC double distance (const Pose2D &a, const Odom2D &b)
 Distance between a pose and the position of a odometry. More...
 
ecl_geometry_PUBLIC double distance (const Pose2D &a, const Pose2D &b)
 Distance between poses. More...
 
ecl_geometry_PUBLIC double distance (const Pose2D &pose, const Trajectory2D &trajectory)
 Shortest distance between a pose and a trajectory. More...
 
ecl_geometry_PUBLIC double distance (const Position2D &position, const Trajectory2D &trajectory)
 Shortest distance between a position and a trajectory. More...
 
ecl_geometry_PUBLIC double distanceSqared (const Odom2D &a, const Odom2D &b)
 Squared distance between the positions of odometries. More...
 
ecl_geometry_PUBLIC double distanceSqared (const Pose2D &a, const Pose2D &b)
 Squared distance between poses. More...
 
ecl_geometry_PUBLIC bool empty (const Odom2DTrajectory &trajectory)
 Check if trajectory ptr is empty (ptr not set or has no odometries) More...
 
ecl_geometry_PUBLIC bool empty (const Trajectory2D &trajectory)
 Check if trajectory ptr is empty (ptr not set or has no poses) More...
 
ecl_geometry_PUBLIC Odom2D getAt (const Odom2DTrajectory &trajectory, const int &index)
 Get element of trajectory. More...
 
ecl_geometry_PUBLIC Pose2D getAt (const Trajectory2D &trajectory, const int &index)
 Get element of trajectory. More...
 
ecl_geometry_PUBLIC Odom2D getBack (const Odom2DTrajectory &trajectory)
 Get back (last) element of trajectory. More...
 
ecl_geometry_PUBLIC Pose2D getBack (const Trajectory2D &trajectory)
 Get back (last) element of trajectory. More...
 
ecl_geometry_PUBLIC Odom2D getFront (const Odom2DTrajectory &trajectory)
 Get front (first) element of trajectory. More...
 
ecl_geometry_PUBLIC Pose2D getFront (const Trajectory2D &trajectory)
 Get front (first) element of trajectory. More...
 
ecl_geometry_PUBLIC Pose2D getPose (const Odom2D &odom)
 Extract pose from odometry. More...
 
ecl_geometry_PUBLIC Trajectory2D getPoses (const Odom2DTrajectory &trajectory)
 Extract poses of odom trajectory. More...
 
ecl_geometry_PUBLIC Position2D getPosition (const Odom2D &odom)
 Extract position from odometry. More...
 
ecl_geometry_PUBLIC Position2D getPosition (const Pose2D &pose)
 Extract position from pose. More...
 
ecl_geometry_PUBLIC Twist2D getTwist (const Odom2D &odom)
 Extract twist from odometry. More...
 
ecl_geometry_PUBLIC Twist2DVector getTwists (const Odom2DTrajectory &trajectory)
 Extract twists of odom trajectory. More...
 
ecl_geometry_PUBLIC float getVelocityAngular (const Odom2D &odom)
 Get angular velocity. More...
 
ecl_geometry_PUBLIC float getVelocityAngular (const Twist2D &twist)
 Get angular velocity. More...
 
ecl_geometry_PUBLIC float getVelocityX (const Odom2D &odom)
 Get linear velocity x direction. More...
 
ecl_geometry_PUBLIC float getVelocityX (const Twist2D &twist)
 Get linear velocity x direction. More...
 
ecl_geometry_PUBLIC float getVelocityY (const Odom2D &odom)
 Get linear velocity y direction. More...
 
ecl_geometry_PUBLIC float getVelocityY (const Twist2D &twist)
 Get linear velocity y direction. More...
 
ecl_geometry_PUBLIC float getX (const Odom2D &odom)
 Get x position. More...
 
ecl_geometry_PUBLIC float getX (const Pose2D &pose)
 Get x position. More...
 
ecl_geometry_PUBLIC float getX (const Position2D &position)
 Get x position. More...
 
ecl_geometry_PUBLIC float getY (const Odom2D &odom)
 Get y position. More...
 
ecl_geometry_PUBLIC float getY (const Pose2D &pose)
 Get y position. More...
 
ecl_geometry_PUBLIC float getY (const Position2D &position)
 Get y position. More...
 
ecl_geometry_PUBLIC float getYaw (const Odom2D &odom)
 Get yaw (heading) More...
 
ecl_geometry_PUBLIC float getYaw (const Pose2D &pose)
 Get yaw (heading) More...
 
ecl_geometry_PUBLIC void resize (Odom2DTrajectory &trajectory, const int &size)
 
ecl_geometry_PUBLIC void resize (Trajectory2D &trajectory, const int &size)
 Resizes trajectory appending uninitialised values if needed. More...
 
ecl_geometry_PUBLIC void setAt (Odom2DTrajectory &trajectory, const int &index, const Odom2D &odom)
 Set element at index of trajectory. More...
 
ecl_geometry_PUBLIC void setAt (Trajectory2D &trajectory, const int &index, const Pose2D &pose)
 Set element at index of trajectory. More...
 
ecl_geometry_PUBLIC void setVelocityAngular (Odom2D &odom, const float &value)
 Set angular velocity. More...
 
ecl_geometry_PUBLIC void setVelocityAngular (Twist2D &twist, const float &value)
 Set angular velocity. More...
 
ecl_geometry_PUBLIC void setVelocityX (Odom2D &odom, const float &value)
 Set linear velocity x direction. More...
 
ecl_geometry_PUBLIC void setVelocityX (Twist2D &twist, const float &value)
 Set linear velocity x direction. More...
 
ecl_geometry_PUBLIC void setVelocityY (Odom2D &odom, const float &value)
 Set linear velocity y direction. More...
 
ecl_geometry_PUBLIC void setVelocityY (Twist2D &twist, const float &value)
 Set linear velocity y direction. More...
 
ecl_geometry_PUBLIC void setX (Odom2D &odom, const float &value)
 Set x position. More...
 
ecl_geometry_PUBLIC void setX (Pose2D &pose, const float &value)
 Set x position. More...
 
ecl_geometry_PUBLIC void setX (Position2D &position, const float &value)
 Set x position. More...
 
ecl_geometry_PUBLIC void setY (Odom2D &odom, const float &value)
 Set y position. More...
 
ecl_geometry_PUBLIC void setY (Pose2D &pose, const float &value)
 Set y position. More...
 
ecl_geometry_PUBLIC void setY (Position2D &position, const float &value)
 Set y position. More...
 
ecl_geometry_PUBLIC void setYaw (Odom2D &odom, const float &value)
 Set yaw (heading) More...
 
ecl_geometry_PUBLIC void setYaw (Pose2D &pose, const float &value)
 Set yaw (heading) More...
 
ecl_geometry_PUBLIC int size (const Odom2DTrajectory &trajectory)
 Get the size of the trajectory. More...
 
ecl_geometry_PUBLIC int size (const Trajectory2D &trajectory)
 Get the size of the trajectory. More...
 
ecl_geometry_PUBLIC Odom2DTrajectory vectorToTrajectory (const std::vector< Odom2D > &vec)
 Convert vector of Odom2D to Odom2DTrajectory. More...
 
ecl_geometry_PUBLIC Trajectory2D vectorToTrajectory (const std::vector< Pose2D > &vec)
 Convert vector of Pose2D to Trajectory2D. More...
 

Typedef Documentation

◆ Odom2D

typedef Eigen::Matrix<float, 6, 1> ecl::odometry::Odom2D

Float representation of 2D odometry (x, y, heading, v_x, v_y, w).

Represents a pose (x, y, heading) and the twist (linear velocities, angular velocities) of an object in a 2D plane, e.g. a mobile robot.

Uses a 6x1 Eigen vector where the upper half is the pose and the lower half the twist.

Definition at line 102 of file odometry_typedefs.hpp.

◆ Odom2DTrajectory

typedef Eigen::Matrix<float, 6, Eigen::Dynamic> ecl::odometry::Odom2DTrajectory

Float collection of 2D odometries (x, y, heading, v_x, v_y, w).

Represents a collection of poses (x, y, heading) together with linear and angular velocities in 2D (=twists).

Uses a 6xn Eigen matrix where each column is one odometry with the upper half being the pose and the lower half the twist.

Definition at line 113 of file odometry_typedefs.hpp.

◆ Path2D

typedef Eigen::Matrix2Xf ecl::odometry::Path2D

Float representation of a path in 2D (x1,y1; x2,y2; ..; xn,yn).

Represents a path in 2D of 2D points (no heading / orientation. Uses a 2xn Eigen matrix where each colum is one point of the path.

Definition at line 58 of file odometry_typedefs.hpp.

◆ Pose2D

Float representation of a pose in 2D (x, y, heading).

Represents a pose in 2D (2D position + heading). Uses a 3x1 Eigen vector.

Definition at line 66 of file odometry_typedefs.hpp.

◆ Position2D

Float representation for a 2D position (x-, y-position).

Represents a point in 2D. Uses a 2x1 Eigen vector.

Definition at line 50 of file odometry_typedefs.hpp.

◆ Trajectory2D

typedef Eigen::Matrix3Xf ecl::odometry::Trajectory2D

Float representation of a trajectory in 2D (poses in 2D).

Represents a trajectory in 2D of 2D poses (x, y, heading). Uses a 3xn Eigen matrix where each column is one pose of the trajectory.

Definition at line 74 of file odometry_typedefs.hpp.

◆ Twist2D

Float representation of velocities in 2D (v_x, v_y, w).

Represents a twist in 2D with the linear velocities in x- and y-direction (v_x, v_y) and the angular velocity (w). Uses a 3x1 Eigen vector.

Definition at line 83 of file odometry_typedefs.hpp.

◆ Twist2DVector

typedef Eigen::Matrix3Xf ecl::odometry::Twist2DVector

Float collection of 2D twists (twist: v_x, v_y, w).

Represents a collection of linear and angular velocities in 2D (=twists). Uses a 3xn Eigen matrix where each column is one twist.

Definition at line 91 of file odometry_typedefs.hpp.

Function Documentation

◆ addAtEnd() [1/2]

void ecl::odometry::addAtEnd ( Odom2DTrajectory target,
const Odom2DTrajectory addition 
)

Definition at line 122 of file lib/odometry_helper.cpp.

◆ addAtEnd() [2/2]

void ecl::odometry::addAtEnd ( Trajectory2D target,
const Trajectory2D addition 
)

Concat two odometry trajectories.

Adds a trajectory to the end of another trajectory. Shouldn't be used for frequent adding because of bad performance.

Definition at line 111 of file lib/odometry_helper.cpp.

◆ distance() [1/5]

double ecl::odometry::distance ( const Odom2D a,
const Odom2D b 
)

Distance between the positions of odometries.

Definition at line 86 of file lib/odometry_helper.cpp.

◆ distance() [2/5]

double ecl::odometry::distance ( const Pose2D a,
const Odom2D b 
)

Distance between a pose and the position of a odometry.

Definition at line 91 of file lib/odometry_helper.cpp.

◆ distance() [3/5]

double ecl::odometry::distance ( const Pose2D a,
const Pose2D b 
)

Distance between poses.

Definition at line 96 of file lib/odometry_helper.cpp.

◆ distance() [4/5]

double ecl::odometry::distance ( const Pose2D pose,
const Trajectory2D trajectory 
)

Shortest distance between a pose and a trajectory.

This uses straight lines between the trajectory poses to calculate the distance to the pose

Definition at line 31 of file lib/odometry_helper.cpp.

◆ distance() [5/5]

double ecl::odometry::distance ( const Position2D position,
const Trajectory2D trajectory 
)

Shortest distance between a position and a trajectory.

This uses straight lines between the trajectory poses to calculate the distance to the pose

Definition at line 36 of file lib/odometry_helper.cpp.

◆ distanceSqared() [1/2]

double ecl::odometry::distanceSqared ( const Odom2D a,
const Odom2D b 
)

Squared distance between the positions of odometries.

Definition at line 101 of file lib/odometry_helper.cpp.

◆ distanceSqared() [2/2]

double ecl::odometry::distanceSqared ( const Pose2D a,
const Pose2D b 
)

Squared distance between poses.

Concat two trajectories

Adds a trajectory to the end of another trajectory. Shouldn't be used for frequent adding because of bad performance.

Definition at line 106 of file lib/odometry_helper.cpp.

◆ empty() [1/2]

bool ecl::odometry::empty ( const Odom2DTrajectory trajectory)

Check if trajectory ptr is empty (ptr not set or has no odometries)

Definition at line 71 of file lib/odometry_helper.cpp.

◆ empty() [2/2]

bool ecl::odometry::empty ( const Trajectory2D trajectory)

Check if trajectory ptr is empty (ptr not set or has no poses)

Definition at line 66 of file lib/odometry_helper.cpp.

◆ getAt() [1/2]

Odom2D ecl::odometry::getAt ( const Odom2DTrajectory trajectory,
const int &  index 
)

Get element of trajectory.

Definition at line 184 of file lib/odometry_helper.cpp.

◆ getAt() [2/2]

Pose2D ecl::odometry::getAt ( const Trajectory2D trajectory,
const int &  index 
)

Get element of trajectory.

Definition at line 179 of file lib/odometry_helper.cpp.

◆ getBack() [1/2]

Odom2D ecl::odometry::getBack ( const Odom2DTrajectory trajectory)

Get back (last) element of trajectory.

Definition at line 204 of file lib/odometry_helper.cpp.

◆ getBack() [2/2]

Pose2D ecl::odometry::getBack ( const Trajectory2D trajectory)

Get back (last) element of trajectory.

Definition at line 194 of file lib/odometry_helper.cpp.

◆ getFront() [1/2]

Odom2D ecl::odometry::getFront ( const Odom2DTrajectory trajectory)

Get front (first) element of trajectory.

Definition at line 199 of file lib/odometry_helper.cpp.

◆ getFront() [2/2]

Pose2D ecl::odometry::getFront ( const Trajectory2D trajectory)

Get front (first) element of trajectory.

Definition at line 189 of file lib/odometry_helper.cpp.

◆ getPose()

Pose2D ecl::odometry::getPose ( const Odom2D odom)

Extract pose from odometry.

Definition at line 337 of file lib/odometry_helper.cpp.

◆ getPoses()

Trajectory2D ecl::odometry::getPoses ( const Odom2DTrajectory trajectory)

Extract poses of odom trajectory.

Definition at line 209 of file lib/odometry_helper.cpp.

◆ getPosition() [1/2]

Position2D ecl::odometry::getPosition ( const Odom2D odom)

Extract position from odometry.

Definition at line 332 of file lib/odometry_helper.cpp.

◆ getPosition() [2/2]

Position2D ecl::odometry::getPosition ( const Pose2D pose)

Extract position from pose.

Definition at line 362 of file lib/odometry_helper.cpp.

◆ getTwist()

Twist2D ecl::odometry::getTwist ( const Odom2D odom)

Extract twist from odometry.

Definition at line 342 of file lib/odometry_helper.cpp.

◆ getTwists()

Twist2DVector ecl::odometry::getTwists ( const Odom2DTrajectory trajectory)

Extract twists of odom trajectory.

Definition at line 214 of file lib/odometry_helper.cpp.

◆ getVelocityAngular() [1/2]

float ecl::odometry::getVelocityAngular ( const Odom2D odom)

Get angular velocity.

Definition at line 299 of file lib/odometry_helper.cpp.

◆ getVelocityAngular() [2/2]

float ecl::odometry::getVelocityAngular ( const Twist2D twist)

Get angular velocity.

Definition at line 314 of file lib/odometry_helper.cpp.

◆ getVelocityX() [1/2]

float ecl::odometry::getVelocityX ( const Odom2D odom)

Get linear velocity x direction.

Definition at line 289 of file lib/odometry_helper.cpp.

◆ getVelocityX() [2/2]

float ecl::odometry::getVelocityX ( const Twist2D twist)

Get linear velocity x direction.

Definition at line 304 of file lib/odometry_helper.cpp.

◆ getVelocityY() [1/2]

float ecl::odometry::getVelocityY ( const Odom2D odom)

Get linear velocity y direction.

Definition at line 294 of file lib/odometry_helper.cpp.

◆ getVelocityY() [2/2]

float ecl::odometry::getVelocityY ( const Twist2D twist)

Get linear velocity y direction.

Definition at line 309 of file lib/odometry_helper.cpp.

◆ getX() [1/3]

float ecl::odometry::getX ( const Odom2D odom)

Get x position.

Definition at line 319 of file lib/odometry_helper.cpp.

◆ getX() [2/3]

float ecl::odometry::getX ( const Pose2D pose)

Get x position.

Definition at line 347 of file lib/odometry_helper.cpp.

◆ getX() [3/3]

float ecl::odometry::getX ( const Position2D position)

Get x position.

Definition at line 367 of file lib/odometry_helper.cpp.

◆ getY() [1/3]

float ecl::odometry::getY ( const Odom2D odom)

Get y position.

Definition at line 323 of file lib/odometry_helper.cpp.

◆ getY() [2/3]

float ecl::odometry::getY ( const Pose2D pose)

Get y position.

Definition at line 352 of file lib/odometry_helper.cpp.

◆ getY() [3/3]

float ecl::odometry::getY ( const Position2D position)

Get y position.

Definition at line 372 of file lib/odometry_helper.cpp.

◆ getYaw() [1/2]

float ecl::odometry::getYaw ( const Odom2D odom)

Get yaw (heading)

Definition at line 327 of file lib/odometry_helper.cpp.

◆ getYaw() [2/2]

float ecl::odometry::getYaw ( const Pose2D pose)

Get yaw (heading)

Definition at line 357 of file lib/odometry_helper.cpp.

◆ resize() [1/2]

void ecl::odometry::resize ( Odom2DTrajectory trajectory,
const int &  size 
)

Definition at line 164 of file lib/odometry_helper.cpp.

◆ resize() [2/2]

void ecl::odometry::resize ( Trajectory2D trajectory,
const int &  size 
)

Resizes trajectory appending uninitialised values if needed.

This is conservative, meaning elements in the trajectory don't change. (Opposed to the default Eigen resize)

Definition at line 159 of file lib/odometry_helper.cpp.

◆ setAt() [1/2]

void ecl::odometry::setAt ( Odom2DTrajectory trajectory,
const int &  index,
const Odom2D odom 
)

Set element at index of trajectory.

Definition at line 174 of file lib/odometry_helper.cpp.

◆ setAt() [2/2]

void ecl::odometry::setAt ( Trajectory2D trajectory,
const int &  index,
const Pose2D pose 
)

Set element at index of trajectory.

Definition at line 169 of file lib/odometry_helper.cpp.

◆ setVelocityAngular() [1/2]

void ecl::odometry::setVelocityAngular ( Odom2D odom,
const float &  value 
)

Set angular velocity.

Definition at line 229 of file lib/odometry_helper.cpp.

◆ setVelocityAngular() [2/2]

void ecl::odometry::setVelocityAngular ( Twist2D twist,
const float &  value 
)

Set angular velocity.

Definition at line 244 of file lib/odometry_helper.cpp.

◆ setVelocityX() [1/2]

void ecl::odometry::setVelocityX ( Odom2D odom,
const float &  value 
)

Set linear velocity x direction.

Definition at line 219 of file lib/odometry_helper.cpp.

◆ setVelocityX() [2/2]

void ecl::odometry::setVelocityX ( Twist2D twist,
const float &  value 
)

Set linear velocity x direction.

Definition at line 234 of file lib/odometry_helper.cpp.

◆ setVelocityY() [1/2]

void ecl::odometry::setVelocityY ( Odom2D odom,
const float &  value 
)

Set linear velocity y direction.

Definition at line 224 of file lib/odometry_helper.cpp.

◆ setVelocityY() [2/2]

void ecl::odometry::setVelocityY ( Twist2D twist,
const float &  value 
)

Set linear velocity y direction.

Definition at line 239 of file lib/odometry_helper.cpp.

◆ setX() [1/3]

void ecl::odometry::setX ( Odom2D odom,
const float &  value 
)

Set x position.

Definition at line 249 of file lib/odometry_helper.cpp.

◆ setX() [2/3]

void ecl::odometry::setX ( Pose2D pose,
const float &  value 
)

Set x position.

Definition at line 264 of file lib/odometry_helper.cpp.

◆ setX() [3/3]

void ecl::odometry::setX ( Position2D position,
const float &  value 
)

Set x position.

Definition at line 279 of file lib/odometry_helper.cpp.

◆ setY() [1/3]

void ecl::odometry::setY ( Odom2D odom,
const float &  value 
)

Set y position.

Definition at line 254 of file lib/odometry_helper.cpp.

◆ setY() [2/3]

void ecl::odometry::setY ( Pose2D pose,
const float &  value 
)

Set y position.

Definition at line 269 of file lib/odometry_helper.cpp.

◆ setY() [3/3]

void ecl::odometry::setY ( Position2D position,
const float &  value 
)

Set y position.

Definition at line 284 of file lib/odometry_helper.cpp.

◆ setYaw() [1/2]

void ecl::odometry::setYaw ( Odom2D odom,
const float &  value 
)

Set yaw (heading)

Definition at line 259 of file lib/odometry_helper.cpp.

◆ setYaw() [2/2]

void ecl::odometry::setYaw ( Pose2D pose,
const float &  value 
)

Set yaw (heading)

Definition at line 274 of file lib/odometry_helper.cpp.

◆ size() [1/2]

int ecl::odometry::size ( const Odom2DTrajectory trajectory)

Get the size of the trajectory.

Definition at line 81 of file lib/odometry_helper.cpp.

◆ size() [2/2]

int ecl::odometry::size ( const Trajectory2D trajectory)

Get the size of the trajectory.

Definition at line 76 of file lib/odometry_helper.cpp.

◆ vectorToTrajectory() [1/2]

Odom2DTrajectory ecl::odometry::vectorToTrajectory ( const std::vector< Odom2D > &  vec)

Convert vector of Odom2D to Odom2DTrajectory.

Resizes trajectory appending uninitialised values if needed

This is conservative, meaning elements in the trajectory don't change. (Opposed to the default Eigen resize)

Definition at line 146 of file lib/odometry_helper.cpp.

◆ vectorToTrajectory() [2/2]

Trajectory2D ecl::odometry::vectorToTrajectory ( const std::vector< Pose2D > &  vec)

Convert vector of Pose2D to Trajectory2D.

Definition at line 133 of file lib/odometry_helper.cpp.



ecl_geometry
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:40