Frame.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/Frame.h>
11 
12 #include <SpaceVecAlg/SpaceVecAlg>
13 
14 #include <RBDyn/Jacobian.h>
15 
16 #include <tvm/graph/abstract/Node.h>
17 #include <tvm/internal/MatrixWithProperties.h>
18 
19 namespace mc_tvm
20 {
21 
33 struct MC_TVM_DLLAPI Frame : public tvm::graph::abstract::Node<Frame>
34 {
35  SET_OUTPUTS(Frame, Position, Velocity)
36  SET_UPDATES(Frame, Position, Velocity)
37 
38  friend struct mc_rbdyn::Frame;
39 
40 protected:
42  {
43  };
44 
45 public:
47 
49  inline const sva::PTransformd & position() const noexcept { return position_; }
50 
52  inline const sva::MotionVecd & velocity() const noexcept { return velocity_; }
53 
55  inline const mc_rbdyn::Frame & frame() const noexcept { return frame_; }
56 
57 protected:
60  /* Cache and update functions */
61  sva::PTransformd position_ = sva::PTransformd::Identity();
62  sva::MotionVecd velocity_ = sva::MotionVecd::Zero();
63 
66 };
67 
68 } // namespace mc_tvm
#define MC_TVM_DLLAPI
Definition: api.h:47
Definition: generic_gripper.h:15
Definition: CollisionFunction.h:16
Definition: Frame.h:28
Definition: Frame.h:42
Definition: Frame.h:34
const mc_rbdyn::Frame & frame_
Definition: Frame.h:59
void updateVelocity()
Frame(NewFrameToken, const mc_rbdyn::Frame &frame)
const sva::MotionVecd & velocity() const noexcept
Definition: Frame.h:52
const mc_rbdyn::Frame & frame() const noexcept
Definition: Frame.h:55
const sva::PTransformd & position() const noexcept
Definition: Frame.h:49
void updatePosition()