Go to the documentation of this file. 1 #ifndef AIKIDO_STATESPACE_SO3STATESPACE_HPP_
2 #define AIKIDO_STATESPACE_SO3STATESPACE_HPP_
3 #include <Eigen/Geometry>
24 using Quaternion = Eigen::Quaternion<double, Eigen::DontAlign>;
141 #endif // ifndef AIKIDO_STATESPACE_SO3STATESPACE_HPP_
const Quaternion & getQuaternion(const State *_state) const
Gets a state as a unit quaternion.
void logMap(const StateSpace::State *_in, Eigen::VectorXd &_tangent) const override
Log mapping of Lie group element to a Lie algebra element.
State()
Constructs the identity element.
SO3()=default
Constructs a state space representing SO(3).
State::Quaternion Quaternion
Definition: SO3.hpp:60
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
State in SO(3), a spatial rotation.
Definition: SO3.hpp:21
The two-dimensional special orthogonal group SO(3), i.e.
Definition: SO3.hpp:17
StateHandle for a SO3.
Definition: SO3-impl.hpp:9
std::size_t getDimension() const override
Get the dimension of this Lie group.
const Quaternion & getQuaternion() const
Gets a state as a unit quaternion.
void getIdentity(StateSpace::State *_out) const override
Gets the identity element for this Lie group, such that:
void copyState(const StateSpace::State *_source, StateSpace::State *_destination) const override
Copy a state.
ScopedState cloneState(const StateSpace::State *stateIn) const
Creates an identical clone of stateIn.
void setQuaternion(State *_state, const Quaternion &_quaternion) const
Sets a state to a unit quaternion.
void compose(const StateSpace::State *_state1, const StateSpace::State *_state2, StateSpace::State *_out) const override
Lie group operation for this StateSpace.
void getInverse(const StateSpace::State *_in, StateSpace::State *_out) const override
Gets the inverse of _in in this Lie group, such that:
void expMap(const Eigen::VectorXd &_tangent, StateSpace::State *_out) const override
Exponential mapping of Lie algebra element to a Lie group element.
std::size_t getStateSizeInBytes() const override
Gets the size of a State, in bytes.
Represents a Lie group and its associated Lie algebra, i.e.
Definition: StateSpace.hpp:33
void freeStateInBuffer(StateSpace::State *_state) const override
Free a state previously created by allocateStateInBuffer.
virtual void compose(const State *_state1, const State *_state2, State *_out) const =0
Lie group operation for this StateSpace.
void print(const StateSpace::State *_state, std::ostream &_os) const override
Print the quaternion represented by the state.
StateSpace::State * allocateStateInBuffer(void *_buffer) const override
Create a new state in a pre-allocated buffer.
void setQuaternion(const Quaternion &_quaternion)
Sets a state to a unit quaternion.
Definition: StateSpace.hpp:167
ScopedState createState() const
Helper function to create a ScopedState.
Eigen::Quaternion< double, Eigen::DontAlign > Quaternion
Definition: SO3.hpp:24
Quaternion mValue
Definition: SO3.hpp:47