VectorOrientationTask.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2022 CNRS-UM LIRMM, CNRS-AIST JRL
3  */
4 
5 #pragma once
6 
8 
9 namespace mc_tasks
10 {
11 
14 {
26  const Eigen::Vector3d & frameVector,
27  double stiffness = 2.0,
28  double weight = 500.0);
29 
47  VectorOrientationTask(const std::string & bodyName,
48  const Eigen::Vector3d & bodyVector,
49  const Eigen::Vector3d & targetVector,
50  const mc_rbdyn::Robots & robots,
51  unsigned int robotIndex,
52  double stiffness = 2.0,
53  double weight = 500);
54 
56  VectorOrientationTask(const std::string & bodyName,
57  const Eigen::Vector3d & bodyVector,
58  const mc_rbdyn::Robots & robots,
59  unsigned int robotIndex,
60  double stiffness = 2.0,
61  double weight = 500);
62 
68  void reset() override;
69 
75  void targetVector(const Eigen::Vector3d & vector);
76 
82  Eigen::Vector3d targetVector() const;
83 
89  Eigen::Vector3d actual() const;
90 
92  std::string body() { return frame_->body(); }
93 
94  void load(mc_solver::QPSolver & solver, const mc_rtc::Configuration & config) override;
95 
96 protected:
97  void addToGUI(mc_rtc::gui::StateBuilder & gui) override;
98  void addToLogger(mc_rtc::Logger & logger) override;
99 
100 protected:
102 };
103 
104 } // namespace mc_tasks
mc_rtc::Configuration
Simplify access to values hold within a JSON file.
Definition: Configuration.h:165
mc_rbdyn::Robots
Definition: Robots.h:15
MC_TASKS_DLLAPI
#define MC_TASKS_DLLAPI
Definition: api.h:50
mc_solver::QPSolver
Definition: QPSolver.h:85
mc_rtc::Logger
Logs controller data to disk.
Definition: Logger.h:29
mc_rbdyn::RobotFrame
Definition: RobotFrame.h:21
mc_rtc::gui::StateBuilder
Definition: StateBuilder.h:27
mc_rbdyn::ConstRobotFramePtr
std::shared_ptr< const RobotFrame > ConstRobotFramePtr
Definition: fwd.h:25
mc_tasks::VectorOrientationTask
Control the orientation of a vector attached to a frame.
Definition: VectorOrientationTask.h:13
mc_tasks::VectorOrientationTask::body
std::string body()
Return the controlled body.
Definition: VectorOrientationTask.h:92
mc_tasks
Definition: StabilizerStandingState.h:11
mc_tasks::VectorOrientationTask::frame_
mc_rbdyn::ConstRobotFramePtr frame_
Definition: VectorOrientationTask.h:101
TrajectoryTaskGeneric.h
mc_tasks::TrajectoryTaskGeneric
Generic wrapper for a trajectory dynamic over an error function.
Definition: TrajectoryTaskGeneric.h:26