PathControl.cpp
83 throw Exception("Cannot create a path with controls from a space that does not support controls");
123 ompl::base::Cost ompl::control::PathControl::cost(const base::OptimizationObjectivePtr &opt) const
166 const ControlSpace *cs = static_cast<const SpaceInformation *>(si_.get())->getControlSpace().get();
191 OMPL_ERROR("Interpolation not performed. Number of states in the path should be strictly greater than the "
253 if (!si->isValid(states_[i]) || si->propagateWhileValid(states_[i], controls_[i], steps, next) != steps ||
267 void ompl::control::PathControl::append(const base::State *state, const Control *control, double duration)
291 unsigned int steps = cs->sampleStepCount(si->getMinControlDuration(), si->getMaxControlDuration());
virtual bool isCompound() const
Check if the control space is compound.
Definition: ControlSpace.cpp:138
A control space to allow the composition of control spaces.
Definition: ControlSpace.h:265
A space representing discrete controls; i.e. there are a small number of discrete controls the system...
Definition: DiscreteControlSpace.h:126
Representation of a space in which planning can be performed. Topology specific sampling,...
Definition: StateSpace.h:134
std::vector< Control * > controls_
The control applied at each state. This array contains one element less than the list of states.
Definition: PathControl.h:240
virtual double * getValueAddressAtIndex(Control *control, unsigned int index) const
Many controls contain a number of double values. This function provides a means to get the memory add...
Definition: ControlSpace.cpp:103
bool randomValid(unsigned int attempts)
Set this path to a random valid segment. Sample attempts times for valid segments....
Definition: PathControl.cpp:296
virtual void printAsMatrix(std::ostream &out) const
Print the path as a real-valued matrix where the i-th row represents the i-th state along the path,...
Definition: PathControl.cpp:152
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
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
A control space representing the space of applicable controls.
Definition: ControlSpace.h:127
std::vector< base::State * > & getStates()
Get the states that make up the path (as a reference, so it can be modified, hence the function is no...
Definition: PathGeometric.h:274
void copyFrom(const PathControl &other)
Copy the content of a path to this one.
Definition: PathControl.cpp:108
double length() const override
The path length (sum of control durations)
Definition: PathControl.cpp:129
base::Cost cost(const base::OptimizationObjectivePtr &opt) const override
Not yet implemented.
Definition: PathControl.cpp:123
The definition of a discrete control.
Definition: DiscreteControlSpace.h:130
geometric::PathGeometric asGeometric() const
Convert this path into a geometric path (interpolation is performed and then states are copied)
Definition: PathControl.cpp:91
void print(std::ostream &out) const override
Print the path to a stream.
Definition: PathControl.cpp:134
A shared pointer wrapper for ompl::control::ControlSampler.
void append(const base::State *state)
Append state to the end of the path; it is assumed state is the first state, so no control is applied...
Definition: PathControl.cpp:262
Space information containing necessary information for planning with controls. setup() needs to be ca...
Definition: SpaceInformation.h:134
void interpolate()
Make the path such that all controls are applied for a single time step (computes intermediate states...
Definition: PathControl.cpp:187
PathControl & operator=(const PathControl &other)
Assignment operator.
Definition: PathControl.cpp:100
int value
The current control - an int in range [lowerBound, upperBound].
Definition: DiscreteControlSpace.h:134
std::vector< double > controlDurations_
The duration of the control applied at each state. This array contains one element less than the list...
Definition: PathControl.h:244
std::vector< base::State * > states_
The list of states that make up the path.
Definition: PathControl.h:236