|
aikido
|
Represents the Cartesian product of other StateSpaces.
More...
#include <CartesianProduct.hpp>
Classes | |
| class | State |
| A tuple of states where the i-th state is from the i-th subspace. More... | |
Public Types | |
| using | StateHandle = CompoundStateHandle< State > |
| using | StateHandleConst = CompoundStateHandle< const State > |
| using | ScopedState = statespace::ScopedState< StateHandle > |
| using | ScopedStateConst = statespace::ScopedState< StateHandleConst > |
Public Types inherited from aikido::statespace::StateSpace | |
| using | StateHandle = statespace::StateHandle< StateSpace, State > |
| using | StateHandleConst = statespace::StateHandle< StateSpace, const State > |
| using | ScopedState = statespace::ScopedState< StateHandle > |
| using | ScopedStateConst = statespace::ScopedState< StateHandleConst > |
Public Member Functions | |
| CartesianProduct (std::vector< ConstStateSpacePtr > _subspaces) | |
| Construct the Cartesian product of a vector of subspaces. More... | |
| ScopedState | createState () const |
Helper function to create a ScopedState. More... | |
| ScopedState | cloneState (const StateSpace::State *stateIn) const |
Creates an identical clone of stateIn. | |
| std::size_t | getNumSubspaces () const |
| Gets number of subspaces. More... | |
| template<class Space = StateSpace> | |
| std::shared_ptr< const Space > | getSubspace (std::size_t _index) const |
Gets subspace of type Space by at _index. More... | |
| template<class Space = StateSpace> | |
| Space::State * | getSubState (State *_state, std::size_t _index) const |
Gets substate of type Space::State from a CompoundState by index. More... | |
| template<class Space = StateSpace> | |
| const Space::State * | getSubState (const State *_state, std::size_t _index) const |
Gets substate of type Space::State from a CompoundState by index. More... | |
| template<class Space = StateSpace> | |
| 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 helper class. More... | |
| template<class Space = StateSpace> | |
| Space::StateHandleConst | getSubStateHandle (const State *_state, std::size_t _index) const |
Gets substate of type Space::State from a CompoundState by index and wraps it in a Space::ConstStateHandle helper class. More... | |
| std::size_t | getStateSizeInBytes () const override |
| Gets the size of a State, in bytes. More... | |
| StateSpace::State * | allocateStateInBuffer (void *_buffer) const override |
| Create a new state in a pre-allocated buffer. More... | |
| void | freeStateInBuffer (StateSpace::State *_state) const override |
| void | compose (const StateSpace::State *_state1, const StateSpace::State *_state2, StateSpace::State *_out) const override |
| void | getIdentity (StateSpace::State *_state) const override |
| void | getInverse (const StateSpace::State *_in, StateSpace::State *_out) const override |
| std::size_t | getDimension () const override |
| Get the dimension of this Lie group. More... | |
| void | copyState (const StateSpace::State *_source, StateSpace::State *_destination) const override |
| Copy a state. More... | |
| void | expMap (const Eigen::VectorXd &_tangent, StateSpace::State *_out) const override |
| Exponential mapping of Lie algebra element to a Lie group element. More... | |
| void | logMap (const StateSpace::State *_in, Eigen::VectorXd &_tangent) const override |
| Log mapping of Lie group element to a Lie algebra element. More... | |
| 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 brackets and including its index Format: [0: ...] [1: ...] ... More... | |
Public Member Functions inherited from aikido::statespace::StateSpace | |
| ScopedState | createState () const |
Helper function to create a ScopedState. More... | |
| ScopedState | cloneState (const State *stateIn) const |
Creates an identical clone of stateIn. | |
| virtual State * | allocateState () const |
| Allocate a new state. More... | |
| virtual void | freeState (State *_state) const |
Free a state previously created by allocateState. More... | |
| virtual void | freeStateInBuffer (State *_state) const =0 |
Free a state previously created by allocateStateInBuffer. More... | |
| virtual void | compose (const State *_state1, const State *_state2, State *_out) const =0 |
| Lie group operation for this StateSpace. More... | |
| virtual void | compose (State *_state1, const State *_state2) const |
| Lie group operation for this StateSpace. More... | |
| virtual void | getIdentity (State *_out) const =0 |
| Gets the identity element for this Lie group, such that: More... | |
| virtual void | getInverse (const State *_state, State *_out) const =0 |
Gets the inverse of _in in this Lie group, such that: More... | |
| virtual void | getInverse (State *_state) const |
Gets the inverse of _in in this Lie group. More... | |
| virtual void | expMap (const Eigen::VectorXd &_tangent, State *_out) const =0 |
| Exponential mapping of Lie algebra element to a Lie group element. More... | |
| virtual void | logMap (const State *_in, Eigen::VectorXd &_tangent) const =0 |
| Log mapping of Lie group element to a Lie algebra element. More... | |
| virtual void | print (const State *_state, std::ostream &_os) const =0 |
| Print the state to the output stream. More... | |
Represents the Cartesian product of other StateSpaces.
|
explicit |
Construct the Cartesian product of a vector of subspaces.
| _subspaces | vector of subspaces |
|
overridevirtual |
Create a new state in a pre-allocated buffer.
The input argument must contain at least getStateSizeInBytes() bytes of memory. This state must be freed with freeStateInBuffer before freeing _buffer.
| _buffer | memory used to store the returned state |
_buffer Implements aikido::statespace::StateSpace.
|
overridevirtual |
Copy a state.
| _source | input state | |
| [out] | _destination | output state |
Implements aikido::statespace::StateSpace.
| auto aikido::statespace::CartesianProduct::createState | ( | ) | const |
Helper function to create a ScopedState.
ScopedState
|
override |
Exponential mapping of Lie algebra element to a Lie group element.
The tangent space is parameterized by stacking the tangent vector of each subspace in the order the subspaces are listed in.
| _tangent | element of the tangent space | |
| [out] | _out | corresponding element of the Lie group |
|
overridevirtual |
Get the dimension of this Lie group.
This is also the dimension of the tangent space, i.e. the Lie algebra, associated with this group.
Implements aikido::statespace::StateSpace.
| std::size_t aikido::statespace::CartesianProduct::getNumSubspaces | ( | ) | const |
Gets number of subspaces.
|
overridevirtual |
Gets the size of a State, in bytes.
State Implements aikido::statespace::StateSpace.
| std::shared_ptr< const Space > aikido::statespace::CartesianProduct::getSubspace | ( | std::size_t | _index | ) | const |
Gets subspace of type Space by at _index.
| Space | type of StateSpace for subspace _index |
| _index | in the range [ 0, getNumSubspaces() ] |
_index | Space::State * aikido::statespace::CartesianProduct::getSubState | ( | State * | _state, |
| std::size_t | _index | ||
| ) | const |
Gets substate of type Space::State from a CompoundState by index.
| Space | type of StateSpace for subspace _index |
| _state | state in this CartesianProduct |
| _index | in the range [ 0, getNumSubspaces() ] |
_index | const Space::State * aikido::statespace::CartesianProduct::getSubState | ( | const State * | _state, |
| std::size_t | _index | ||
| ) | const |
Gets substate of type Space::State from a CompoundState by index.
This is an overload for when _state is const.
| Space | type of StateSpace for subspace _index |
| _state | state in this CartesianProduct |
| _index | in the range [ 0, getNumSubspaces() ] |
_index | Space::StateHandle aikido::statespace::CartesianProduct::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 helper class.
| Space | type of StateSpace for subspace _index |
| _state | state in this CartesianProduct |
| _index | in the range [ 0, getNumSubspaces() ] |
_index | Space::StateHandleConst aikido::statespace::CartesianProduct::getSubStateHandle | ( | const State * | _state, |
| std::size_t | _index | ||
| ) | const |
Gets substate of type Space::State from a CompoundState by index and wraps it in a Space::ConstStateHandle helper class.
This is an overload for when _state is const.
| Space | type of StateSpace for subspace _index |
| _state | state in this CartesianProduct |
| _index | in the range [ 0, \ getNumSubspaces() ] |
_index
|
override |
Log mapping of Lie group element to a Lie algebra element.
The tangent space is parameterized by stacking the tangent vector of each subspace in the order the subspaces are listed in.
| _in | element of this Lie group | |
| [out] | _tangent | corresponding element of the tangent space |
|
override |
Print the contents of each substate contained in the state as a list with each substate enclosed in brackets and including its index Format: [0: ...] [1: ...] ...
[n: ...]
1.8.12