Control Libraries 6.3.4
|
Class to represent a state in Dual Quaternion space. More...
#include <DualQuaternionState.hpp>
Public Member Functions | |
DualQuaternionState () | |
Empty constructor. More... | |
DualQuaternionState (const std::string &name, const std::string &reference="world") | |
Constructor with name and reference frame provided. More... | |
DualQuaternionState (const DualQuaternionState &state) | |
Copy constructor. More... | |
DualQuaternionState (const std::string &name, const Eigen::Quaterniond &primary, const Eigen::Quaterniond &dual, const std::string &reference="world") | |
Construct a DualQuaternion from two quaternions. More... | |
const Eigen::Quaterniond & | get_primary () const |
Getter of the primary attribute. More... | |
const Eigen::Quaterniond & | get_dual () const |
Getter of the dual attribute. More... | |
void | set_primary (const Eigen::Quaterniond &primary) |
Setter of the primary attribute. More... | |
void | set_dual (const Eigen::Quaterniond &dual) |
Setter of the dual attribute. More... | |
DualQuaternionState & | operator*= (const DualQuaternionState &q) |
Overload the *= operator. More... | |
const DualQuaternionState | operator* (const DualQuaternionState &p) const |
Overload the * operator. More... | |
const DualQuaternionState | conjugate () const |
compute the conjugate of the current DualQuaternion More... | |
virtual void | initialize () |
Initialize the DualQuaternionState to a zero value. More... | |
const DualQuaternionState | copy () const |
Return a copy of the DualQuaternionState. More... | |
Public Member Functions inherited from state_representation::SpatialState | |
SpatialState () | |
Empty constructor. More... | |
SpatialState (const StateType &type) | |
Empty constructor with a specific state type. More... | |
SpatialState (const StateType &type, const std::string &name, const std::string &reference_frame="world", const bool &empty=true) | |
Constructor with name and reference frame specification. More... | |
SpatialState (const SpatialState &state)=default | |
Copy constructor from another SpatialState. | |
SpatialState & | operator= (const SpatialState &state) |
Copy assignment operator that have to be defined to the custom assignment operator. More... | |
const std::string & | get_reference_frame () const |
Getter of the reference frame as const reference. More... | |
virtual void | set_reference_frame (const std::string &reference_frame) |
Setter of the reference frame. More... | |
virtual bool | is_compatible (const State &state) const override |
Check if the state is compatible for operations with the state given as argument. More... | |
Public Member Functions inherited from state_representation::State | |
State () | |
Empty constructor. More... | |
State (const StateType &type) | |
Constructor only specifying the type of the state from the StateType enumeration. More... | |
State (const StateType &type, const std::string &name, const bool &empty=true) | |
Constructor with name specification. More... | |
State (const State &state) | |
Copy constructor from another State. More... | |
virtual | ~State ()=default |
Virtual destructor. | |
State & | operator= (const State &state) |
Copy assignment operator that have to be defined to the custom assignment operator. More... | |
const StateType & | get_type () const |
Getter of the type attribute. More... | |
bool | is_empty () const |
Getter of the empty attribute. More... | |
void | set_empty (bool empty=true) |
Setter of the empty attribute. More... | |
void | set_filled () |
Setter of the empty attribute to false and also reset the timestamp. More... | |
const std::chrono::time_point< std::chrono::steady_clock > & | get_timestamp () const |
Getter of the timestamp attribute. More... | |
void | set_timestamp (const std::chrono::time_point< std::chrono::steady_clock > &timepoint) |
Setter of the timestamp attribute. More... | |
void | reset_timestamp () |
Reset the timestamp attribute to now. More... | |
const std::string & | get_name () const |
Getter of the name as const reference. More... | |
virtual void | set_name (const std::string &name) |
Setter of the name. More... | |
template<typename DurationT > | |
bool | is_deprecated (const std::chrono::duration< int64_t, DurationT > &time_delay) |
Check if the state is deprecated given a certain time delay. More... | |
virtual bool | is_compatible (const State &state) const |
Check if the state is compatible for operations with the state given as argument. More... | |
virtual void | initialize () |
Initialize the State to a zero value. More... | |
virtual void | set_data (const Eigen::VectorXd &data) |
Set the data of the state from a single Eigen vector. More... | |
virtual void | set_data (const std::vector< double > &data) |
Set the data of the state from a single std vector. More... | |
virtual void | set_data (const Eigen::MatrixXd &data) |
Set the data of the state from an Eigen matrix. More... | |
operator bool () const noexcept | |
Boolean operator for the truthiness of a state. More... | |
Friends | |
const DualQuaternionState | operator* (const float &lambda, const DualQuaternionState &state) |
Overload the * operator with a scalar. More... | |
const DualQuaternionState | exp (const DualQuaternionState &state) |
overload exp function More... | |
std::ostream & | operator<< (std::ostream &os, const DualQuaternionState &state) |
Overload the ostream operator for printing. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from state_representation::State | |
void | set_type (const StateType &type) |
Override the state type. More... | |
Class to represent a state in Dual Quaternion space.
Definition at line 10 of file DualQuaternionState.hpp.
|
explicit |
Empty constructor.
Definition at line 4 of file DualQuaternionState.cpp.
|
explicit |
Constructor with name and reference frame provided.
name the name of the state
reference the name of the reference frame
Definition at line 7 of file DualQuaternionState.cpp.
state_representation::DualQuaternionState::DualQuaternionState | ( | const DualQuaternionState & | state | ) |
Copy constructor.
Definition at line 12 of file DualQuaternionState.cpp.
|
explicit |
Construct a DualQuaternion from two quaternions.
name | the name of the state |
primary | the value of the primary quaternion |
dual | the value of the dual quaternion |
Definition at line 17 of file DualQuaternionState.cpp.
const DualQuaternionState state_representation::DualQuaternionState::conjugate | ( | ) | const |
compute the conjugate of the current DualQuaternion
Definition at line 42 of file DualQuaternionState.cpp.
const DualQuaternionState state_representation::DualQuaternionState::copy | ( | ) | const |
Return a copy of the DualQuaternionState.
Definition at line 78 of file DualQuaternionState.cpp.
|
inline |
Getter of the dual attribute.
Definition at line 122 of file DualQuaternionState.hpp.
|
inline |
Getter of the primary attribute.
Definition at line 118 of file DualQuaternionState.hpp.
|
virtual |
Initialize the DualQuaternionState to a zero value.
Reimplemented from state_representation::State.
Reimplemented in state_representation::DualQuaternionPose, and state_representation::DualQuaternionTwist.
Definition at line 49 of file DualQuaternionState.cpp.
const DualQuaternionState state_representation::DualQuaternionState::operator* | ( | const DualQuaternionState & | p | ) | const |
Overload the * operator.
p | DualQuaternionState to multiply with |
Definition at line 36 of file DualQuaternionState.cpp.
DualQuaternionState & state_representation::DualQuaternionState::operator*= | ( | const DualQuaternionState & | q | ) |
Overload the *= operator.
q | DualQuaternion to multiply with |
Definition at line 26 of file DualQuaternionState.cpp.
|
inline |
Setter of the dual attribute.
Definition at line 131 of file DualQuaternionState.hpp.
|
inline |
Setter of the primary attribute.
Definition at line 126 of file DualQuaternionState.hpp.
|
friend |
overload exp function
state | the DualQuaternion to operate on |
Definition at line 62 of file DualQuaternionState.cpp.
|
friend |
Overload the * operator with a scalar.
lambda | the scalar to multiply with |
Definition at line 55 of file DualQuaternionState.cpp.
|
friend |
Overload the ostream operator for printing.
os | the ostream to happend the string representing the state to |
state | the state to print |
Definition at line 83 of file DualQuaternionState.cpp.