39 #include <ompl/base/StateSpace.h>
47 typedef std::function<bool(
const ompl::base::State* from,
const ompl::base::State* to,
const double t,
48 ompl::base::State* state)>
50 typedef std::function<double(
const ompl::base::State* state1,
const ompl::base::State* state2)>
DistanceFunction;
64 throw std::runtime_error(
"Group '" + group_name +
"' was not found");
182 ompl::base::State*
allocState()
const override;
183 void freeState(ompl::base::State* state)
const override;
188 void copyState(ompl::base::State* destination,
const ompl::base::State* source)
const override;
189 void interpolate(
const ompl::base::State* from,
const ompl::base::State* to,
const double t,
190 ompl::base::State* state)
const override;
191 double distance(
const ompl::base::State* state1,
const ompl::base::State* state2)
const override;
192 bool equalStates(
const ompl::base::State* state1,
const ompl::base::State* state2)
const override;
197 void serialize(
void* serialization,
const ompl::base::State* state)
const override;
198 void deserialize(ompl::base::State* state,
const void* serialization)
const override;
225 void printState(
const ompl::base::State* state, std::ostream& out)
const override;
229 virtual void setPlanningVolume(
double minX,
double maxX,
double minY,
double maxY,
double minZ,
double maxZ);
const std::string & getName() const
Get the name of the joint group.
A joint from the robot. Models the transform that this joint applies in the kinematic chain....
Representation of a robot's state. This includes position, velocity, acceleration and effort.
void markInvalid(double d)
bool isValidityKnown() const
bool isStartState() const
bool isInputState() const
bool isMarkedValid() const
void clearKnownInformation()
bool isGoalDistanceKnown() const
double tag_snap_to_segment_
const ModelBasedStateSpaceSpecification & getSpecification() const
double tag_snap_to_segment_complement_
unsigned int getDimension() const override
bool satisfiesBounds(const ompl::base::State *state) const override
double getMeasure() const override
virtual void copyJointToOMPLState(ompl::base::State *state, const moveit::core::RobotState &robot_state, const moveit::core::JointModel *joint_model, int ompl_state_joint_index) const
Copy a single joint's values (which might have multiple variables) from a MoveIt robot_state to an OM...
const std::string & getJointModelGroupName() const
bool equalStates(const ompl::base::State *state1, const ompl::base::State *state2) const override
void serialize(void *serialization, const ompl::base::State *state) const override
const moveit::core::JointModelGroup * getJointModelGroup() const
double * getValueAddressAtIndex(ompl::base::State *state, const unsigned int index) const override
size_t state_values_size_
DistanceFunction distance_function_
const moveit::core::JointBoundsVector & getJointsBounds() const
double getMaximumExtent() const override
std::vector< const moveit::core::JointModel * > joint_model_vector_
void deserialize(ompl::base::State *state, const void *serialization) const override
std::vector< moveit::core::JointModel::Bounds > joint_bounds_storage_
ModelBasedStateSpaceSpecification spec_
unsigned int getSerializationLength() const override
const moveit::core::RobotModelConstPtr & getRobotModel() const
ompl::base::State * allocState() const override
virtual void setPlanningVolume(double minX, double maxX, double minY, double maxY, double minZ, double maxZ)
Set the planning volume for the possible SE2 and/or SE3 components of the state space.
ompl::base::StateSamplerPtr allocDefaultStateSampler() const override
InterpolationFunction interpolation_function_
virtual void copyToRobotState(moveit::core::RobotState &rstate, const ompl::base::State *state) const
Copy the data from an OMPL state to a set of joint states.
double getTagSnapToSegment() const
void setTagSnapToSegment(double snap)
void interpolate(const ompl::base::State *from, const ompl::base::State *to, const double t, ompl::base::State *state) const override
void printState(const ompl::base::State *state, std::ostream &out) const override
ModelBasedStateSpace(ModelBasedStateSpaceSpecification spec)
void setInterpolationFunction(const InterpolationFunction &fun)
void freeState(ompl::base::State *state) const override
void copyState(ompl::base::State *destination, const ompl::base::State *source) const override
virtual const std::string & getParameterizationType() const =0
virtual void copyToOMPLState(ompl::base::State *state, const moveit::core::RobotState &rstate) const
Copy the data from a set of joint states to an OMPL state.
void setDistanceFunction(const DistanceFunction &fun)
unsigned int variable_count_
~ModelBasedStateSpace() override
void printSettings(std::ostream &out) const override
void enforceBounds(ompl::base::State *state) const override
double distance(const ompl::base::State *state1, const ompl::base::State *state2) const override
std::vector< const JointModel::Bounds * > JointBoundsVector
The MoveIt interface to OMPL.
std::function< double(const ompl::base::State *state1, const ompl::base::State *state2)> DistanceFunction
OMPL_CLASS_FORWARD(ModelBasedStateSpace)
std::function< bool(const ompl::base::State *from, const ompl::base::State *to, const double t, ompl::base::State *state)> InterpolationFunction
ModelBasedStateSpaceSpecification(const moveit::core::RobotModelConstPtr &robot_model, const std::string &group_name)
moveit::core::JointBoundsVector joint_bounds_
const moveit::core::JointModelGroup * joint_model_group_
moveit::core::RobotModelConstPtr robot_model_
ModelBasedStateSpaceSpecification(const moveit::core::RobotModelConstPtr &robot_model, const moveit::core::JointModelGroup *jmg)