aikido
RnJoint.hpp
1 #ifndef AIKIDO_STATESPACE_DART_REALVECTORJOINTSTATESPACE_HPP_
2 #define AIKIDO_STATESPACE_DART_REALVECTORJOINTSTATESPACE_HPP_
3 
4 #include "aikido/statespace/Rn.hpp"
5 #include "aikido/statespace/dart/JointStateSpace.hpp"
6 #include "aikido/statespace/dart/detail/RnJointTraits.hpp"
7 
8 namespace aikido {
9 namespace statespace {
10 namespace dart {
11 
20 template <int N>
21 class RJoint
22  : public R<N>
23  , public JointStateSpace
24  , public std::enable_shared_from_this<RJoint<N>>
25 {
26 public:
27  static constexpr int DimensionAtCompileTime = N;
28 
29  using typename R<DimensionAtCompileTime>::State;
30 
31  using VectorNd = typename R<DimensionAtCompileTime>::VectorNd;
32 
33  using DartJoint = typename detail::RJointTraits<N>::DartJoint;
34 
38  explicit RJoint(const DartJoint* joint);
39 
40  // Documentation inherited.
42  const Eigen::VectorXd& positions,
43  StateSpace::State* state) const override;
44 
45  // Documentation inherited.
47  const StateSpace::State* state,
48  Eigen::VectorXd& positions) const override;
49 };
50 
51 using R0Joint = RJoint<0>;
52 using R1Joint = RJoint<1>;
53 using R2Joint = RJoint<2>;
54 using R3Joint = RJoint<3>;
55 using R6Joint = RJoint<6>;
56 
57 } // namespace dart
58 } // namespace statespace
59 } // namespace aikido
60 
61 #include "aikido/statespace/dart/detail/RnJoint-impl.hpp"
62 
63 #endif // ifndef AIKIDO_STATESPACE_REALVECTORJOINTSTATESPACE_HPP_
RJoint(const DartJoint *joint)
Create a real vector state space for _joint.
Definition: RnJoint-impl.hpp:20
Rn for an arbitrary type of DART Joint with an arbitrary number of DegreeOfFreedoms.
Definition: RnJoint.hpp:21
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
StateSpace of a DART Joint.
Definition: JointStateSpace.hpp:20
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