Go to the documentation of this file.
13 #include <tvm/Variable.h>
14 #include <tvm/VariableVector.h>
15 #include <tvm/graph/abstract/Node.h>
50 SET_OUTPUTS(
Robot, FK, FV, FA, NormalAcceleration, tau, H, C)
51 SET_UPDATES(
Robot, FK, FV, FA, NormalAcceleration, H, C)
54 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
85 inline const tvm::VariablePtr &
q() const noexcept {
return q_; }
87 inline tvm::VariablePtr &
q() noexcept {
return q_; }
90 inline const tvm::VariablePtr &
alpha() const noexcept {
return dq_; }
92 inline tvm::VariablePtr &
alpha() noexcept {
return dq_; }
95 inline const tvm::VariablePtr &
alphaD() const noexcept {
return ddq_; }
97 inline tvm::VariablePtr &
alphaD() noexcept {
return ddq_; }
100 inline const tvm::VariablePtr &
qFloatingBase() const noexcept {
return q_fb_; }
105 inline const tvm::VariablePtr &
qJoints() const noexcept {
return q_joints_; }
107 inline tvm::VariablePtr &
qJoints() noexcept {
return q_joints_; }
117 tvm::VariablePtr qJoint(
size_t jIdx);
125 inline tvm::VariablePtr
qJoint(
const std::string & jName) {
return qJoint(robot().jointIndexByName(jName)); }
128 inline const std::map<tvm::VariablePtr, mimic_variables_t> &
mimics() const noexcept {
return mimics_; }
130 inline std::map<tvm::VariablePtr, mimic_variables_t> &
mimics() noexcept {
return mimics_; }
133 inline const tvm::VariablePtr &
tau() const noexcept {
return tau_; }
135 inline tvm::VariablePtr &
tau() {
return tau_; }
138 inline const CoM &
comAlgo() const noexcept {
return *com_; }
150 inline const Eigen::MatrixXd &
H() const noexcept {
return fd_.H(); }
153 inline const Eigen::VectorXd &
C() const noexcept {
return fd_.C(); }
156 inline const std::vector<sva::MotionVecd> &
normalAccB() const noexcept {
return normalAccB_; }
170 return refJointIndexToQIndex_.at(jointIndex);
186 return refJointIndexToQDotIndex_.at(jointIndex);
195 tvm::VariablePtr q_fb_;
197 tvm::VariablePtr q_joints_;
201 std::map<tvm::VariablePtr, mimic_variables_t> mimics_;
203 tvm::VariablePtr dq_;
205 tvm::VariablePtr ddq_;
207 tvm::VariablePtr tau_;
209 std::vector<sva::MotionVecd> normalAccB_;
211 rbd::ForwardDynamics fd_;
217 std::vector<Eigen::DenseIndex> refJointIndexToQIndex_;
219 std::vector<Eigen::DenseIndex> refJointIndexToQDotIndex_;
225 void updateNormalAcceleration();
Definition: Momentum.h:26
Eigen::DenseIndex refJointIndexToQDotIndex(size_t jointIndex) const
Definition: Robot.h:184
tvm::VariablePtr & q() noexcept
Definition: Robot.h:87
tvm::VariablePtr & alphaD() noexcept
Definition: Robot.h:97
std::map< tvm::VariablePtr, mimic_variables_t > & mimics() noexcept
Definition: Robot.h:130
Momentum & momentumAlgo() noexcept
Definition: Robot.h:147
#define MC_TVM_DLLAPI
Definition: api.h:47
tvm::VariablePtr qJoint(const std::string &jName)
Definition: Robot.h:125
const tvm::VariablePtr & tau() const noexcept
Definition: Robot.h:133
const Limits & limits() const noexcept
Definition: Robot.h:79
tvm::VariablePtr & qJoints() noexcept
Definition: Robot.h:107
tvm::VariablePtr & alpha() noexcept
Definition: Robot.h:92
Definition: CollisionFunction.h:15
Limits & limits() noexcept
Definition: Robot.h:82
const std::vector< sva::MotionVecd > & normalAccB() const noexcept
Definition: Robot.h:156
const tvm::VariablePtr & qFloatingBase() const noexcept
Definition: Robot.h:100
const std::map< tvm::VariablePtr, mimic_variables_t > & mimics() const noexcept
Definition: Robot.h:128
const tvm::VariablePtr & alpha() const noexcept
Definition: Robot.h:90
const tvm::VariablePtr & alphaD() const noexcept
Definition: Robot.h:95
std::pair< tvm::VariableVector, Eigen::VectorXd > mimic_variables_t
Definition: Robot.h:56
CoM & comAlgo() noexcept
Definition: Robot.h:141
const tvm::VariablePtr & q() const noexcept
Definition: Robot.h:85
const Momentum & momentumAlgo() const noexcept
Definition: Robot.h:144
const Eigen::MatrixXd & H() const noexcept
Definition: Robot.h:150
Eigen::DenseIndex refJointIndexToQIndex(size_t jointIndex) const
Definition: Robot.h:168
const mc_rbdyn::Robot & robot() const
Definition: Robot.h:76
std::unique_ptr< CoM > CoMPtr
Definition: fwd.h:13
const tvm::VariablePtr & qJoints() const noexcept
Definition: Robot.h:105
std::unique_ptr< Momentum > MomentumPtr
Definition: fwd.h:22
const CoM & comAlgo() const noexcept
Definition: Robot.h:138
Definition: generic_gripper.h:14
const Eigen::VectorXd & C() const noexcept
Definition: Robot.h:153
tvm::VariablePtr & tau()
Definition: Robot.h:135
tvm::VariablePtr & qFloatingBase() noexcept
Definition: Robot.h:102