PathControl.h
220 }
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
double getControlDuration(unsigned int index) const
Get the duration of the control at index, which gets applied to the state at index.
Definition: PathControl.h:214
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
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
std::size_t getControlCount() const
Get the number of controls applied along this path. This should be equal to getStateCount() - 1 unles...
Definition: PathControl.h:227
std::size_t getStateCount() const
Get the number of states (way-points) that make up this path.
Definition: PathControl.h:220
base::Cost cost(const base::OptimizationObjectivePtr &opt) const override
Not yet implemented.
Definition: PathControl.cpp:123
std::vector< double > & getControlDurations()
Get the control durations used along the path (as a reference, so it can be modified,...
Definition: PathControl.h:182
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: PathControl.h:168
base::State * getState(unsigned int index)
Get the state located at index along the path.
Definition: PathControl.h:188
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
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
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
std::vector< Control * > & getControls()
Get the controls that make up the path (as a reference, so it can be modified, hence the function is ...
Definition: PathControl.h:175
Control * getControl(unsigned int index)
Get the control located at index along the path. This is the control that gets applied to the state l...
Definition: PathControl.h:201
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