Aikido
KunzRetimer.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_PLANNER_KUNZRETIMER_KUNZRETIMER_HPP_
2 #define AIKIDO_PLANNER_KUNZRETIMER_KUNZRETIMER_HPP_
3 
4 #include <Eigen/Dense>
5 
9 
10 namespace aikido {
11 namespace planner {
12 namespace kunzretimer {
13 
35 std::unique_ptr<aikido::trajectory::Spline> computeKunzTiming(
36  const aikido::trajectory::Interpolated& inputTrajectory,
37  const Eigen::VectorXd& maxVelocity,
38  const Eigen::VectorXd& maxAcceleration,
39  double maxDeviation = 1e-2,
40  double timeStep = 0.1);
41 
45 {
46 public:
52  const Eigen::VectorXd& velocityLimits,
53  const Eigen::VectorXd& accelerationLimits,
54  double maxDeviation,
55  double timeStep);
56 
59  std::unique_ptr<aikido::trajectory::Spline> postprocess(
60  const aikido::trajectory::Interpolated& inputTraj,
61  const aikido::common::RNG& rng,
62  const aikido::constraint::TestablePtr& constraint = nullptr) override;
63 
66  std::unique_ptr<aikido::trajectory::Spline> postprocess(
67  const aikido::trajectory::Spline& inputTraj,
68  const aikido::common::RNG& rng,
69  const aikido::constraint::TestablePtr& constraint = nullptr) override;
70 
72  const Eigen::VectorXd& getVelocityLimits() const;
73 
75  const Eigen::VectorXd& getAccelerationLimits() const;
76 
78  void setVelocityLimits(const Eigen::VectorXd& velocityLimits);
79 
81  void setAccelerationLimits(const Eigen::VectorXd& accelerationLimits);
82 
84  double getTimeStep() const;
85 
87  void setTimeStep(double timeStep);
88 
90  double getMaxDeviation() const;
91 
93  void setMaxDeviation(double maxDeviation);
94 
95 private:
97  Eigen::VectorXd mVelocityLimits;
98 
100  Eigen::VectorXd mAccelerationLimits;
101 
104 
106  double mTimeStep;
107 };
108 
109 } // namespace kunzretimer
110 } // namespace planner
111 } // namespace aikido
112 
113 #endif // ifndef AIKIDO_PLANNER_KUNZRETIMER_KUNZRETIMER_HPP_
TrajectoryPostProcessor.hpp
aikido::planner::kunzretimer::KunzRetimer::getAccelerationLimits
const Eigen::VectorXd & getAccelerationLimits() const
Returns the acceleration limits of the dimensions.
aikido::planner::kunzretimer::KunzRetimer
Class for performing time-optimal trajectory retiming following subject to velocity and acceleration ...
Definition: KunzRetimer.hpp:44
aikido::planner::kunzretimer::KunzRetimer::mAccelerationLimits
Eigen::VectorXd mAccelerationLimits
Set to the value of accelerationLimits.
Definition: KunzRetimer.hpp:100
aikido::planner::kunzretimer::KunzRetimer::setMaxDeviation
void setMaxDeviation(double maxDeviation)
Sets the max deviation of circular blending.
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::planner::kunzretimer::KunzRetimer::getTimeStep
double getTimeStep() const
Returns the time step in following a path.
aikido::planner::kunzretimer::KunzRetimer::getMaxDeviation
double getMaxDeviation() const
Returns the max deviation of circular blending.
aikido::planner::kunzretimer::KunzRetimer::mTimeStep
double mTimeStep
Set to the value of timeStep.
Definition: KunzRetimer.hpp:106
Spline.hpp
aikido::planner::kunzretimer::KunzRetimer::getVelocityLimits
const Eigen::VectorXd & getVelocityLimits() const
Returns the velocity limits of the dimensions.
aikido::planner::kunzretimer::KunzRetimer::setVelocityLimits
void setVelocityLimits(const Eigen::VectorXd &velocityLimits)
Sets the velocity limits of the dimensions.
aikido::planner::kunzretimer::KunzRetimer::postprocess
std::unique_ptr< aikido::trajectory::Spline > postprocess(const aikido::trajectory::Interpolated &inputTraj, const aikido::common::RNG &rng, const aikido::constraint::TestablePtr &constraint=nullptr) override
Performs parabolic retiming on an input trajectory.
Interpolated.hpp
aikido::planner::kunzretimer::KunzRetimer::mVelocityLimits
Eigen::VectorXd mVelocityLimits
Set to the value of velocityLimits.
Definition: KunzRetimer.hpp:97
aikido::common::RNG
Implementation of the C++11 "random engine" concept that uses virtual function calls to erase the typ...
Definition: RNG.hpp:24
aikido::planner::kunzretimer::KunzRetimer::KunzRetimer
KunzRetimer(const Eigen::VectorXd &velocityLimits, const Eigen::VectorXd &accelerationLimits, double maxDeviation, double timeStep)
aikido::planner::kunzretimer::computeKunzTiming
std::unique_ptr< aikido::trajectory::Spline > computeKunzTiming(const aikido::trajectory::Interpolated &inputTrajectory, const Eigen::VectorXd &maxVelocity, const Eigen::VectorXd &maxAcceleration, double maxDeviation=1e-2, double timeStep=0.1)
Computes the time-optimal timing of a trajectory consisting of a sequence Geodesic interpolations bet...
aikido::planner::TrajectoryPostProcessor
Definition: TrajectoryPostProcessor.hpp:12
aikido::constraint::TestablePtr
std::shared_ptr< Testable > TestablePtr
Definition: Testable.hpp:13
aikido::planner::kunzretimer::KunzRetimer::setTimeStep
void setTimeStep(double timeStep)
Sets the time step in following a path.
aikido::planner::kunzretimer::KunzRetimer::mMaxDeviation
double mMaxDeviation
Set to the value of maxDeviation.
Definition: KunzRetimer.hpp:103
aikido::trajectory::Interpolated
Trajectory that uses an Interpolator to interpolate between waypoints.
Definition: Interpolated.hpp:14
aikido::trajectory::Spline
Polynomial spline trajectory defined in a StateSpace.
Definition: Spline.hpp:25
aikido::planner::kunzretimer::KunzRetimer::setAccelerationLimits
void setAccelerationLimits(const Eigen::VectorXd &accelerationLimits)
Sets the acceleration limits of the dimensions.