Classes | |
class | ActiveDOFTrajectorySmoother |
Smoother planner for the trajectory points to avoiding collisions by extracting and using the currently set active dofs of the robot. More... | |
class | ActiveDOFTrajectoryRetimer |
Retimer planner the trajectory points by extracting and using the currently set active dofs of the robot. [multi-thread safe] More... | |
class | AffineTrajectoryRetimer |
Retimer planner the trajectory points consisting of affine transformation values while avoiding collisions. [multi-thread safe] More... | |
class | DHParameter |
represents the DH parameters for one joint More... | |
class | LineCollisionConstraint |
Line collision. More... | |
class | SimpleDistanceMetric |
simple distance metric based on joint weights More... | |
class | SimpleNeighborhoodSampler |
samples the neighborhood of a configuration using the configuration space distance metric and sampler. More... | |
class | ManipulatorIKGoalSampler |
Samples numsamples of solutions and each solution to vsolutions. More... | |
class | TrajectoryVerifier |
class | PlannerStateSaver |
Typedefs | |
typedef boost::shared_ptr < ActiveDOFTrajectorySmoother > | ActiveDOFTrajectorySmootherPtr |
typedef boost::shared_ptr < ActiveDOFTrajectoryRetimer > | ActiveDOFTrajectoryRetimerPtr |
typedef boost::shared_ptr < AffineTrajectoryRetimer > | AffineTrajectoryRetimerPtr |
typedef boost::shared_ptr < ManipulatorIKGoalSampler > | ManipulatorIKGoalSamplerPtr |
Functions | |
OPENRAVE_API int | JitterActiveDOF (RobotBasePtr robot, int nMaxIterations=5000, dReal fRand=0.03f, const PlannerBase::PlannerParameters::NeighStateFn &neighstatefn=PlannerBase::PlannerParameters::NeighStateFn()) |
Jitters the active joint angles of the robot until it escapes collision. | |
OPENRAVE_API bool | JitterTransform (KinBodyPtr pbody, float fJitter, int nMaxIterations=1000) |
Jitters the transform of a body until it escapes collision. | |
OPENRAVE_API void | VerifyTrajectory (PlannerBase::PlannerParametersConstPtr parameters, TrajectoryBaseConstPtr trajectory, dReal samplingstep=0.002) |
validates a trajectory with respect to the planning constraints. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | SmoothActiveDOFTrajectory (TrajectoryBasePtr traj, RobotBasePtr robot, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="", const std::string &plannerparameters="") |
Smooth the trajectory points to avoiding collisions by extracting and using the currently set active dofs of the robot. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | SmoothAffineTrajectory (TrajectoryBasePtr traj, const std::vector< dReal > &maxvelocities, const std::vector< dReal > &maxaccelerations, const std::string &plannername="", const std::string &plannerparameters="") |
Smooth the trajectory points consisting of affine transformation values while avoiding collisions. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | SmoothTrajectory (TrajectoryBasePtr traj, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="", const std::string &plannerparameters="") |
Smooth the trajectory points to avoiding collisions by extracting and using the positional data from the trajectory. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | RetimeActiveDOFTrajectory (TrajectoryBasePtr traj, RobotBasePtr robot, bool hastimestamps=false, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="", const std::string &plannerparameters="") |
Retime the trajectory points by extracting and using the currently set active dofs of the robot. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | RetimeAffineTrajectory (TrajectoryBasePtr traj, const std::vector< dReal > &maxvelocities, const std::vector< dReal > &maxaccelerations, bool hastimestamps=false, const std::string &plannername="", const std::string &plannerparameters="") |
Retime the trajectory points consisting of affine transformation values while avoiding collisions. [multi-thread safe] | |
OPENRAVE_API PlannerStatus | RetimeTrajectory (TrajectoryBasePtr traj, bool hastimestamps=false, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="", const std::string &plannerparameters="") |
Retime the trajectory points using all the positional data from the trajectory. [multi-thread safe] | |
OPENRAVE_API void | InsertActiveDOFWaypointWithRetiming (int index, const std::vector< dReal > &dofvalues, const std::vector< dReal > &dofvelocities, TrajectoryBasePtr traj, RobotBasePtr robot, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="") |
Inserts a waypoint into a trajectory at the index specified, and retimes the segment before and after the trajectory. [multi-thread safe] | |
OPENRAVE_API void | InsertWaypointWithSmoothing (int index, const std::vector< dReal > &dofvalues, const std::vector< dReal > &dofvelocities, TrajectoryBasePtr traj, dReal fmaxvelmult=1, dReal fmaxaccelmult=1, const std::string &plannername="") |
insert a waypoint in a timed trajectory and smooth so that the trajectory always goes through the waypoint at the specified velocity. | |
OPENRAVE_API void | ConvertTrajectorySpecification (TrajectoryBasePtr traj, const ConfigurationSpecification &spec) |
convert the trajectory and all its points to a new specification | |
OPENRAVE_API void | ComputeTrajectoryDerivatives (TrajectoryBasePtr traj, int maxderiv) |
computes the trajectory derivatives and modifies the trajetory configuration to store them. | |
OPENRAVE_API TrajectoryBasePtr | ReverseTrajectory (TrajectoryBaseConstPtr traj) |
returns a new trajectory with the order of the waypoints and times reversed. | |
OPENRAVE_API TrajectoryBasePtr | MergeTrajectories (const std::list< TrajectoryBaseConstPtr > &listtrajectories) |
merges the contents of multiple trajectories into one so that everything can be played simultaneously. | |
OPENRAVE_API void | GetDHParameters (std::vector< DHParameter > &vparameters, KinBodyConstPtr pbody) |
returns the Denavit-Hartenberg parameters of the kinematics structure of the body. | |
PlannerStatus | _PlanActiveDOFTrajectory (TrajectoryBasePtr traj, RobotBasePtr probot, bool hastimestamps, dReal fmaxvelmult, dReal fmaxaccelmult, const std::string &plannername, bool bsmooth, const std::string &plannerparameters) |
PlannerStatus | _PlanTrajectory (TrajectoryBasePtr traj, bool hastimestamps, dReal fmaxvelmult, dReal fmaxaccelmult, const std::string &plannername, bool bsmooth, const std::string &plannerparameters) |
static void | diffstatefn (std::vector< dReal > &q1, const std::vector< dReal > &q2, const std::vector< int > vrotaxes) |
static void | _SetTransformBody (std::vector< dReal >::const_iterator itvalues, KinBodyPtr pbody, int index, int affinedofs, const Vector &vActvAffineRotationAxis) |
static void | _GetTransformBody (std::vector< dReal >::iterator itvalues, KinBodyPtr pbody, int index, int affinedofs, const Vector &vActvAffineRotationAxis) |
static dReal | _ComputeTransformBodyDistance (std::vector< dReal >::const_iterator itvalues0, std::vector< dReal >::const_iterator itvalues1, KinBodyPtr pbody, int index, int affinedofs, const Vector &vActvAffineRotationAxis) |
void | _SetAffineState (const std::vector< dReal > &v, const std::list< boost::function< void(std::vector< dReal >::const_iterator) > > &listsetfunctions) |
void | _GetAffineState (std::vector< dReal > &v, size_t expectedsize, const std::list< boost::function< void(std::vector< dReal >::iterator) > > &listgetfunctions) |
dReal | _ComputeAffineDistanceMetric (const std::vector< dReal > &v0, const std::vector< dReal > &v1, const std::list< boost::function< dReal(std::vector< dReal >::const_iterator, std::vector< dReal >::const_iterator) > > &listdistfunctions) |
static PlannerStatus | _PlanAffineTrajectory (TrajectoryBasePtr traj, const std::vector< dReal > &maxvelocities, const std::vector< dReal > &maxaccelerations, bool hastimestamps, const std::string &plannername, bool bsmooth, const std::string &plannerparameters) |
static std::string | GetPlannerFromInterpolation (TrajectoryBasePtr traj, const std::string &forceplanner=std::string()) |
typedef boost::shared_ptr<ActiveDOFTrajectoryRetimer> OpenRAVE::planningutils::ActiveDOFTrajectoryRetimerPtr |
Definition at line 167 of file planningutils.h.
typedef boost::shared_ptr<ActiveDOFTrajectorySmoother> OpenRAVE::planningutils::ActiveDOFTrajectorySmootherPtr |
Definition at line 95 of file planningutils.h.
typedef boost::shared_ptr<AffineTrajectoryRetimer> OpenRAVE::planningutils::AffineTrajectoryRetimerPtr |
Definition at line 219 of file planningutils.h.
typedef boost::shared_ptr<ManipulatorIKGoalSampler> OpenRAVE::planningutils::ManipulatorIKGoalSamplerPtr |
Definition at line 432 of file planningutils.h.
dReal OpenRAVE::planningutils::_ComputeAffineDistanceMetric | ( | const std::vector< dReal > & | v0, |
const std::vector< dReal > & | v1, | ||
const std::list< boost::function< dReal(std::vector< dReal >::const_iterator, std::vector< dReal >::const_iterator) > > & | listdistfunctions | ||
) |
Definition at line 530 of file planningutils.cpp.
|
static |
Definition at line 506 of file planningutils.cpp.
void OpenRAVE::planningutils::_GetAffineState | ( | std::vector< dReal > & | v, |
size_t | expectedsize, | ||
const std::list< boost::function< void(std::vector< dReal >::iterator) > > & | listgetfunctions | ||
) |
Definition at line 522 of file planningutils.cpp.
|
static |
Definition at line 500 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::_PlanActiveDOFTrajectory | ( | TrajectoryBasePtr | traj, |
RobotBasePtr | probot, | ||
bool | hastimestamps, | ||
dReal | fmaxvelmult, | ||
dReal | fmaxaccelmult, | ||
const std::string & | plannername, | ||
bool | bsmooth, | ||
const std::string & | plannerparameters | ||
) |
Definition at line 303 of file planningutils.cpp.
|
static |
Definition at line 557 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::_PlanTrajectory | ( | TrajectoryBasePtr | traj, |
bool | hastimestamps, | ||
dReal | fmaxvelmult, | ||
dReal | fmaxaccelmult, | ||
const std::string & | plannername, | ||
bool | bsmooth, | ||
const std::string & | plannerparameters | ||
) |
Definition at line 435 of file planningutils.cpp.
void OpenRAVE::planningutils::_SetAffineState | ( | const std::vector< dReal > & | v, |
const std::list< boost::function< void(std::vector< dReal >::const_iterator) > > & | listsetfunctions | ||
) |
Definition at line 515 of file planningutils.cpp.
|
static |
Definition at line 493 of file planningutils.cpp.
void OpenRAVE::planningutils::ComputeTrajectoryDerivatives | ( | TrajectoryBasePtr | traj, |
int | maxderiv | ||
) |
computes the trajectory derivatives and modifies the trajetory configuration to store them.
If necessary will change the configuration specification of the trajectory. If more derivatives are requested than the trajectory supports, will ignore them. For example, acceleration of a linear trajectory.
traj | the re-timed trajectory |
maxderiv | the maximum derivative to assure. If 1, will assure velocities, if 2 will assure accelerations, etc. |
Definition at line 1117 of file planningutils.cpp.
void OpenRAVE::planningutils::ConvertTrajectorySpecification | ( | TrajectoryBasePtr | traj, |
const ConfigurationSpecification & | spec | ||
) |
convert the trajectory and all its points to a new specification
Definition at line 1102 of file planningutils.cpp.
|
static |
Definition at line 480 of file planningutils.cpp.
void OpenRAVE::planningutils::GetDHParameters | ( | std::vector< DHParameter > & | vparameters, |
KinBodyConstPtr | pbody | ||
) |
returns the Denavit-Hartenberg parameters of the kinematics structure of the body.
If the robot has joints that cannot be represented by DH, will throw an exception. Passive joints are ignored. Joints are ordered by hierarchy dependency. By convention N joints give N-1 DH parameters, but GetDHParameters returns N parameters. The reason is because the first parameter is used to define the coordinate system of the first axis relative to the robot origin.
vparameters | One set of parameters are returned for each joint. |
tstart | the initial transform in the body coordinate system to the first joint |
Definition at line 1331 of file planningutils.cpp.
|
static |
Definition at line 838 of file planningutils.cpp.
void OpenRAVE::planningutils::InsertActiveDOFWaypointWithRetiming | ( | int | index, |
const std::vector< dReal > & | dofvalues, | ||
const std::vector< dReal > & | dofvelocities, | ||
TrajectoryBasePtr | traj, | ||
RobotBasePtr | robot, | ||
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" |
||
) |
Inserts a waypoint into a trajectory at the index specified, and retimes the segment before and after the trajectory. [multi-thread safe]
Collision is not checked on the modified segments of the trajectory.
index | The index where to start modifying the trajectory. |
dofvalues | the configuration to insert into the trajectcory (active dof values of the robot) |
dofvelocities | the velocities that the inserted point should start with |
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
robot | use the robot's active dofs to initialize the trajectory space |
plannername | the name of the planner to use to retime. If empty, will use the default trajectory re-timer. |
Definition at line 884 of file planningutils.cpp.
void OpenRAVE::planningutils::InsertWaypointWithSmoothing | ( | int | index, |
const std::vector< dReal > & | dofvalues, | ||
const std::vector< dReal > & | dofvelocities, | ||
TrajectoryBasePtr | traj, | ||
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" |
||
) |
insert a waypoint in a timed trajectory and smooth so that the trajectory always goes through the waypoint at the specified velocity.
The PlannerParameters is automatically determined from the trajectory's configuration space
[in] | index | The index where to insert the new waypoint. A negative value starts from the end. |
dofvalues | the configuration to insert into the trajectcory (active dof values of the robot) | |
dofvelocities | the velocities that the inserted point should start with | |
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. | |
plannername | the name of the planner to use to smooth. If empty, will use the default trajectory smoother. |
Definition at line 974 of file planningutils.cpp.
int OpenRAVE::planningutils::JitterActiveDOF | ( | RobotBasePtr | robot, |
int | nMaxIterations = 5000 , |
||
dReal | fRand = 0.03f , |
||
const PlannerBase::PlannerParameters::NeighStateFn & | neighstatefn = PlannerBase::PlannerParameters::NeighStateFn() |
||
) |
Jitters the active joint angles of the robot until it escapes collision.
Return 0 if jitter failed and robot is in collision, -1 if robot originally not in collision, 1 if jitter succeeded and position is different.
Definition at line 25 of file planningutils.cpp.
bool OpenRAVE::planningutils::JitterTransform | ( | KinBodyPtr | pbody, |
float | fJitter, | ||
int | nMaxIterations = 1000 |
||
) |
Jitters the transform of a body until it escapes collision.
Definition at line 131 of file planningutils.cpp.
TrajectoryBasePtr OpenRAVE::planningutils::MergeTrajectories | ( | const std::list< TrajectoryBaseConstPtr > & | listtrajectories | ) |
merges the contents of multiple trajectories into one so that everything can be played simultaneously.
Each trajectory needs to have a 'deltatime' group for timestamps. The trajectories cannot share common configuration data because only one trajectories's data can be set at a time.
openrave_exception | throws an exception if the trajectory data is incompatible and cannot be merged. |
Definition at line 1229 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::RetimeActiveDOFTrajectory | ( | TrajectoryBasePtr | traj, |
RobotBasePtr | robot, | ||
bool | hastimestamps = false , |
||
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Retime the trajectory points by extracting and using the currently set active dofs of the robot. [multi-thread safe]
Collision is not checked. Every waypoint in the trajectory is guaranteed to be hit. The velocities for the current trajectory are overwritten. The returned trajectory will contain data only for the currenstly set active dofs of the robot.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
robot | use the robot's active dofs to initialize the trajectory space |
plannername | the name of the planner to use to retime. If empty, will use the default trajectory re-timer. |
hastimestamps | if true, use the already initialized timestamps of the trajectory |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 869 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::RetimeAffineTrajectory | ( | TrajectoryBasePtr | traj, |
const std::vector< dReal > & | maxvelocities, | ||
const std::vector< dReal > & | maxaccelerations, | ||
bool | hastimestamps = false , |
||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Retime the trajectory points consisting of affine transformation values while avoiding collisions. [multi-thread safe]
Collision is not checked. Every waypoint in the trajectory is guaranteed to be hit. The velocities for the current trajectory are overwritten.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
maxvelocities | the max velocities of each dof |
maxaccelerations | the max acceleration of each dof |
plannername | the name of the planner to use to retime. If empty, will use the default trajectory re-timer. |
hastimestamps | if true, use the already initialized timestamps of the trajectory |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 874 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::RetimeTrajectory | ( | TrajectoryBasePtr | traj, |
bool | hastimestamps = false , |
||
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Retime the trajectory points using all the positional data from the trajectory. [multi-thread safe]
Collision is not checked. Every waypoint in the trajectory is guaranteed to be hit. The velocities for the current trajectory are overwritten. The returned trajectory will contain data only for the currenstly set active dofs of the robot.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
plannername | the name of the planner to use to retime. If empty, will use the default trajectory re-timer. |
hastimestamps | if true, use the already initialized timestamps of the trajectory |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 879 of file planningutils.cpp.
TrajectoryBasePtr OpenRAVE::planningutils::ReverseTrajectory | ( | TrajectoryBaseConstPtr | traj | ) |
returns a new trajectory with the order of the waypoints and times reversed.
Velocities are just negated and the new trajectory is not guaranteed to be executable or valid
Definition at line 1171 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::SmoothActiveDOFTrajectory | ( | TrajectoryBasePtr | traj, |
RobotBasePtr | robot, | ||
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Smooth the trajectory points to avoiding collisions by extracting and using the currently set active dofs of the robot. [multi-thread safe]
Only initial and goal configurations are preserved. The velocities for the current trajectory are overwritten. The returned trajectory will contain data only for the currenstly set active dofs of the robot.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
robot | use the robot's active dofs to initialize the trajectory space |
plannername | the name of the planner to use to smooth. If empty, will use the default trajectory re-timer. |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 823 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::SmoothAffineTrajectory | ( | TrajectoryBasePtr | traj, |
const std::vector< dReal > & | maxvelocities, | ||
const std::vector< dReal > & | maxaccelerations, | ||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Smooth the trajectory points consisting of affine transformation values while avoiding collisions. [multi-thread safe]
Only initial and goal configurations are preserved.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
maxvelocities | the max velocities of each dof |
maxaccelerations | the max acceleration of each dof |
plannername | the name of the planner to use to smooth. If empty, will use the default trajectory re-timer. |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 828 of file planningutils.cpp.
PlannerStatus OpenRAVE::planningutils::SmoothTrajectory | ( | TrajectoryBasePtr | traj, |
dReal | fmaxvelmult = 1 , |
||
dReal | fmaxaccelmult = 1 , |
||
const std::string & | plannername = "" , |
||
const std::string & | plannerparameters = "" |
||
) |
Smooth the trajectory points to avoiding collisions by extracting and using the positional data from the trajectory. [multi-thread safe]
Only initial and goal configurations are preserved. The velocities for the current trajectory are overwritten. The returned trajectory will contain data only for the currenstly set active dofs of the robot.
traj | the trajectory that initially contains the input points, it is modified to contain the new re-timed data. |
plannername | the name of the planner to use to smooth. If empty, will use the default trajectory re-timer. |
plannerparameters | XML string to be appended to PlannerBase::PlannerParameters::_sExtraParameters passed in to the planner. |
Definition at line 833 of file planningutils.cpp.
void OpenRAVE::planningutils::VerifyTrajectory | ( | PlannerBase::PlannerParametersConstPtr | parameters, |
TrajectoryBaseConstPtr | trajectory, | ||
dReal | samplingstep = 0.002 |
||
) |
validates a trajectory with respect to the planning constraints. [multi-thread safe]
checks internal data structures and verifies that all trajectory via points do not violate joint position, velocity, and acceleration limits.
parameters | the planner parameters passed to the planner that returned the trajectory. If not initialized, will attempt to create a new PlannerParameters structure from trajectory->GetConfigurationSpecification() |
trajectory | trajectory of points to be checked |
samplingstep | If == 0, then will only test the supports points in trajectory->GetPoints(). If > 0, then will sample the trajectory at this time interval and check that smoothness is satisfied along with segment constraints. |
openrave_exception | If the trajectory is invalid, will throw ORE_InconsistentConstraints. |
Definition at line 291 of file planningutils.cpp.