Aikido
MetaSkeletonStateSpace-impl.hpp
Go to the documentation of this file.
1 namespace aikido {
2 namespace statespace {
3 namespace dart {
4 
5 //==============================================================================
6 template <class Space>
7 std::shared_ptr<Space> MetaSkeletonStateSpace::getJointSpace(
8  const ::dart::dynamics::MetaSkeleton* _metaskeleton,
9  const ::dart::dynamics::Joint* _joint) const
10 {
11  const auto index = _metaskeleton->getIndexOf(_joint, true);
12  if (index == ::dart::dynamics::INVALID_INDEX)
13  throw std::invalid_argument("Joint is not in MetaSkeleton.");
14 
15  return getSubspace<Space>(index);
16 }
17 
18 //==============================================================================
19 template <class Space>
20 std::shared_ptr<const Space> MetaSkeletonStateSpace::getJointSpace(
21  std::size_t _index) const
22 {
23  return getSubspace<Space>(_index);
24 }
25 
26 } // namespace dart
27 } // namespace statespace
28 } // namespace aikido
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::statespace::dart::MetaSkeletonStateSpace::getJointSpace
std::shared_ptr< Space > getJointSpace(const ::dart::dynamics::MetaSkeleton *_metaskeleton, const ::dart::dynamics::Joint *_joint) const
Gets the subspace corresponding to _joint in _metaskeleton.
Definition: MetaSkeletonStateSpace-impl.hpp:7
dart
Definition: FrameMarker.hpp:11