16 unsigned int skelIndex,
17 unsigned int jointIndex,
18 unsigned int sizeInSpace,
19 unsigned int startIndex,
23 , skelIndex_(skelIndex)
24 , jointIndex_(jointIndex)
25 , startInSpace_(space_->getDimension())
26 , sizeInSpace_(sizeInSpace)
27 , startIndex_(startIndex)
31 for (
unsigned int i = 0; i <
numDof_; ++i)
34 if (j >= joint->getNumDofs())
37 auto *dof = joint->getDof(j);
44 unsigned int startIndex,
unsigned int numDof)
46 space->getWorld()->getSkeletonIndex(joint->getSkeleton()),
47 joint->getJointIndexInSkeleton(),
50 (numDof) ? numDof : joint->getNumDofs())
56 const auto &sim = world->getSimConst();
98 joint->getSkeleton()->setPositions(
indices_, a);
104 a = joint->getSkeleton()->getPositions(
indices_);
Abstract controllable joint for robowflex::darts::StateSpace.
const std::vector< std::size_t > & getIndices() const
Get the indices in the skeleton for this joint.
unsigned int skelIndex_
Index of skeleton.
virtual void setLowerLimits(const Eigen::Ref< const Eigen::VectorXd > &v)
Set the lower limits of a joint.
unsigned int jointIndex_
Index of joint.
unsigned int startIndex_
Start index in joint.
StateSpace * space_
State space this joint is for.
virtual void setJointState(WorldPtr world, const Eigen::Ref< const Eigen::VectorXd > &a) const
Set the state of the joint in world.
virtual Eigen::VectorXd getLowerLimits() const
Get the lower limits of a joint.
std::vector< std::size_t > indices_
Indices this joint corresponds to.
Eigen::Ref< Eigen::VectorXd > getSpaceVars(Eigen::Ref< Eigen::VectorXd > a)
Gets the joint configuration (subvector of variables for this joint) from a configuration.
unsigned int numDof_
Number of DoF this joint controls.
Joint(StateSpace *space, unsigned int skelIndex, unsigned int jointIndex, unsigned int sizeInSpace, unsigned int startIndex, unsigned int numDof)
Constructor.
std::size_t getJointIndex() const
Get the index of the joint in the skeleton.
unsigned int startInSpace_
Start index in space configuration.
dart::dynamics::Joint * getJoint(WorldPtr world) const
Get the Dart joint from a world.
virtual void getJointState(WorldPtr world, Eigen::Ref< Eigen::VectorXd > a) const
Get the state of the joint in world.
Eigen::Ref< const Eigen::VectorXd > getSpaceVarsConst(const Eigen::Ref< const Eigen::VectorXd > &a)
Gets the subvector of variables for this joint from a configuration.
unsigned int sizeInSpace_
Size of joint in space configuration.
std::vector< std::string > dofs_
Controlled DoF names.
std::size_t getDimension() const
Get the dimension of this joint.
const std::vector< std::string > & getDofs() const
Get the names of the DoF in the skeleton for this joint.
virtual Eigen::VectorXd getUpperLimits() const
Get the upper limits of a joint.
std::size_t getSkeletonIndex() const
Get the index of the skeleton for this joint in the world.
virtual void setUpperLimits(const Eigen::Ref< const Eigen::VectorXd > &v)
Set the upper limits of a joint.
An OMPL state space for robowflex::darts::World. Can do motion planning for any of the robots or stru...
Eigen::VectorXd getLowerBound() const
Get a vector of the lower joint bounds for the space.
Eigen::VectorXd getUpperBound() const
Get a vector of the upper joint bounds for the space.
WorldPtr getWorld()
Get underlying world.
A shared pointer wrapper for robowflex::darts::World.
T emplace_back(T... args)
DART-based robot modeling and planning.