mc_rtc  2.12.0
TransformFunction.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_tvm/api.h>
8 #include <mc_tvm/fwd.h>
9 
10 #include <mc_rbdyn/fwd.h>
11 
12 #include <tvm/function/abstract/Function.h>
13 
14 #include <RBDyn/Jacobian.h>
15 
16 #include <SpaceVecAlg/SpaceVecAlg>
17 
18 namespace mc_tvm
19 {
20 
22 class MC_TVM_DLLAPI TransformFunction : public tvm::function::abstract::Function
23 {
24 public:
25  SET_UPDATES(TransformFunction, Value, Velocity, Jacobian, NormalAcceleration)
26 
27 
33 
35  void reset();
36 
38  inline const sva::PTransformd & pose() const noexcept { return pose_; }
39 
41  inline void pose(const sva::PTransformd & pose) noexcept { pose_ = pose; }
42 
44  inline const Eigen::Vector6d & refVel() const noexcept { return refVel_; }
45 
47  inline void refVel(const Eigen::Vector6d & refVel) noexcept { refVel_ = refVel; }
48 
50  inline const Eigen::Vector6d & refAccel() const noexcept { return refAccel_; }
51 
53  inline void refAccel(const Eigen::Vector6d & refAccel) noexcept { refAccel_ = refAccel; }
54 
56  inline const mc_rbdyn::RobotFrame & frame() const noexcept { return *frame_; }
57 
58 protected:
59  void updateValue();
63 
66 
68  rbd::Jacobian frameJac_;
69  Eigen::MatrixXd shortJacMat_;
70  Eigen::MatrixXd jacMat_;
71  sva::MotionVecd err_p_;
72  sva::MotionVecd w_p_p_;
73  sva::MotionVecd V_err_p_;
74 
76  sva::PTransformd pose_;
77  Eigen::Vector6d refVel_;
78  Eigen::Vector6d refAccel_;
79 };
80 
81 } // namespace mc_tvm
Definition: TransformFunction.h:23
Eigen::Vector6d refVel_
Definition: TransformFunction.h:77
const mc_rbdyn::RobotFrame & frame() const noexcept
Definition: TransformFunction.h:56
sva::PTransformd pose_
Definition: TransformFunction.h:76
void refVel(const Eigen::Vector6d &refVel) noexcept
Definition: TransformFunction.h:47
const Eigen::Vector6d & refVel() const noexcept
Definition: TransformFunction.h:44
mc_tvm::RobotFrame & tvm_frame_
Definition: TransformFunction.h:65
sva::MotionVecd w_p_p_
Definition: TransformFunction.h:72
rbd::Jacobian frameJac_
Definition: TransformFunction.h:68
sva::MotionVecd V_err_p_
Definition: TransformFunction.h:73
Eigen::MatrixXd jacMat_
Definition: TransformFunction.h:70
void refAccel(const Eigen::Vector6d &refAccel) noexcept
Definition: TransformFunction.h:53
sva::MotionVecd err_p_
Definition: TransformFunction.h:71
Eigen::MatrixXd shortJacMat_
Definition: TransformFunction.h:69
Eigen::Vector6d refAccel_
Definition: TransformFunction.h:78
void pose(const sva::PTransformd &pose) noexcept
Definition: TransformFunction.h:41
const Eigen::Vector6d & refAccel() const noexcept
Definition: TransformFunction.h:50
mc_rbdyn::ConstRobotFramePtr frame_
Definition: TransformFunction.h:64
#define MC_TVM_DLLAPI
Definition: api.h:47
Definition: generic_gripper.h:15
std::shared_ptr< const RobotFrame > ConstRobotFramePtr
Definition: fwd.h:25
Definition: CollisionFunction.h:16
Definition: RobotFrame.h:22
Definition: RobotFrame.h:28