|
RIT VEXU Core API
|
#include <twist2d.h>
Public Member Functions | |
| constexpr | Twist2d () |
| Twist2d (const double &dx, const double &dy, const double &dtheta) | |
| Twist2d (const Eigen::Vector3d &twist_vector) | |
| double | dx () const |
| double | dy () const |
| double | dtheta () const |
| bool | operator== (const Twist2d &other) const |
| Twist2d | operator* (const double &scalar) const |
| Twist2d | operator/ (const double &scalar) const |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Twist2d &twist) |
Class representing a difference between two poses, more specifically a distance along an arc from a pose.
Assumes conventional cartesian coordinate system: Looking down at the coordinate plane, +X is right +Y is up +Theta is counterclockwise
|
constexpr |
Default Constructor for Twist2d
| Twist2d::Twist2d | ( | const double & | dx, |
| const double & | dy, | ||
| const double & | dtheta ) |
Constructs a twist with given translation and angle deltas.
| dx | the linear dx component. |
| dy | the linear dy component. |
| dtheta | the angular dtheta component. |
| Twist2d::Twist2d | ( | const Eigen::Vector3d & | twist_vector | ) |
Constructs a twist with given translation and angle deltas.
| twist_vector | vector of the form [dx, dy, dtheta] |
| double Twist2d::dtheta | ( | ) | const |
Returns the angular dtheta component.
| double Twist2d::dx | ( | ) | const |
Returns the linear dx component.
| double Twist2d::dy | ( | ) | const |
Returns the linear dy component.
| Twist2d Twist2d::operator* | ( | const double & | scalar | ) | const |
Multiplies this twist by a scalar.
| scalar | the scalar value to multiply by. |
| Twist2d Twist2d::operator/ | ( | const double & | scalar | ) | const |
Divides this twist by a scalar.
| scalar | the scalar value to divide by. |
| bool Twist2d::operator== | ( | const Twist2d & | other | ) | const |
Compares this to another twist.
| other | the other twist to compare to. |
|
friend |
Sends a twist to an output stream. Ex. std::cout << twist;
prints "Twist2d[dx: (value), dy: (value), drad: (radians)]"
Sends a twist to an output stream. Ex. std::cout << twist;
prints "Twist2d[x: (value), y: (value), rad: (radians), deg: (degrees)]"