OrientationFunction.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 namespace mc_tvm
15 {
16 
18 class MC_TVM_DLLAPI OrientationFunction : public tvm::function::abstract::Function
19 {
20 public:
21  SET_UPDATES(OrientationFunction, Value, Velocity, Jacobian, NormalAcceleration)
22 
23 
29 
31  void reset();
32 
34  inline const Eigen::Matrix3d & orientation() const noexcept { return ori_; }
35 
37  inline void orientation(const Eigen::Matrix3d & ori) noexcept { ori_ = ori; }
38 
40  inline const Eigen::Vector3d & refVel() const noexcept { return refVel_; }
41 
43  inline void refVel(const Eigen::Vector3d & refVel) noexcept { refVel_ = refVel; }
44 
46  inline const Eigen::Vector3d & refAccel() const noexcept { return refAccel_; }
47 
49  inline void refAccel(const Eigen::Vector3d & refAccel) noexcept { refAccel_ = refAccel; }
50 
52  inline const mc_rbdyn::RobotFrame & frame() const noexcept { return *robot_frame_; }
53 
54 protected:
55  void updateValue();
56  void updateVelocity();
57  void updateJacobian();
58  void updateNormalAcceleration();
59 
62 
64  Eigen::Matrix3d ori_;
65  Eigen::Vector3d refVel_;
66  Eigen::Vector3d refAccel_;
67 };
68 
69 } // namespace mc_tvm
mc_tvm::OrientationFunction
Definition: OrientationFunction.h:18
mc_tvm::OrientationFunction::refAccel
void refAccel(const Eigen::Vector3d &refAccel) noexcept
Definition: OrientationFunction.h:49
mc_tvm::OrientationFunction::orientation
const Eigen::Matrix3d & orientation() const noexcept
Definition: OrientationFunction.h:34
mc_tvm::OrientationFunction::orientation
void orientation(const Eigen::Matrix3d &ori) noexcept
Definition: OrientationFunction.h:37
mc_tvm::OrientationFunction::refAccel_
Eigen::Vector3d refAccel_
Definition: OrientationFunction.h:66
mc_tvm::OrientationFunction::refAccel
const Eigen::Vector3d & refAccel() const noexcept
Definition: OrientationFunction.h:46
MC_TVM_DLLAPI
#define MC_TVM_DLLAPI
Definition: api.h:47
mc_tvm
Definition: CollisionFunction.h:15
mc_tvm::OrientationFunction::ori_
Eigen::Matrix3d ori_
Definition: OrientationFunction.h:64
mc_tvm::OrientationFunction::refVel
void refVel(const Eigen::Vector3d &refVel) noexcept
Definition: OrientationFunction.h:43
mc_tvm::OrientationFunction::robot_frame_
mc_rbdyn::ConstRobotFramePtr robot_frame_
Definition: OrientationFunction.h:60
mc_rbdyn::RobotFrame
Definition: RobotFrame.h:21
mc_tvm::OrientationFunction::refVel
const Eigen::Vector3d & refVel() const noexcept
Definition: OrientationFunction.h:40
fwd.h
fwd.h
mc_rbdyn::ConstRobotFramePtr
std::shared_ptr< const RobotFrame > ConstRobotFramePtr
Definition: fwd.h:25
mc_tvm::RobotFrame
Definition: RobotFrame.h:27
mc_tvm::OrientationFunction::frame_
mc_tvm::RobotFrame & frame_
Definition: OrientationFunction.h:61
mc_tvm::OrientationFunction::refVel_
Eigen::Vector3d refVel_
Definition: OrientationFunction.h:65
api.h
mc_tvm::OrientationFunction::frame
const mc_rbdyn::RobotFrame & frame() const noexcept
Definition: OrientationFunction.h:52