13 dart::dynamics::Joint *joint,
14 double low,
double high)
17 Eigen::VectorXd::Constant(1, low),
18 Eigen::VectorXd::Constant(1, high))
23 dart::dynamics::Joint *joint,
24 unsigned int n,
unsigned int start,
25 Eigen::VectorXd low, Eigen::VectorXd high)
26 :
Joint(space, joint, n, start, n), low_(low), high_(high)
32 for (
unsigned int i = 0; i <
numDof_; ++i)
33 space_->addDimension(low[i], high[i]);
38 const Eigen::Ref<const Eigen::VectorXd> &b)
const
40 return (a - b).lpNorm<1>();
49 const Eigen::Ref<const Eigen::VectorXd> &b,
51 Eigen::Ref<Eigen::VectorXd> c)
const
58 for (
unsigned int i = 0; i <
numDof_; ++i)
67 for (
unsigned int i = 0; i <
numDof_; ++i)
69 const double &v = a[i];
79 for (
unsigned int i = 0; i <
numDof_; ++i)
84 const Eigen::Ref<const Eigen::VectorXd> &near,
87 for (
unsigned int i = 0; i <
numDof_; ++i)
88 a[i] =
rng_.uniformReal(near[i] - r, near[i] + r);
95 if (v.size() !=
high_.size())
106 if (v.size() !=
low_.size())
Abstract controllable joint for robowflex::darts::StateSpace.
StateSpace * space_
State space this joint is for.
unsigned int numDof_
Number of DoF this joint controls.
unsigned int startInSpace_
Start index in space configuration.
unsigned int sizeInSpace_
Size of joint in space configuration.
ompl::RNG & rng_
Random number generator.
A real vector joint of n dimensions.
void sampleNear(Eigen::Ref< Eigen::VectorXd > a, const Eigen::Ref< const Eigen::VectorXd > &near, double r) const override
Sample a configuration for this joint near another configuration near.
double distance(const Eigen::Ref< const Eigen::VectorXd > &a, const Eigen::Ref< const Eigen::VectorXd > &b) const override
Compute the distance between two joint configurations.
RnJoint(StateSpace *space, dart::dynamics::Joint *joint, double low, double high)
Constructor.
double getMaximumExtent() const override
Get the maximum extent of this joint (maximum distance).
void sample(Eigen::Ref< Eigen::VectorXd > a) const override
Sample a configuration for this joint.
void enforceBounds(Eigen::Ref< Eigen::VectorXd > a) const override
Enforce bounds on a joint configuration.
Eigen::VectorXd high_
Upper bounds.
bool satisfiesBounds(const Eigen::Ref< const Eigen::VectorXd > &a) const override
Check if a joint configuration satisfies bounds.
void setUpperLimits(const Eigen::Ref< const Eigen::VectorXd > &v) override
Set the upper limits of a joint.
void setLowerLimits(const Eigen::Ref< const Eigen::VectorXd > &v) override
Set the lower limits of a joint.
void interpolate(const Eigen::Ref< const Eigen::VectorXd > &a, const Eigen::Ref< const Eigen::VectorXd > &b, double t, Eigen::Ref< Eigen::VectorXd > c) const override
Interpolate to a new configuration c which is t from a to b.
Eigen::VectorXd low_
Lower bounds.
An OMPL state space for robowflex::darts::World. Can do motion planning for any of the robots or stru...
DART-based robot modeling and planning.