Aikido
|
Classes | |
class | BSpline |
B-spline trajectory define in a StateSpace . More... | |
class | Interpolated |
Trajectory that uses an Interpolator to interpolate between waypoints. More... | |
class | Spline |
Polynomial spline trajectory defined in a StateSpace . More... | |
class | Trajectory |
Time-parameterized path in a StateSpace . More... | |
struct | TrajectoryMetadata |
Typedefs | |
using | BSplinePtr = std::shared_ptr< BSpline > |
using | ConstBSplinePtr = std::shared_ptr< const BSpline > |
using | WeakBSplinePtr = std::weak_ptr< BSpline > |
using | WeakConstBSplinePtr = std::weak_ptr< const BSpline > |
using | UniqueBSplinePtr = std::unique_ptr< BSpline > |
using | UniqueConstBSplinePtr = std::unique_ptr< const BSpline > |
using | InterpolatedPtr = std::shared_ptr< Interpolated > |
using | ConstInterpolatedPtr = std::shared_ptr< const Interpolated > |
using | WeakInterpolatedPtr = std::weak_ptr< Interpolated > |
using | WeakConstInterpolatedPtr = std::weak_ptr< const Interpolated > |
using | UniqueInterpolatedPtr = std::unique_ptr< Interpolated > |
using | UniqueConstInterpolatedPtr = std::unique_ptr< const Interpolated > |
using | SplinePtr = std::shared_ptr< Spline > |
using | ConstSplinePtr = std::shared_ptr< const Spline > |
using | WeakSplinePtr = std::weak_ptr< Spline > |
using | WeakConstSplinePtr = std::weak_ptr< const Spline > |
using | UniqueSplinePtr = std::unique_ptr< Spline > |
using | UniqueConstSplinePtr = std::unique_ptr< const Spline > |
using | TrajectoryPtr = std::shared_ptr< Trajectory > |
using | ConstTrajectoryPtr = std::shared_ptr< const Trajectory > |
using | WeakTrajectoryPtr = std::weak_ptr< Trajectory > |
using | WeakConstTrajectoryPtr = std::weak_ptr< const Trajectory > |
using | UniqueTrajectoryPtr = std::unique_ptr< Trajectory > |
using | UniqueConstTrajectoryPtr = std::unique_ptr< const Trajectory > |
Functions | |
UniqueSplinePtr | convertToSpline (const Interpolated &inputTrajectory) |
Converts an interpolated trajectory to a piecewise linear spline trajectory. More... | |
UniqueInterpolatedPtr | concatenate (const Interpolated &traj1, const Interpolated &traj2) |
Concatenates two interpolated trajectories. More... | |
double | findTimeOfClosestStateOnTrajectory (const Trajectory &traj, const statespace::StateSpace::State *referenceState, double &distance, double timeStep=0.01) |
Finds the time of the closest state on a trajectory to a given state. More... | |
UniqueSplinePtr | createPartialTrajectory (const Spline &traj, double partialStartTime) |
Retrieves part of a given spline trajectory. More... | |
UniqueInterpolatedPtr | toR1JointTrajectory (const Interpolated &trajectory) |
Converts an interpolated trajectory from a Cartesian product space of SO(2) and R1 joints to a Cartesian product space of strictly R1 joints. More... | |
using aikido::trajectory::BSplinePtr = typedef std::shared_ptr< BSpline > |
using aikido::trajectory::ConstBSplinePtr = typedef std::shared_ptr< const BSpline > |
using aikido::trajectory::ConstInterpolatedPtr = typedef std::shared_ptr< const Interpolated > |
using aikido::trajectory::ConstSplinePtr = typedef std::shared_ptr< const Spline > |
using aikido::trajectory::ConstTrajectoryPtr = typedef std::shared_ptr< const Trajectory > |
using aikido::trajectory::InterpolatedPtr = typedef std::shared_ptr< Interpolated > |
using aikido::trajectory::SplinePtr = typedef std::shared_ptr< Spline > |
using aikido::trajectory::TrajectoryPtr = typedef std::shared_ptr< Trajectory > |
using aikido::trajectory::UniqueBSplinePtr = typedef std::unique_ptr< BSpline > |
using aikido::trajectory::UniqueConstBSplinePtr = typedef std::unique_ptr< const BSpline > |
using aikido::trajectory::UniqueConstInterpolatedPtr = typedef std::unique_ptr< const Interpolated > |
using aikido::trajectory::UniqueConstSplinePtr = typedef std::unique_ptr< const Spline > |
using aikido::trajectory::UniqueConstTrajectoryPtr = typedef std::unique_ptr< const Trajectory > |
using aikido::trajectory::UniqueInterpolatedPtr = typedef std::unique_ptr< Interpolated > |
using aikido::trajectory::UniqueSplinePtr = typedef std::unique_ptr< Spline > |
using aikido::trajectory::UniqueTrajectoryPtr = typedef std::unique_ptr< Trajectory > |
using aikido::trajectory::WeakBSplinePtr = typedef std::weak_ptr< BSpline > |
using aikido::trajectory::WeakConstBSplinePtr = typedef std::weak_ptr< const BSpline > |
using aikido::trajectory::WeakConstInterpolatedPtr = typedef std::weak_ptr< const Interpolated > |
using aikido::trajectory::WeakConstSplinePtr = typedef std::weak_ptr< const Spline > |
using aikido::trajectory::WeakConstTrajectoryPtr = typedef std::weak_ptr< const Trajectory > |
using aikido::trajectory::WeakInterpolatedPtr = typedef std::weak_ptr< Interpolated > |
using aikido::trajectory::WeakSplinePtr = typedef std::weak_ptr< Spline > |
using aikido::trajectory::WeakTrajectoryPtr = typedef std::weak_ptr< Trajectory > |
UniqueInterpolatedPtr aikido::trajectory::concatenate | ( | const Interpolated & | traj1, |
const Interpolated & | traj2 | ||
) |
Concatenates two interpolated trajectories.
This function concatenates two interpolated trajectories into one interpolated trajectory. The start state of the last segment in the first trajectory is connected with the start of the first segment in the second trajectory in concatenation. For example, concatenating trajectory a: [wp1(t=1), wp2(t=2.1), wp3(t=4)] and trajectory b: [wp4(t=2), wp5(t=7)] gets a new trajectory: [wp1(t=1), wp2(t=2.1), wp4(t=4), wp5(t=9)]. It gaurantees that the new duration is the sum of the durations of the two. wp3' is dervied by merging wp3 and wp4, which connects the start of wp3 and the end of wp4. The state spaces of two trajectories should be the same.
[in] | traj1 | The first half interpolated trajectory |
[in] | traj2 | The second half interpolated trajectory |
UniqueSplinePtr aikido::trajectory::convertToSpline | ( | const Interpolated & | inputTrajectory | ) |
Converts an interpolated trajectory to a piecewise linear spline trajectory.
This function requires the _inputTrajectory
to use a GeodesicInterpolator
. So the conversion exactly preserves the geometric path.
[in] | inputTrajectory | Interpolated trajectory |
UniqueSplinePtr aikido::trajectory::createPartialTrajectory | ( | const Spline & | traj, |
double | partialStartTime | ||
) |
Retrieves part of a given spline trajectory.
Given a spline trajectory traj
between [startTime, endTime] and a time point partialStartTime
, such that startTime <= partialStartTime
<= endTime, retrieves the part of traj
between partialStartTime
and endTime. The retrieved spline is shifted in time to begin at startTime instead of at partialStartTime
.
[in] | traj | Original spline trajectory |
[in] | partialStartTime | Start time of the new trajectory |
If | partialStartTime is not in the interval defined by the trajectory start time and end time. |
double aikido::trajectory::findTimeOfClosestStateOnTrajectory | ( | const Trajectory & | traj, |
const statespace::StateSpace::State * | referenceState, | ||
double & | distance, | ||
double | timeStep = 0.01 |
||
) |
Finds the time of the closest state on a trajectory to a given state.
This function checks discrete states on [t0, t1, ..., tn] where t0 and tn are the start time and end time of the trajectory, respectively. The two endpoints are always included in the check. If two states are equidistant to the reference state, then the first one along the time-dimension will be returned.
[in] | traj | Input trajectory |
[in] | referenceState | Reference state |
[out] | distance | Distance to the closest state |
[in] | timeStep | Time step in finding the closest state |
UniqueInterpolatedPtr aikido::trajectory::toR1JointTrajectory | ( | const Interpolated & | trajectory | ) |
Converts an interpolated trajectory from a Cartesian product space of SO(2) and R1 joints to a Cartesian product space of strictly R1 joints.
[in] | trajectory | Trajectory to be converted. |