3 #ifndef ROBOWFLEX_DART_SPACE_
4 #define ROBOWFLEX_DART_SPACE_
6 #include <ompl/base/spaces/RealVectorStateSpace.h>
30 class
StateSpace : public ompl::base::RealVectorStateSpace
56 void sampleUniform(ompl::base::State *state)
override;
57 void sampleUniformNear(ompl::base::State *state,
const ompl::base::State *near,
58 double distance)
override;
68 class StateType :
public ompl::base::RealVectorStateSpace::StateType
106 void addGroupFromJoints(
const std::string &group_name,
119 void setWorldState(
WorldPtr world,
const ompl::base::State *state)
const;
125 void setWorldState(
WorldPtr world,
const Eigen::Ref<const Eigen::VectorXd> &x)
const;
131 void getWorldState(
WorldPtr world, ompl::base::State *state)
const;
137 void getWorldState(
WorldPtr world, Eigen::Ref<Eigen::VectorXd> x)
const;
145 const Eigen::Ref<const Eigen::VectorXd> &x)
const;
153 Eigen::Ref<Eigen::VectorXd> x)
const;
168 const WorldPtr &getWorldConst()
const;
179 Eigen::VectorXd getLowerBound()
const;
184 Eigen::VectorXd getUpperBound()
const;
206 void getGroupState(
const std::string &group,
const ompl::base::State *state,
207 Eigen::Ref<Eigen::VectorXd> v)
const;
214 void setGroupState(
const std::string &group, ompl::base::State *state,
215 const Eigen::Ref<const Eigen::VectorXd> &v)
const;
237 bool isMetricSpace()
const override;
238 void enforceBounds(ompl::base::State *state)
const override;
239 bool satisfiesBounds(
const ompl::base::State *state)
const override;
240 double distance(
const ompl::base::State *state1,
const ompl::base::State *state2)
const override;
241 double getMaximumExtent()
const override;
242 bool equalStates(
const ompl::base::State *state1,
const ompl::base::State *state2)
const override;
243 void interpolate(
const ompl::base::State *from,
const ompl::base::State *to,
double t,
244 ompl::base::State *state)
const override;
245 ompl::base::StateSamplerPtr allocDefaultStateSampler()
const override;
246 ompl::base::State *allocState()
const override;
247 void freeState(ompl::base::State *state)
const override;
251 void setMetricSpace(
bool metric);
#define ROBOWFLEX_CLASS_FORWARD(C)
Macro that forward declares a class and defines two shared ptrs types:
A shared pointer wrapper for robowflex::darts::Joint.
Sampler for robowflex::darts::StateSpace.
const std::vector< JointPtr > & joints_
Joints to sample from.
State type for the robowflex::darts::StateSpace.
Eigen::VectorXd data
Vector for configuration.
An OMPL state space for robowflex::darts::World. Can do motion planning for any of the robots or stru...
std::vector< std::size_t > indices_
Vector of indices for planning.
WorldPtr world_
World to use for planning.
std::vector< JointPtr > joints_
Vector of all joints used in planning.
std::set< dart::dynamics::Joint * > jointset_
Set of joints used in planning.
std::map< std::string, std::vector< JointPtr > > group_joints_
Joints belonging to a group.
std::map< std::string, std::size_t > group_dimension_
Dimension of the group.
ompl::RNG rng_
Random number generator.
A shared pointer wrapper for robowflex::darts::World.
Main namespace. Contains all library classes and functions.