mc_rtc  2.12.0
LookAtFrameTask.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 
7 #include <mc_tasks/LookAtTask.h>
8 
9 namespace mc_tasks
10 {
11 
17 {
18 public:
32  const Eigen::Vector3d & frameVector,
33  const mc_rbdyn::Frame & target,
34  double stiffness = 0.5,
35  double weight = 200.0);
36 
57  unsigned int robotIndex,
58  const std::string & bodyName,
59  const Eigen::Vector3d & bodyVector,
60  unsigned int surfaceRobotIndex,
61  const std::string & surfaceName,
62  double stiffness = 0.5,
63  double weight = 200);
64 
66  void update(mc_solver::QPSolver &) override;
67 
69  inline const sva::PTransformd & offset() const noexcept { return offset_; }
70 
72  inline void offset(const sva::PTransformd & off) noexcept { offset_ = off; }
73 
74  void load(mc_solver::QPSolver & solver, const mc_rtc::Configuration & config) override;
75 
76 protected:
80  sva::PTransformd offset_ = sva::PTransformd::Identity();
81 };
82 
83 } // namespace mc_tasks
#define MC_TASKS_DLLAPI
Definition: api.h:50
std::shared_ptr< const Frame > ConstFramePtr
Definition: fwd.h:29
Definition: StabilizerStandingState.h:12
Definition: Frame.h:28
Definition: RobotFrame.h:22
Definition: Robots.h:16
Simplify access to values hold within a JSON file.
Definition: Configuration.h:166
Definition: QPSolver.h:86
Track a frame position with a "gaze" vector. This task is a convenience wrapper for LookAtTask that t...
Definition: LookAtFrameTask.h:17
void update(mc_solver::QPSolver &) override
Update the gaze target from TF position.
mc_rbdyn::ConstFramePtr target_
Definition: LookAtFrameTask.h:78
void load(mc_solver::QPSolver &solver, const mc_rtc::Configuration &config) override
Load parameters from a Configuration object.
LookAtFrameTask(const mc_rbdyn::RobotFrame &frame, const Eigen::Vector3d &frameVector, const mc_rbdyn::Frame &target, double stiffness=0.5, double weight=200.0)
Constructor.
const sva::PTransformd & offset() const noexcept
Access offset relative to the surface.
Definition: LookAtFrameTask.h:69
LookAtFrameTask(const mc_rbdyn::Robots &robots, unsigned int robotIndex, const std::string &bodyName, const Eigen::Vector3d &bodyVector, unsigned int surfaceRobotIndex, const std::string &surfaceName, double stiffness=0.5, double weight=200)
Constructor.
void offset(const sva::PTransformd &off) noexcept
Set the offset relative to the surface.
Definition: LookAtFrameTask.h:72
Orient a "gaze" vector defined on a body to look towards a world position. This task is a convenience...
Definition: LookAtTask.h:15