Go to the documentation of this file. 1 #ifndef AIKIDO_STATESPACE_SO2STATESPACE_HPP_
2 #define AIKIDO_STATESPACE_SO2STATESPACE_HPP_
4 #include <Eigen/Geometry>
10 namespace statespace {
121 explicit State(
double angle = 0.0);
153 #endif // ifndef AIKIDO_STATESPACE_SO2STATESPACE_HPP_
Eigen::Rotation2Dd toRotation(const State *state) const
Returns state as an Eigen rotation.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
void print(const StateSpace::State *state, std::ostream &os) const override
Print the angle represented by the state.
std::size_t getStateSizeInBytes() const override
Gets the size of a State, in bytes.
void expMap(const Eigen::VectorXd &tangent, StateSpace::State *out) const override
Exponential mapping of Lie algebra element to a Lie group element.
Eigen::Rotation2Dd toRotation() const
Returns state as an Eigen rotation.
StateSpace::State * allocateStateInBuffer(void *buffer) const override
Create a new state in a pre-allocated buffer.
StateHandle for a SO2.
Definition: SO2-impl.hpp:9
void compose(const StateSpace::State *state1, const StateSpace::State *state2, StateSpace::State *out) const override
Lie group operation for this StateSpace.
void copyState(const StateSpace::State *source, StateSpace::State *destination) const override
Copy a state.
void fromAngle(double angle)
Sets state from a rotation angle.
ScopedState createState() const
Helper function to create a ScopedState.
State()=default
This is a base class that should only only be used in derived classes.
double toAngle(const State *state) const
Returns state as a rotation angle in (-pi, pi].
void freeStateInBuffer(StateSpace::State *state) const override
Free a state previously created by allocateStateInBuffer.
void getIdentity(StateSpace::State *out) const override
Gets the identity element for this Lie group, such that:
Represents a Lie group and its associated Lie algebra, i.e.
Definition: StateSpace.hpp:33
void fromAngle(State *state, double angle) const
Sets state from a rotation angle in (-inf, inf).
double toAngle() const
Returns state as a rotation angle in (-pi, pi].
virtual void compose(const State *_state1, const State *_state2, State *_out) const =0
Lie group operation for this StateSpace.
double mAngle
Angle bounded in (-pi, pi] representing the SO(2) state.
Definition: SO2.hpp:143
void getInverse(const StateSpace::State *in, StateSpace::State *out) const override
Gets the inverse of _in in this Lie group, such that:
void fromRotation(State *state, const Eigen::Rotation2Dd &rotation) const
Sets state from an Eigen rotation.
SO2()=default
Constructs a state space representing SO(2).
Definition: StateSpace.hpp:167
ScopedState cloneState(const StateSpace::State *stateIn) const
Creates an identical clone of stateIn.
void logMap(const StateSpace::State *in, Eigen::VectorXd &tangent) const override
Log mapping of Lie group element to a Lie algebra element.
std::size_t getDimension() const override
Get the dimension of this Lie group.
The two-dimensional special orthogonal group SO(2), i.e.
Definition: SO2.hpp:18
void fromRotation(const Eigen::Rotation2Dd &rotation)
Sets state from an Eigen rotation.