aikido
RnJoint-impl.hpp
1 #include "aikido/statespace/dart/RnJoint.hpp"
2 
3 namespace aikido {
4 namespace statespace {
5 namespace dart {
6 
7 //==============================================================================
8 extern template class RJoint<0>;
9 
10 extern template class RJoint<1>;
11 
12 extern template class RJoint<2>;
13 
14 extern template class RJoint<3>;
15 
16 extern template class RJoint<6>;
17 
18 //==============================================================================
19 template <int N>
20 RJoint<N>::RJoint(const typename RJoint<N>::DartJoint* joint)
21  : R<N>(), JointStateSpace(joint)
22 {
23  static_assert(
24  N != Eigen::Dynamic,
25  "Invalid dimension. Dynamic size dimension is not supported by RnJoint");
26 }
27 
28 //==============================================================================
29 template <int N>
31  const Eigen::VectorXd& positions, StateSpace::State* state) const
32 {
33  this->setValue(static_cast<typename R<N>::State*>(state), positions);
34 }
35 
36 //==============================================================================
37 template <int N>
39  const StateSpace::State* state, Eigen::VectorXd& positions) const
40 {
41  positions = this->getValue(static_cast<const typename R<N>::State*>(state));
42 }
43 
44 } // namespace dart
45 } // namespace statespace
46 } // namespace aikido
RJoint(const DartJoint *joint)
Create a real vector state space for _joint.
Definition: RnJoint-impl.hpp:20
Definition: FrameMarker.hpp:11
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
void convertStateToPositions(const StateSpace::State *state, Eigen::VectorXd &positions) const override
Converts a State in this state space to DART Joint positions, e.g.
Definition: RnJoint-impl.hpp:38
A tuple of states where the i-th state is from the i-th subspace.
Definition: CartesianProduct.hpp:162
Eigen::Map< const VectorNd > getValue(const State *_state) const
Gets the real vector stored in a State.
Definition: Rn-impl.hpp:147
StateSpace of a DART Joint.
Definition: JointStateSpace.hpp:20
void setValue(State *_state, const VectorNd &_value) const
Sets the real vector stored in a State.
Definition: Rn-impl.hpp:157
Represents a N-dimensional real vector space with vector addition as the group operation.
Definition: Rn.hpp:18
void convertPositionsToState(const Eigen::VectorXd &positions, StateSpace::State *state) const override
Converts DART Joint positions, e.g.
Definition: RnJoint-impl.hpp:30
Point in a R<N>.
Definition: Rn.hpp:22