36 template<
typename Derived>
62 const Eigen::Matrix3d &
target,
63 const std::vector<std::pair<double, Eigen::Matrix3d>> & oriWp = {});
84 void oriWaypoints(
const std::vector<std::pair<double, Eigen::Matrix3d>> & oriWp);
262 Eigen::VectorXd
eval()
const override;
375 #include <mc_tasks/SplineTrajectoryTask.hpp>
std::shared_ptr< const RobotFrame > ConstRobotFramePtr
Definition: fwd.h:25
Definition: StabilizerStandingState.h:12
Definition: RobotFrame.h:22
Simplify access to values hold within a JSON file.
Definition: Configuration.h:166
Logs controller data to disk.
Definition: Logger.h:30
Definition: StateBuilder.h:28
Definition: QPSolver.h:86
Generic CRTP implementation for a task tracking a curve in both position and orientation....
Definition: SplineTrajectoryTask.h:38
void stiffness(const Eigen::VectorXd &stiffness)
Set dimensional stiffness.
const std::vector< std::pair< double, Eigen::Vector6d > > & dimWeightInterpolation() const noexcept
Sets the dimensional weights (controls the importance of orientation/translation).
Definition: SplineTrajectoryTask.h:205
void damping(double damping)
Set the task damping, leaving its stiffness unchanged.
double currentTime() const noexcept
Definition: SplineTrajectoryTask.h:316
bool timeElapsed() const
Whether the trajectory has finished.
void stiffnessInterpolation(const std::vector< std::pair< double, Eigen::Vector6d >> &stiffnessGains)
void damping(const Eigen::VectorXd &damping)
Set dimensional damping.
double currTime_
Definition: SplineTrajectoryTask.h:369
void dimWeightInterpolation(const std::vector< std::pair< double, Eigen::Vector6d >> &dimWeights)
void target(const sva::PTransformd &target)
Sets the curve target pose. Translation target will be handled by the Derived curve,...
void stiffness(double stiffness)
Set the task stiffness/damping.
const sva::PTransformd & refPose() const
Returns the trajectory reference world pose.
Eigen::VectorXd eval() const override
Returns the transformError between current robot surface pose and its final target.
double duration_
Definition: SplineTrajectoryTask.h:360
void displaySamples(unsigned s)
Number of points to sample on the spline for the gui display.
Eigen::VectorXd dimWeight() const override
Gets the dimensional weights (orientation/translation)
std::function< bool(const mc_tasks::MetaTask &, std::string &)> buildCompletionCriteria(double dt, const mc_rtc::Configuration &config) const override
unsigned samples_
Definition: SplineTrajectoryTask.h:370
void load(mc_solver::QPSolver &solver, const mc_rtc::Configuration &config) override
Load parameters from a Configuration object.
void update(mc_solver::QPSolver &) override
Update trajectory target.
void refPose(const sva::PTransformd &pose)
Tracks a reference world pose.
double duration() const noexcept
Returns the trajectory's duration.
Definition: SplineTrajectoryTask.h:319
SequenceInterpolator6d stiffnessInterpolator_
Definition: SplineTrajectoryTask.h:364
const sva::PTransformd target() const
Gets the target pose (position/orientation)
void setGains(double stiffness, double damping)
Set both stiffness and damping.
bool pause() const noexcept
Definition: SplineTrajectoryTask.h:313
mc_rbdyn::ConstRobotFramePtr frame_
Definition: SplineTrajectoryTask.h:359
const std::vector< std::pair< double, Eigen::Vector6d > > & stiffnessInterpolation() const noexcept
Sets the dimensional weights (controls the importance of orientation/translation).
Definition: SplineTrajectoryTask.h:225
mc_trajectory::InterpolatedRotation oriSpline_
Definition: SplineTrajectoryTask.h:361
void setGains(const Eigen::VectorXd &stiffness, const Eigen::VectorXd &damping)
Set dimensional stiffness and damping.
void dampingInterpolation(const std::vector< std::pair< double, Eigen::Vector6d >> &dampingGains)
void addToLogger(mc_rtc::Logger &logger) override
Add information about the task to the logger.
void dimWeight(const Eigen::VectorXd &dimW) override
Sets the dimensional weights (controls the importance of orientation/translation).
const std::vector< std::pair< double, Eigen::Vector6d > > & dampingInterpolation() const noexcept
Sets the dimensional weights (controls the importance of orientation/translation).
Definition: SplineTrajectoryTask.h:244
void stiffness(double stiffness)
Set the task stiffness/damping.
bool inSolver_
Definition: SplineTrajectoryTask.h:371
unsigned displaySamples() const
Number of samples for displaying the spline.
SequenceInterpolator6d dimWeightInterpolator_
Definition: SplineTrajectoryTask.h:363
SplineTrajectoryTask(const mc_rbdyn::RobotFrame &frame, double duration, double stiffness, double weight, const Eigen::Matrix3d &target, const std::vector< std::pair< double, Eigen::Matrix3d >> &oriWp={})
Constructor.
void damping(double damping)
Set the task damping, leaving its stiffness unchanged.
virtual Eigen::VectorXd evalTracking() const
Returns the trajectory tracking error: transformError between the current robot surface pose and its ...
void oriWaypoints(const std::vector< std::pair< double, Eigen::Matrix3d >> &oriWp)
Sets the orientation waypoints.
void pause(bool paused)
Allows to pause the task.
Definition: SplineTrajectoryTask.h:310
SequenceInterpolator6d dampingInterpolator_
Definition: SplineTrajectoryTask.h:365
bool paused_
Definition: SplineTrajectoryTask.h:367
void addToGUI(mc_rtc::gui::StateBuilder &gui) override
Add task controls to the GUI. Interactive controls for the trajectory waypoints and end-endpoints aut...
Generic wrapper for a trajectory dynamic over an error function.
Definition: TrajectoryTaskGeneric.h:27
double damping() const
Get the current task damping.
Eigen::VectorXd dimWeight() const override
Get the current task's dim weight vector.
double stiffness() const
Get the current task stiffness.
const Eigen::VectorXd & refAccel() const
Get the trajectory reference acceleration.
double weight() const
Returns the task weight.
const Eigen::VectorXd & refVel() const
Get the trajectory reference velocity.
TrajectoryTaskGeneric(const mc_rbdyn::Robots &robots, unsigned int robotIndex, double stiffness, double weight)
Constructor (auto damping)
Describes a trajectory with smoothly interpolate rotation between waypoints.
Definition: InterpolatedRotation.h:23
void values(const TimedValueVector &values)
Set interpolator values.
Definition: SequenceInterpolator.h:82