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 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.
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.
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.
typedef Eigen::Vector3f ecl::odometry::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.
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.
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.
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.
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.
void ecl::odometry::addAtEnd | ( | Odom2DTrajectory & | target, |
const Odom2DTrajectory & | addition | ||
) |
Definition at line 122 of file lib/odometry_helper.cpp.
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 between the positions of odometries.
Definition at line 86 of file lib/odometry_helper.cpp.
Distance between a pose and the position of a odometry.
Definition at line 91 of file lib/odometry_helper.cpp.
Distance between poses.
Definition at line 96 of file lib/odometry_helper.cpp.
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.
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.
Squared distance between the positions of odometries.
Definition at line 101 of file lib/odometry_helper.cpp.
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.
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.
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.
Odom2D ecl::odometry::getAt | ( | const Odom2DTrajectory & | trajectory, |
const int & | index | ||
) |
Get element of trajectory.
Definition at line 184 of file lib/odometry_helper.cpp.
Pose2D ecl::odometry::getAt | ( | const Trajectory2D & | trajectory, |
const int & | index | ||
) |
Get element of trajectory.
Definition at line 179 of file lib/odometry_helper.cpp.
Odom2D ecl::odometry::getBack | ( | const Odom2DTrajectory & | trajectory | ) |
Get back (last) element of trajectory.
Definition at line 204 of file lib/odometry_helper.cpp.
Pose2D ecl::odometry::getBack | ( | const Trajectory2D & | trajectory | ) |
Get back (last) element of trajectory.
Definition at line 194 of file lib/odometry_helper.cpp.
Odom2D ecl::odometry::getFront | ( | const Odom2DTrajectory & | trajectory | ) |
Get front (first) element of trajectory.
Definition at line 199 of file lib/odometry_helper.cpp.
Pose2D ecl::odometry::getFront | ( | const Trajectory2D & | trajectory | ) |
Get front (first) element of trajectory.
Definition at line 189 of file lib/odometry_helper.cpp.
Extract pose from odometry.
Definition at line 337 of file lib/odometry_helper.cpp.
Trajectory2D ecl::odometry::getPoses | ( | const Odom2DTrajectory & | trajectory | ) |
Extract poses of odom trajectory.
Definition at line 209 of file lib/odometry_helper.cpp.
Position2D ecl::odometry::getPosition | ( | const Odom2D & | odom | ) |
Extract position from odometry.
Definition at line 332 of file lib/odometry_helper.cpp.
Position2D ecl::odometry::getPosition | ( | const Pose2D & | pose | ) |
Extract position from pose.
Definition at line 362 of file lib/odometry_helper.cpp.
Extract twist from odometry.
Definition at line 342 of file lib/odometry_helper.cpp.
Twist2DVector ecl::odometry::getTwists | ( | const Odom2DTrajectory & | trajectory | ) |
Extract twists of odom trajectory.
Definition at line 214 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityAngular | ( | const Odom2D & | odom | ) |
Get angular velocity.
Definition at line 299 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityAngular | ( | const Twist2D & | twist | ) |
Get angular velocity.
Definition at line 314 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityX | ( | const Odom2D & | odom | ) |
Get linear velocity x direction.
Definition at line 289 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityX | ( | const Twist2D & | twist | ) |
Get linear velocity x direction.
Definition at line 304 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityY | ( | const Odom2D & | odom | ) |
Get linear velocity y direction.
Definition at line 294 of file lib/odometry_helper.cpp.
float ecl::odometry::getVelocityY | ( | const Twist2D & | twist | ) |
Get linear velocity y direction.
Definition at line 309 of file lib/odometry_helper.cpp.
float ecl::odometry::getX | ( | const Odom2D & | odom | ) |
Get x position.
Definition at line 319 of file lib/odometry_helper.cpp.
float ecl::odometry::getX | ( | const Pose2D & | pose | ) |
Get x position.
Definition at line 347 of file lib/odometry_helper.cpp.
float ecl::odometry::getX | ( | const Position2D & | position | ) |
Get x position.
Definition at line 367 of file lib/odometry_helper.cpp.
float ecl::odometry::getY | ( | const Odom2D & | odom | ) |
Get y position.
Definition at line 323 of file lib/odometry_helper.cpp.
float ecl::odometry::getY | ( | const Pose2D & | pose | ) |
Get y position.
Definition at line 352 of file lib/odometry_helper.cpp.
float ecl::odometry::getY | ( | const Position2D & | position | ) |
Get y position.
Definition at line 372 of file lib/odometry_helper.cpp.
float ecl::odometry::getYaw | ( | const Odom2D & | odom | ) |
Get yaw (heading)
Definition at line 327 of file lib/odometry_helper.cpp.
float ecl::odometry::getYaw | ( | const Pose2D & | pose | ) |
Get yaw (heading)
Definition at line 357 of file lib/odometry_helper.cpp.
void ecl::odometry::resize | ( | Odom2DTrajectory & | trajectory, |
const int & | size | ||
) |
Definition at line 164 of file lib/odometry_helper.cpp.
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.
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.
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.
void ecl::odometry::setVelocityAngular | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set angular velocity.
Definition at line 229 of file lib/odometry_helper.cpp.
void ecl::odometry::setVelocityAngular | ( | Twist2D & | twist, |
const float & | value | ||
) |
Set angular velocity.
Definition at line 244 of file lib/odometry_helper.cpp.
void ecl::odometry::setVelocityX | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set linear velocity x direction.
Definition at line 219 of file lib/odometry_helper.cpp.
void ecl::odometry::setVelocityX | ( | Twist2D & | twist, |
const float & | value | ||
) |
Set linear velocity x direction.
Definition at line 234 of file lib/odometry_helper.cpp.
void ecl::odometry::setVelocityY | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set linear velocity y direction.
Definition at line 224 of file lib/odometry_helper.cpp.
void ecl::odometry::setVelocityY | ( | Twist2D & | twist, |
const float & | value | ||
) |
Set linear velocity y direction.
Definition at line 239 of file lib/odometry_helper.cpp.
void ecl::odometry::setX | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set x position.
Definition at line 249 of file lib/odometry_helper.cpp.
void ecl::odometry::setX | ( | Pose2D & | pose, |
const float & | value | ||
) |
Set x position.
Definition at line 264 of file lib/odometry_helper.cpp.
void ecl::odometry::setX | ( | Position2D & | position, |
const float & | value | ||
) |
Set x position.
Definition at line 279 of file lib/odometry_helper.cpp.
void ecl::odometry::setY | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set y position.
Definition at line 254 of file lib/odometry_helper.cpp.
void ecl::odometry::setY | ( | Pose2D & | pose, |
const float & | value | ||
) |
Set y position.
Definition at line 269 of file lib/odometry_helper.cpp.
void ecl::odometry::setY | ( | Position2D & | position, |
const float & | value | ||
) |
Set y position.
Definition at line 284 of file lib/odometry_helper.cpp.
void ecl::odometry::setYaw | ( | Odom2D & | odom, |
const float & | value | ||
) |
Set yaw (heading)
Definition at line 259 of file lib/odometry_helper.cpp.
void ecl::odometry::setYaw | ( | Pose2D & | pose, |
const float & | value | ||
) |
Set yaw (heading)
Definition at line 274 of file lib/odometry_helper.cpp.
int ecl::odometry::size | ( | const Odom2DTrajectory & | trajectory | ) |
Get the size of the trajectory.
Definition at line 81 of file lib/odometry_helper.cpp.
int ecl::odometry::size | ( | const Trajectory2D & | trajectory | ) |
Get the size of the trajectory.
Definition at line 76 of file lib/odometry_helper.cpp.
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.
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.