Go to the documentation of this file. 1 #ifndef AIKIDO_STATESPACE_COMPOUNDSTATESPACE_HPP_
2 #define AIKIDO_STATESPACE_COMPOUNDSTATESPACE_HPP_
19 :
public std::enable_shared_from_this<CartesianProduct>
55 template <
class Space = StateSpace>
56 std::shared_ptr<const Space>
getSubspace(std::size_t _index)
const;
64 template <
class Space = StateSpace>
74 template <
class Space = StateSpace>
76 const State* _state, std::size_t _index)
const;
85 template <
class Space = StateSpace>
87 State* _state, std::size_t _index)
const;
97 template <
class Space = StateSpace>
99 const State* _state, std::size_t _index)
const;
177 #endif // AIKIDO_STATESPACE_COMPOUNDSTATESPACE_HPP_
void copyState(const StateSpace::State *_source, StateSpace::State *_destination) const override
Copy a state.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
void logMap(const StateSpace::State *_in, Eigen::VectorXd &_tangent) const override
Log mapping of Lie group element to a Lie algebra element.
Space::StateHandle getSubStateHandle(State *_state, std::size_t _index) const
Gets substate of type Space::State from a CompoundState by index and wraps it in a Space::StateHandle...
Definition: CartesianProduct-impl.hpp:140
std::size_t mSizeInBytes
Definition: CartesianProduct.hpp:158
StateSpace::State * allocateStateInBuffer(void *_buffer) const override
Create a new state in a pre-allocated buffer.
void freeStateInBuffer(StateSpace::State *_state) const override
Free a state previously created by allocateStateInBuffer.
ScopedState cloneState(const StateSpace::State *stateIn) const
Creates an identical clone of stateIn.
std::vector< ConstStateSpacePtr > mSubspaces
Definition: CartesianProduct.hpp:156
CartesianProduct(std::vector< ConstStateSpacePtr > _subspaces)
Construct the Cartesian product of a vector of subspaces.
void compose(const StateSpace::State *_state1, const StateSpace::State *_state2, StateSpace::State *_out) const override
Lie group operation for this StateSpace.
std::shared_ptr< const Space > getSubspace(std::size_t _index) const
Gets subspace of type Space by at _index.
Definition: CartesianProduct-impl.hpp:93
std::size_t getNumSubspaces() const
Gets number of subspaces.
StateHandle for a CartesianProduct.
Definition: CartesianProduct.hpp:15
Space::State * getSubState(State *_state, std::size_t _index) const
Gets substate of type Space::State from a CompoundState by index.
Definition: CartesianProduct-impl.hpp:116
Represents a Lie group and its associated Lie algebra, i.e.
Definition: StateSpace.hpp:33
void getInverse(const StateSpace::State *_in, StateSpace::State *_out) const override
Gets the inverse of _in in this Lie group, such that:
ScopedState createState() const
Helper function to create a ScopedState.
A tuple of states where the i-th state is from the i-th subspace.
Definition: CartesianProduct.hpp:162
void print(const StateSpace::State *_state, std::ostream &_os) const override
Print the contents of each substate contained in the state as a list with each substate enclosed in b...
virtual void compose(const State *_state1, const State *_state2, State *_out) const =0
Lie group operation for this StateSpace.
std::vector< std::size_t > mOffsets
Definition: CartesianProduct.hpp:157
std::size_t getDimension() const override
Get the dimension of this Lie group.
void expMap(const Eigen::VectorXd &_tangent, StateSpace::State *_out) const override
Exponential mapping of Lie algebra element to a Lie group element.
Definition: StateSpace.hpp:167
void getIdentity(StateSpace::State *_state) const override
Gets the identity element for this Lie group, such that:
#define AIKIDO_DECLARE_POINTERS(X)
Definition: pointers.hpp:21
Represents the Cartesian product of other StateSpaces.
Definition: CartesianProduct.hpp:18
std::size_t getStateSizeInBytes() const override
Gets the size of a State, in bytes.