KinematicChain.h
55 Segment(double p0_x, double p0_y, double p1_x, double p1_y) : x0(p0_x), y0(p0_y), x1(p1_x), y1(p1_y)
68 KinematicChainProjector(const ompl::base::StateSpace *space) : ompl::base::ProjectionEvaluator(space)
77 void project(const ompl::base::State *state, Eigen::Ref<Eigen::VectorXd> projection) const override
105 double distance(const ompl::base::State *state1, const ompl::base::State *state2) const override
138 bool equalStates(const ompl::base::State *state1, const ompl::base::State *state2) const override
145 flag &= fabs(cstate1->values[i] - cstate2->values[i]) < std::numeric_limits<double>::epsilon() * 2.0;
196 KinematicChainValidityChecker(const ompl::base::SpaceInformationPtr &si) : ompl::base::StateValidityChecker(si)
209 bool isValidImpl(const KinematicChainSpace *space, const KinematicChainSpace::StateType *s) const
229 return selfIntersectionTest(segments) && environmentIntersectionTest(segments, *space->environment());
bool equalStates(const ompl::base::State *state1, const ompl::base::State *state2) const override
Checks whether two states are equal.
Definition: KinematicChain.h:138
A shared pointer wrapper for ompl::base::SpaceInformation.
Representation of a space in which planning can be performed. Topology specific sampling,...
Definition: StateSpace.h:134
void registerProjections() override
Register the projections for this state space. Usually, this is at least the default projection....
Definition: KinematicChain.h:100
void computeRandom(unsigned int from, unsigned int to, const std::vector< double > &scale)
Wrapper for ComputeRandom(from, to, scale)
Definition: ProjectionEvaluator.cpp:89
unsigned int getStateDimension() const
Return the dimension of the state space.
Definition: SpaceInformation.h:274
A projection matrix – it allows multiplication of real vectors by a specified matrix....
Definition: ProjectionEvaluator.h:122
void project(const double *from, Eigen::Ref< Eigen::VectorXd > to) const
Multiply the vector from by the contained projection matrix to obtain the vector to.
Definition: ProjectionEvaluator.cpp:100
virtual void copyToReals(std::vector< double > &reals, const State *source) const
Copy all the real values from a state source to the array reals using getValueAddressAtLocation()
Definition: StateSpace.cpp:329
void log(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...
Definition: Console.cpp:120
bool isValid(const ompl::base::State *state) const override
Return true if the state state is valid. Usually, this means at least collision checking....
Definition: KinematicChain.h:200
virtual unsigned int getDimension() const =0
Get the dimension of the space (not the dimension of the surrounding ambient space)
A state space representing Rn. The distance function is the L2 norm.
Definition: RealVectorStateSpace.h:137
unsigned int getDimension() const override
Return the dimension of the projection defined by this evaluator.
Definition: KinematicChain.h:73
double distance(const ompl::base::State *state1, const ompl::base::State *state2) const override
Computes distance between two states. This function satisfies the properties of a metric if isMetricS...
Definition: KinematicChain.h:105
void registerDefaultProjection(const ProjectionEvaluatorPtr &projection)
Register the default projection for this state space.
Definition: StateSpace.cpp:752
void setBounds(const RealVectorBounds &bounds)
Set the bounds of this state space. This defines the range of the space in which sampling is performe...
Definition: RealVectorStateSpace.cpp:121
The definition of a state in Rn
Definition: RealVectorStateSpace.h:141
Abstract definition for a class computing projections to Rn. Implicit integer grids are imposed on th...
Definition: ProjectionEvaluator.h:194
Definition: KinematicChain.h:65
void interpolate(const ompl::base::State *from, const ompl::base::State *to, const double t, ompl::base::State *state) const override
Computes the state that lies at time t in [0, 1] on the segment that connects from state to to state....
Definition: KinematicChain.h:150
Definition: KinematicChain.h:53
SpaceInformation * si_
The instance of space information this state validity checker operates on.
Definition: StateValidityChecker.h:234
void enforceBounds(ompl::base::State *state) const override
Bring the state within the bounds of the state space. For unbounded spaces this function can be a no-...
Definition: KinematicChain.h:123
const StateSpacePtr & getStateSpace() const
Return the instance of the used state space.
Definition: SpaceInformation.h:164
void project(const ompl::base::State *state, Eigen::Ref< Eigen::VectorXd > projection) const override
Compute the projection as an array of double values.
Definition: KinematicChain.h:77
const StateSpace * space_
The state space this projection operates on.
Definition: ProjectionEvaluator.h:330
Definition: KinematicChain.h:88
Abstract definition for a class checking the validity of states. The implementation of this class mus...
Definition: StateValidityChecker.h:154
The lower and upper bounds for an Rn space.
Definition: RealVectorBounds.h:111