Aikido
aikido::statespace::SO2StateHandle< _QualifiedState > Class Template Reference

StateHandle for a SO2. More...

#include <aikido/statespace/detail/SO2-impl.hpp>

Inheritance diagram for aikido::statespace::SO2StateHandle< _QualifiedState >:
aikido::statespace::StateHandle< SO2, _QualifiedState >

Public Member Functions

 SO2StateHandle ()
 Construct and initialize to nullptr. More...
 
 SO2StateHandle (const StateSpace *_space, QualifiedState *_state)
 Construct a handle for _state in _space. More...
 
double toAngle () const
 Returns angle corresponding to the state. More...
 
void fromAngle (double angle)
 Sets state given a rotation angle. More...
 
Eigen::Rotation2Dd toRotation () const
 Returns the Eigen transformation corresponding to state. More...
 
void fromRotation (const Eigen::Rotation2Dd &rotation)
 Sets state given an Eigen transformation. More...
 
- Public Member Functions inherited from aikido::statespace::StateHandle< SO2, _QualifiedState >
 StateHandle ()
 Constructs a nullptr handle. More...
 
 StateHandle (const StateSpace *space, QualifiedState *state)
 Wrap state, which must be form the provided StateSpace. More...
 
 StateHandle (const StateHandle &)=default
 
 StateHandle (StateHandle &&)=default
 
StateHandleoperator= (StateHandle &&)=default
 
StateHandleoperator= (const StateHandle &)=default
 
 operator QualifiedState * () const
 Implicitly convert to a State pointer. More...
 
void reset ()
 Resets StateHandle to nullptr. More...
 
void reset (const StateSpace *space, QualifiedState *state)
 Resets the state, which must be from the provided StateSpace. More...
 
auto getState () -> typename std::enable_if<!std::is_const< Q >::value, Q * >::type
 Returns the State. More...
 
auto getState () const -> typename std::conditional< std::is_const< Q >::value, Q *, const Q * >::type
 Returns the State. More...
 
const StateSpacegetStateSpace () const
 Returns the state space that created this state. More...
 

Additional Inherited Members

- Public Types inherited from aikido::statespace::StateHandle< SO2, _QualifiedState >
using StateSpace = SO2
 
using QualifiedState = _QualifiedState
 
using State = typename StateSpace::State
 
using ConstState = typename std::conditional< std::is_const< QualifiedState >::value, QualifiedState, const QualifiedState >::type
 
- Protected Attributes inherited from aikido::statespace::StateHandle< SO2, _QualifiedState >
const StateSpacemSpace
 State space of the sate that is managed by this handler. More...
 
QualifiedStatemState
 State managed by this handler. This can be either const or non-const type. More...
 

Detailed Description

template<class _QualifiedState>
class aikido::statespace::SO2StateHandle< _QualifiedState >

StateHandle for a SO2.

The template parameter is necessary to support both const and non-const states.

Template Parameters
_QualifiedStatetype of State being wrapped

Constructor & Destructor Documentation

◆ SO2StateHandle() [1/2]

template<class _QualifiedState >
aikido::statespace::SO2StateHandle< _QualifiedState >::SO2StateHandle ( )
inline

Construct and initialize to nullptr.

◆ SO2StateHandle() [2/2]

template<class _QualifiedState >
aikido::statespace::SO2StateHandle< _QualifiedState >::SO2StateHandle ( const StateSpace _space,
QualifiedState _state 
)
inline

Construct a handle for _state in _space.

Parameters
_spacestate space that created _state
_statestate created by _space

Member Function Documentation

◆ fromAngle()

template<class _QualifiedState >
void aikido::statespace::SO2StateHandle< _QualifiedState >::fromAngle ( double  angle)
inline

Sets state given a rotation angle.

Parameters
[in]anglerotation angle.

◆ fromRotation()

template<class _QualifiedState >
void aikido::statespace::SO2StateHandle< _QualifiedState >::fromRotation ( const Eigen::Rotation2Dd &  rotation)
inline

Sets state given an Eigen transformation.

Parameters
[in]rotationEigen transformation.

◆ toAngle()

template<class _QualifiedState >
double aikido::statespace::SO2StateHandle< _QualifiedState >::toAngle ( ) const
inline

Returns angle corresponding to the state.

◆ toRotation()

template<class _QualifiedState >
Eigen::Rotation2Dd aikido::statespace::SO2StateHandle< _QualifiedState >::toRotation ( ) const
inline

Returns the Eigen transformation corresponding to state.