Control Libraries 7.4.0
|
Class to define twist in Cartesian space as 3D linear and angular velocity vectors. More...
#include <CartesianTwist.hpp>
Public Member Functions | |
const Eigen::Vector3d & | get_position () const =delete |
const Eigen::Quaterniond & | get_orientation () const =delete |
Eigen::Vector4d | get_orientation_coefficients () const =delete |
Eigen::Matrix< double, 7, 1 > | get_pose () const =delete |
Eigen::Matrix4d | get_transformation_matrix () const =delete |
const Eigen::Vector3d & | get_linear_acceleration () const =delete |
const Eigen::Vector3d & | get_angular_acceleration () const =delete |
Eigen::Matrix< double, 6, 1 > | get_acceleration () const =delete |
const Eigen::Vector3d & | get_force () const =delete |
const Eigen::Vector3d & | get_torque () const =delete |
Eigen::Matrix< double, 6, 1 > | get_wrench () const =delete |
void | set_position (const Eigen::Vector3d &position)=delete |
void | set_position (const std::vector< double > &position)=delete |
void | set_position (const double &x, const double &y, const double &z)=delete |
void | set_orientation (const Eigen::Quaterniond &orientation)=delete |
void | set_orientation (const Eigen::Vector4d &orientation)=delete |
void | set_orientation (const std::vector< double > &orientation)=delete |
void | set_orientation (const double &w, const double &x, const double &y, const double &z)=delete |
void | set_pose (const Eigen::Vector3d &position, const Eigen::Quaterniond &orientation)=delete |
void | set_pose (const Eigen::Matrix< double, 7, 1 > &pose)=delete |
void | set_pose (const std::vector< double > &pose)=delete |
void | set_linear_acceleration (const Eigen::Vector3d &linear_acceleration)=delete |
void | set_linear_acceleration (const std::vector< double > &linear_acceleration)=delete |
void | set_linear_acceleration (const double &x, const double &y, const double &z)=delete |
void | set_angular_acceleration (const Eigen::Vector3d &angular_acceleration)=delete |
void | set_angular_acceleration (const std::vector< double > &angular_acceleration)=delete |
void | set_angular_acceleration (const double &x, const double &y, const double &z)=delete |
void | set_acceleration (const Eigen::Matrix< double, 6, 1 > &acceleration)=delete |
void | set_acceleration (const std::vector< double > &acceleration)=delete |
void | set_force (const Eigen::Vector3d &force)=delete |
void | set_force (const std::vector< double > &force)=delete |
void | set_force (const double &x, const double &y, const double &z)=delete |
void | set_torque (const Eigen::Vector3d &torque)=delete |
void | set_torque (const std::vector< double > &torque)=delete |
void | set_torque (const double &x, const double &y, const double &z)=delete |
void | set_wrench (const Eigen::Matrix< double, 6, 1 > &wrench)=delete |
void | set_wrench (const std::vector< double > &wrench)=delete |
CartesianState & | operator*= (const CartesianState &state)=delete |
CartesianState | operator* (const CartesianState &state) const =delete |
Eigen::Vector3d | operator* (const Eigen::Vector3d &vector) const =delete |
CartesianState & | operator+= (const CartesianPose &pose)=delete |
CartesianState & | operator+= (const CartesianAcceleration &acceleration)=delete |
CartesianState & | operator+= (const CartesianWrench &wrench)=delete |
CartesianState | operator+ (const CartesianPose &pose) const =delete |
CartesianState | operator+ (const CartesianAcceleration &acceleration) const =delete |
CartesianState | operator+ (const CartesianWrench &wrench) const =delete |
CartesianState & | operator-= (const CartesianPose &pose)=delete |
CartesianState & | operator-= (const CartesianAcceleration &acceleration)=delete |
CartesianState & | operator-= (const CartesianWrench &wrench)=delete |
CartesianState | operator- (const CartesianPose &pose) const =delete |
CartesianState | operator- (const CartesianAcceleration &acceleration) const =delete |
CartesianState | operator- (const CartesianWrench &wrench) const =delete |
CartesianTwist () | |
Empty constructor. | |
CartesianTwist (const std::string &name, const std::string &reference="world") | |
Constructor with name and reference frame provided. | |
CartesianTwist (const CartesianTwist &twist) | |
Copy constructor. | |
CartesianTwist (const CartesianState &state) | |
Copy constructor from a Cartesian state. | |
CartesianTwist (const CartesianPose &pose) | |
Copy constructor from a Cartesian pose by considering that it is equivalent to dividing the pose by 1 second. | |
CartesianTwist (const CartesianAcceleration &acceleration) | |
Copy constructor from a Cartesian acceleration by considering that it is a twist over 1 second. | |
CartesianTwist (const std::string &name, const Eigen::Vector3d &linear_velocity, const std::string &reference="world") | |
Construct a Cartesian twist from a linear velocity given as a vector. | |
CartesianTwist (const std::string &name, const Eigen::Vector3d &linear_velocity, const Eigen::Vector3d &angular_velocity, const std::string &reference="world") | |
Construct a Cartesian twist from a linear velocity and angular velocity given as vectors. | |
CartesianTwist (const std::string &name, const Eigen::Matrix< double, 6, 1 > &twist, const std::string &reference="world") | |
Construct a Cartesian twist from a single 6d twist vector. | |
CartesianTwist & | operator= (const CartesianTwist &twist)=default |
Copy assignment operator that has to be defined to the custom assignment operator. | |
Eigen::VectorXd | data () const override |
Returns the twist data as an Eigen vector. | |
void | set_data (const Eigen::VectorXd &data) override |
Set the twist data from an Eigen vector. | |
void | set_data (const std::vector< double > &data) override |
Set the twist data from a std vector. | |
void | clamp (double max_linear, double max_angular, double linear_noise_ratio=0, double angular_noise_ratio=0) |
Clamp inplace the magnitude of the twist to the values in argument. | |
CartesianTwist | clamped (double max_linear, double max_angular, double noise_ratio=0, double angular_noise_ratio=0) const |
Return the clamped twist. | |
CartesianTwist | copy () const |
Return a copy of the Cartesian twist. | |
CartesianTwist | inverse () const |
Compute the inverse of the current Cartesian twist. | |
CartesianTwist | normalized (const CartesianStateVariable &state_variable_type=CartesianStateVariable::TWIST) const |
Compute the normalized twist at the state variable given in argument (default is full twist) | |
std::vector< double > | norms (const CartesianStateVariable &state_variable_type=CartesianStateVariable::TWIST) const override |
Compute the norms of the state variable specified by the input type (default is full twist) | |
CartesianTwist & | operator*= (double lambda) |
Scale inplace by a scalar. | |
CartesianTwist | operator* (double lambda) const |
Scale a Cartesian twist by a scalar. | |
CartesianPose | operator* (const std::chrono::nanoseconds &dt) const |
Integrate a Cartesian twist over a time period. | |
CartesianTwist & | operator/= (double lambda) |
Scale inplace by a scalar. | |
CartesianTwist | operator/ (double lambda) const |
Scale a Cartesian twist by a scalar. | |
CartesianAcceleration | operator/ (const std::chrono::nanoseconds &dt) const |
Differentiate a Cartesian twist over a time period. | |
CartesianTwist & | operator+= (const CartesianTwist &twist) |
Add inplace another Cartesian twist. | |
CartesianTwist & | operator+= (const CartesianState &state) |
Add inplace another twist from a Cartesian state. | |
CartesianTwist | operator+ (const CartesianTwist &twist) const |
Add another Cartesian twist. | |
CartesianState | operator+ (const CartesianState &state) const |
Add another Cartesian state. | |
CartesianTwist | operator- () const |
Negate a Cartesian twist. | |
CartesianTwist & | operator-= (const CartesianTwist &twist) |
Compute inplace the difference with another Cartesian twist. | |
CartesianTwist & | operator-= (const CartesianState &state) |
Compute inplace the difference with another Cartesian state. | |
CartesianTwist | operator- (const CartesianTwist &twist) const |
Compute the difference with another Cartesian twist. | |
CartesianState | operator- (const CartesianState &state) const |
Compute the difference with a Cartesian state. | |
Public Member Functions inherited from state_representation::CartesianState | |
CartesianState () | |
Empty constructor. | |
CartesianState (const std::string &name, const std::string &reference="world") | |
Constructor with name and reference frame provided. | |
CartesianState (const CartesianState &state) | |
Copy constructor of a Cartesian state. | |
CartesianState & | operator= (const CartesianState &state) |
Copy assignment operator that has to be defined to the custom assignment operator. | |
const Eigen::Vector3d & | get_position () const |
Getter of the position attribute. | |
const Eigen::Quaterniond & | get_orientation () const |
Getter of the orientation attribute. | |
Eigen::Vector4d | get_orientation_coefficients () const |
Getter of the orientation attribute as Vector4d of coefficients. | |
Eigen::Matrix< double, 7, 1 > | get_pose () const |
Getter of the pose from position and orientation attributes. | |
Eigen::Matrix4d | get_transformation_matrix () const |
Getter of a pose from position and orientation attributes. | |
const Eigen::Vector3d & | get_linear_velocity () const |
Getter of the linear velocity attribute. | |
const Eigen::Vector3d & | get_angular_velocity () const |
Getter of the angular velocity attribute. | |
Eigen::Matrix< double, 6, 1 > | get_twist () const |
Getter of the 6d twist from linear and angular velocity attributes. | |
const Eigen::Vector3d & | get_linear_acceleration () const |
Getter of the linear acceleration attribute. | |
const Eigen::Vector3d & | get_angular_acceleration () const |
Getter of the angular acceleration attribute. | |
Eigen::Matrix< double, 6, 1 > | get_acceleration () const |
Getter of the 6d acceleration from linear and angular acceleration attributes. | |
const Eigen::Vector3d & | get_force () const |
Getter of the force attribute. | |
const Eigen::Vector3d & | get_torque () const |
Getter of the torque attribute. | |
Eigen::Matrix< double, 6, 1 > | get_wrench () const |
Getter of the 6d wrench from force and torque attributes. | |
Eigen::ArrayXd | array () const |
Return the data vector as an Eigen Array. | |
std::vector< double > | to_std_vector () const |
Return the state as a std vector. | |
void | set_position (const Eigen::Vector3d &position) |
Setter of the position. | |
void | set_position (const std::vector< double > &position) |
Setter of the position from a std vector. | |
void | set_position (const double &x, const double &y, const double &z) |
Setter of the position from three scalar coordinates. | |
void | set_orientation (const Eigen::Quaterniond &orientation) |
Setter of the orientation. | |
void | set_orientation (const Eigen::Vector4d &orientation) |
Setter of the orientation from a 4d vector. | |
void | set_orientation (const std::vector< double > &orientation) |
Setter of the orientation from a std vector. | |
void | set_orientation (const double &w, const double &x, const double &y, const double &z) |
Setter of the orientation from four scalar coefficients (w, x, y, z) | |
void | set_pose (const Eigen::Vector3d &position, const Eigen::Quaterniond &orientation) |
Setter of the pose from both position and orientation. | |
void | set_pose (const Eigen::Matrix< double, 7, 1 > &pose) |
Setter of the pose from both position and orientation as Eigen 7d vector. | |
void | set_pose (const std::vector< double > &pose) |
Setter of the pose from both position and orientation as std vector. | |
void | set_linear_velocity (const Eigen::Vector3d &linear_velocity) |
Setter of the linear velocity attribute. | |
void | set_linear_velocity (const std::vector< double > &linear_velocity) |
Setter of the linear velocity from a std vector. | |
void | set_linear_velocity (const double &x, const double &y, const double &z) |
Setter of the linear velocity from three scalar coordinates. | |
void | set_angular_velocity (const Eigen::Vector3d &angular_velocity) |
Setter of the angular velocity attribute. | |
void | set_angular_velocity (const std::vector< double > &angular_velocity) |
Setter of the angular velocity from a std vector. | |
void | set_angular_velocity (const double &x, const double &y, const double &z) |
Setter of the angular velocity from three scalar coordinates. | |
void | set_twist (const Eigen::Matrix< double, 6, 1 > &twist) |
Setter of the linear and angular velocities from a 6d twist vector. | |
void | set_twist (const std::vector< double > &twist) |
Setter of the linear and angular velocities from a std vector. | |
void | set_linear_acceleration (const Eigen::Vector3d &linear_acceleration) |
Setter of the linear acceleration attribute. | |
void | set_linear_acceleration (const std::vector< double > &linear_acceleration) |
Setter of the linear acceleration from a std vector. | |
void | set_linear_acceleration (const double &x, const double &y, const double &z) |
Setter of the linear acceleration from three scalar coordinates. | |
void | set_angular_acceleration (const Eigen::Vector3d &angular_acceleration) |
Setter of the angular velocity attribute. | |
void | set_angular_acceleration (const std::vector< double > &angular_acceleration) |
Setter of the angular acceleration from a std vector. | |
void | set_angular_acceleration (const double &x, const double &y, const double &z) |
Setter of the angular acceleration from three scalar coordinates. | |
void | set_acceleration (const Eigen::Matrix< double, 6, 1 > &acceleration) |
Setter of the linear and angular acceleration from a 6d acceleration vector. | |
void | set_acceleration (const std::vector< double > &acceleration) |
Setter of the linear and angular acceleration from a std vector. | |
void | set_force (const Eigen::Vector3d &force) |
Setter of the force attribute. | |
void | set_force (const std::vector< double > &force) |
Setter of the force from a std vector. | |
void | set_force (const double &x, const double &y, const double &z) |
Setter of the force from three scalar coordinates. | |
void | set_torque (const Eigen::Vector3d &torque) |
Setter of the torque attribute. | |
void | set_torque (const std::vector< double > &torque) |
Setter of the torque from a std vector. | |
void | set_torque (const double &x, const double &y, const double &z) |
Setter of the torque from three scalar coordinates. | |
void | set_wrench (const Eigen::Matrix< double, 6, 1 > &wrench) |
Setter of the force and torque from a 6d wrench vector. | |
void | set_wrench (const std::vector< double > &wrench) |
Setter of the force and torque from a std vector. | |
void | set_zero () |
Set the State to a zero value. | |
void | clamp_state_variable (double max_norm, const CartesianStateVariable &state_variable_type, double noise_ratio=0) |
Clamp inplace the norm of the a specific state variable. | |
CartesianState | copy () const |
Return a copy of the Cartesian state. | |
double | dist (const CartesianState &state, const CartesianStateVariable &state_variable_type=CartesianStateVariable::ALL) const |
Compute the distance to another state as the sum of distances between each features. | |
void | reset () override |
Reset the object to a post-construction state. | |
CartesianState | inverse () const |
Compute the inverse of the current Cartesian state. | |
void | normalize (const CartesianStateVariable &state_variable_type=CartesianStateVariable::ALL) |
Normalize inplace the state at the state variable given in argument. Default is full state. | |
CartesianState | normalized (const CartesianStateVariable &state_variable_type=CartesianStateVariable::ALL) const |
Compute the normalized state at the state variable given in argument. Default is full state. | |
CartesianState & | operator*= (const CartesianState &state) |
Transform inplace a Cartesian state into the current reference frame. | |
CartesianState | operator* (const CartesianState &state) const |
Transform a Cartesian state into the left operand state reference frame. | |
CartesianState & | operator*= (double lambda) |
Scale inplace by a scalar. | |
CartesianState | operator* (double lambda) const |
Scale a Cartesian pose by a scalar. | |
Eigen::Vector3d | operator* (const Eigen::Vector3d &vector) const |
Transform a vector into the state reference frame. | |
CartesianState & | operator/= (double lambda) |
Scale inplace by a scalar. | |
CartesianState | operator/ (double lambda) const |
Scale a Cartesian state by a scalar. | |
CartesianState & | operator+= (const CartesianState &state) |
Add inplace another Cartesian state. | |
CartesianState | operator+ (const CartesianState &state) const |
Add another Cartesian state. | |
CartesianState | operator- () const |
Negate a Cartesian state. | |
CartesianState & | operator-= (const CartesianState &state) |
Compute inplace the difference with another Cartesian state. | |
CartesianState | operator- (const CartesianState &state) const |
Compute the difference with another Cartesian state. | |
Public Member Functions inherited from state_representation::SpatialState | |
SpatialState () | |
Empty constructor. | |
SpatialState (const std::string &name, const std::string &reference_frame="world") | |
Constructor with name and reference frame specification. | |
SpatialState (const SpatialState &state) | |
Copy constructor from another spatial state. | |
SpatialState & | operator= (const SpatialState &state) |
Copy assignment operator that has to be defined to the custom assignment operator. | |
const std::string & | get_reference_frame () const |
Getter of the reference frame as const reference. | |
virtual void | set_reference_frame (const std::string &reference_frame) |
Setter of the reference frame. | |
bool | is_incompatible (const State &state) const override |
Check if the spatial state is incompatible for operations with the state given as argument. | |
Public Member Functions inherited from state_representation::State | |
State () | |
Empty constructor. | |
State (const std::string &name) | |
Constructor with name specification. | |
State (const State &state) | |
Copy constructor from another state. | |
virtual | ~State ()=default |
Virtual destructor. | |
State & | operator= (const State &state) |
Copy assignment operator that has to be defined to the custom assignment operator. | |
const StateType & | get_type () const |
Getter of the type attribute. | |
const std::string & | get_name () const |
Getter of the name attribute. | |
bool | is_empty () const |
Getter of the empty attribute. | |
const std::chrono::time_point< std::chrono::steady_clock > & | get_timestamp () const |
Getter of the timestamp attribute. | |
virtual void | set_name (const std::string &name) |
Setter of the name attribute. | |
void | reset_timestamp () |
Reset the timestamp attribute to now. | |
virtual void | set_data (const Eigen::MatrixXd &data) |
Set the data of the state from an Eigen matrix. | |
double | get_age () const |
Get the age of the state, i.e. the time since the last modification. | |
bool | is_deprecated (double time_delay) const |
Check if the state is deprecated given a certain time delay. | |
template<typename DurationT > | |
bool | is_deprecated (const std::chrono::duration< int64_t, DurationT > &time_delay) const |
Check if the state is deprecated given a certain time delay. | |
operator bool () const noexcept | |
Boolean operator for the truthiness of a state. | |
Static Public Member Functions | |
static CartesianTwist | Zero (const std::string &name, const std::string &reference="world") |
Constructor for the zero twist. | |
static CartesianTwist | Random (const std::string &name, const std::string &reference="world") |
Constructor for a random twist. | |
Static Public Member Functions inherited from state_representation::CartesianState | |
static CartesianState | Identity (const std::string &name, const std::string &reference="world") |
Constructor for the identity Cartesian state (identity pose and 0 for the rest) | |
static CartesianState | Random (const std::string &name, const std::string &reference="world") |
Constructor for a random Cartesian state. | |
Friends | |
CartesianTwist | operator* (double lambda, const CartesianTwist &twist) |
Scale a Cartesian twist by a scalar. | |
CartesianTwist | operator* (const Eigen::Matrix< double, 6, 6 > &lambda, const CartesianTwist &twist) |
Scale a Cartesian twist in all dimensions by a matrix. | |
CartesianPose | operator* (const std::chrono::nanoseconds &dt, const CartesianTwist &twist) |
Integrate a Cartesian twist over a time period. | |
std::ostream & | operator<< (std::ostream &os, const CartesianTwist &twist) |
Overload the ostream operator for printing. | |
Additional Inherited Members | |
Protected Member Functions inherited from state_representation::CartesianState | |
Eigen::VectorXd | get_state_variable (const CartesianStateVariable &state_variable_type) const |
Getter of the variable value corresponding to the input. | |
void | set_state_variable (const Eigen::VectorXd &new_value, const CartesianStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. | |
void | set_state_variable (const std::vector< double > &new_value, const CartesianStateVariable &state_variable_type) |
Setter of the variable value corresponding to the input. | |
std::string | to_string () const override |
Convert the state to its string representation. | |
Protected Member Functions inherited from state_representation::SpatialState | |
std::string | to_string () const override |
Convert the state to its string representation. | |
Protected Member Functions inherited from state_representation::State | |
void | set_type (const StateType &type) |
Setter of the state type attribute. | |
void | set_empty (bool empty=true) |
Setter of the empty attribute. | |
void | assert_not_empty () const |
Throw an exception if the state is empty. | |
Class to define twist in Cartesian space as 3D linear and angular velocity vectors.
Definition at line 18 of file CartesianTwist.hpp.
|
explicit |
Empty constructor.
Definition at line 8 of file CartesianTwist.cpp.
|
explicit |
Constructor with name and reference frame provided.
name | The name of the state |
reference | The name of the reference frame (default is "world") |
Definition at line 12 of file CartesianTwist.cpp.
state_representation::CartesianTwist::CartesianTwist | ( | const CartesianTwist & | twist | ) |
Copy constructor.
Definition at line 48 of file CartesianTwist.cpp.
state_representation::CartesianTwist::CartesianTwist | ( | const CartesianState & | state | ) |
Copy constructor from a Cartesian state.
Definition at line 40 of file CartesianTwist.cpp.
state_representation::CartesianTwist::CartesianTwist | ( | const CartesianPose & | pose | ) |
Copy constructor from a Cartesian pose by considering that it is equivalent to dividing the pose by 1 second.
Definition at line 51 of file CartesianTwist.cpp.
state_representation::CartesianTwist::CartesianTwist | ( | const CartesianAcceleration & | acceleration | ) |
Copy constructor from a Cartesian acceleration by considering that it is a twist over 1 second.
Definition at line 53 of file CartesianTwist.cpp.
|
explicit |
Construct a Cartesian twist from a linear velocity given as a vector.
Definition at line 17 of file CartesianTwist.cpp.
|
explicit |
Construct a Cartesian twist from a linear velocity and angular velocity given as vectors.
Definition at line 24 of file CartesianTwist.cpp.
|
explicit |
Construct a Cartesian twist from a single 6d twist vector.
Definition at line 33 of file CartesianTwist.cpp.
void state_representation::CartesianTwist::clamp | ( | double | max_linear, |
double | max_angular, | ||
double | linear_noise_ratio = 0 , |
||
double | angular_noise_ratio = 0 |
||
) |
Clamp inplace the magnitude of the twist to the values in argument.
max_linear | The maximum magnitude of the linear velocity |
max_angular | The maximum magnitude of the angular velocity |
linear_noise_ratio | If provided, this value will be used to apply a deadzone under which the linear velocity will be set to 0 |
angular_noise_ratio | If provided, this value will be used to apply a deadzone under which the angular velocity will be set to 0 |
Definition at line 82 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::clamped | ( | double | max_linear, |
double | max_angular, | ||
double | noise_ratio = 0 , |
||
double | angular_noise_ratio = 0 |
||
) | const |
Return the clamped twist.
max_linear | The maximum magnitude of the linear velocity |
max_angular | The maximum magnitude of the angular velocity |
noise_ratio | If provided, this value will be used to apply a deadzone under which the linear velocity will be set to 0 |
angular_noise_ratio | If provided, this value will be used to apply a deadzone under which the angular velocity will be set to 0 |
Definition at line 91 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::copy | ( | ) | const |
Return a copy of the Cartesian twist.
Definition at line 99 of file CartesianTwist.cpp.
|
overridevirtual |
Returns the twist data as an Eigen vector.
Reimplemented from state_representation::CartesianState.
Definition at line 66 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::inverse | ( | ) | const |
Compute the inverse of the current Cartesian twist.
Definition at line 104 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::normalized | ( | const CartesianStateVariable & | state_variable_type = CartesianStateVariable::TWIST | ) | const |
Compute the normalized twist at the state variable given in argument (default is full twist)
state_variable_type | The type of state variable to compute the norms on |
Definition at line 108 of file CartesianTwist.cpp.
|
overridevirtual |
Compute the norms of the state variable specified by the input type (default is full twist)
state_variable_type | The type of state variable to compute the norms on |
Reimplemented from state_representation::CartesianState.
Definition at line 112 of file CartesianTwist.cpp.
CartesianPose state_representation::CartesianTwist::operator* | ( | const std::chrono::nanoseconds & | dt | ) | const |
Integrate a Cartesian twist over a time period.
dt | The time period used for integration |
Definition at line 135 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::operator* | ( | double | lambda | ) | const |
Scale a Cartesian twist by a scalar.
: All state variables in all their dimensions are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 121 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator*= | ( | double | lambda | ) |
Scale inplace by a scalar.
: All state variables in all their dimensions are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 116 of file CartesianTwist.cpp.
CartesianState state_representation::CartesianTwist::operator+ | ( | const CartesianState & | state | ) | const |
Add another Cartesian state.
state | A Cartesian state in the same reference frame |
Definition at line 191 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::operator+ | ( | const CartesianTwist & | twist | ) | const |
Add another Cartesian twist.
twist | A Cartesian twist in the same reference frame |
Definition at line 187 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator+= | ( | const CartesianState & | state | ) |
Add inplace another twist from a Cartesian state.
state | A Cartesian state in the same reference frame |
Definition at line 182 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator+= | ( | const CartesianTwist & | twist | ) |
Add inplace another Cartesian twist.
twist | A Cartesian twist in the same reference frame |
Definition at line 177 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::operator- | ( | ) | const |
Negate a Cartesian twist.
Definition at line 195 of file CartesianTwist.cpp.
CartesianState state_representation::CartesianTwist::operator- | ( | const CartesianState & | state | ) | const |
Compute the difference with a Cartesian state.
state | A Cartesian state in the same reference frame |
Definition at line 213 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::operator- | ( | const CartesianTwist & | twist | ) | const |
Compute the difference with another Cartesian twist.
twist | A Cartesian twist in the same reference frame |
Definition at line 209 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator-= | ( | const CartesianState & | state | ) |
Compute inplace the difference with another Cartesian state.
state | A Cartesian state in the same reference frame |
Definition at line 204 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator-= | ( | const CartesianTwist & | twist | ) |
Compute inplace the difference with another Cartesian twist.
twist | A Cartesian twist in the same reference frame |
Definition at line 199 of file CartesianTwist.cpp.
CartesianAcceleration state_representation::CartesianTwist::operator/ | ( | const std::chrono::nanoseconds & | dt | ) | const |
Differentiate a Cartesian twist over a time period.
dt | The time period used for derivation |
Definition at line 167 of file CartesianTwist.cpp.
CartesianTwist state_representation::CartesianTwist::operator/ | ( | double | lambda | ) | const |
Scale a Cartesian twist by a scalar.
: All state variables in all their dimensions are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 163 of file CartesianTwist.cpp.
CartesianTwist & state_representation::CartesianTwist::operator/= | ( | double | lambda | ) |
Scale inplace by a scalar.
: All state variables in all their dimensions are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
Definition at line 158 of file CartesianTwist.cpp.
|
default |
Copy assignment operator that has to be defined to the custom assignment operator.
twist | The twist with value to assign |
|
static |
Constructor for a random twist.
name | The name of the state |
reference | The name of the reference frame (default is "world") |
Definition at line 60 of file CartesianTwist.cpp.
|
overridevirtual |
Set the twist data from an Eigen vector.
Reimplemented from state_representation::CartesianState.
Definition at line 70 of file CartesianTwist.cpp.
|
overridevirtual |
Set the twist data from a std vector.
Reimplemented from state_representation::CartesianState.
Definition at line 78 of file CartesianTwist.cpp.
|
static |
Constructor for the zero twist.
name | The name of the state |
reference | The name of the reference frame (default is "world") |
Definition at line 56 of file CartesianTwist.cpp.
|
friend |
Scale a Cartesian twist in all dimensions by a matrix.
lambda | The scaling factors in all the dimensions |
twist | The Cartesian twist to be scaled |
Definition at line 129 of file CartesianTwist.cpp.
|
friend |
Integrate a Cartesian twist over a time period.
dt | The time period used for integration |
twist | The Cartesian twist to be integrated |
Definition at line 154 of file CartesianTwist.cpp.
|
friend |
Scale a Cartesian twist by a scalar.
: All state variables in all their dimensions are scaled by the same factor.
lambda | The scaling factor |
lambda | The scaling factor |
twist | The Cartesian twist to be scaled |
Definition at line 125 of file CartesianTwist.cpp.
|
friend |
Overload the ostream operator for printing.
os | The ostream to append the string representing the Cartesian twist to |
CartesianTwist | The Cartesian twist to print |
Definition at line 217 of file CartesianTwist.cpp.