Franky 0.12.0
A High-Level Motion API for Franka
Loading...
Searching...
No Matches
model.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <franka/model.h>
4
6#include "franky/types.hpp"
7
8namespace franky {
9
16class Model {
17 public:
21 explicit Model(franka::Model model);
22
23 Model(const Model &) = delete;
24 Model &operator=(const Model &) = delete;
25
26 Model(Model &&other) noexcept;
27 Model &operator=(Model &&other) noexcept;
28
36 [[nodiscard]] Affine pose(franka::Frame frame, const RobotState &state) const;
37
47 [[nodiscard]] Affine pose(franka::Frame frame, const Vector7d &q, const Affine &F_T_EE, const Affine &EE_T_K) const;
48
56 [[nodiscard]] Jacobian bodyJacobian(franka::Frame frame, const RobotState &state) const;
57
67 [[nodiscard]] Jacobian bodyJacobian(franka::Frame frame,
68 const Vector7d &q,
69 const Affine &F_T_EE,
70 const Affine &EE_T_K) const;
71
79 [[nodiscard]] Jacobian zeroJacobian(franka::Frame frame, const RobotState &state) const;
80
90 [[nodiscard]] Jacobian zeroJacobian(franka::Frame frame,
91 const Vector7d &q,
92 const Affine &F_T_EE,
93 const Affine &EE_T_K) const;
94
101 [[nodiscard]] Eigen::Matrix<double, 7, 7> mass(const RobotState &state) const;
102
112 [[nodiscard]] Eigen::Matrix<double, 7, 7> mass(const Vector7d &q,
113 const Eigen::Matrix3d &I_total,
114 double m_total,
115 const Eigen::Vector3d &F_x_Ctotal) const;
116
123 [[nodiscard]] Vector7d coriolis(const RobotState &state) const;
124
135 [[nodiscard]] Vector7d coriolis(const Vector7d &q,
136 const Vector7d &dq,
137 const Eigen::Matrix3d &I_total,
138 double m_total,
139 const Eigen::Vector3d &F_x_Ctotal) const;
140
148 [[nodiscard]] Vector7d gravity(const RobotState &state, const Eigen::Vector3d &gravity_earth) const;
149
156 [[nodiscard]] Vector7d gravity(const RobotState &state) const;
157
167 [[nodiscard]] Vector7d gravity(const Vector7d &q,
168 double m_total,
169 const Eigen::Vector3d &F_x_Ctotal,
170 const Eigen::Vector3d &gravity_earth = {0., 0., -9.81}) const;
171
172 private:
173 franka::Model model_;
174};
175
176} // namespace franky
A wrapper around franka::Model that uses Eigen types.
Definition model.hpp:16
Affine pose(franka::Frame frame, const RobotState &state) const
Calculates the pose of a frame relative to the base frame.
Definition model.cpp:18
Model(const Model &)=delete
Jacobian bodyJacobian(franka::Frame frame, const RobotState &state) const
Calculates the body Jacobian in base frame.
Definition model.cpp:27
Eigen::Matrix< double, 7, 7 > mass(const RobotState &state) const
Calculates the mass matrix.
Definition model.cpp:45
Model & operator=(const Model &)=delete
Vector7d gravity(const RobotState &state, const Eigen::Vector3d &gravity_earth) const
Calculates the gravity vector.
Definition model.cpp:65
Vector7d coriolis(const RobotState &state) const
Calculates the Coriolis force vector.
Definition model.cpp:54
Jacobian zeroJacobian(franka::Frame frame, const RobotState &state) const
Calculates the zero Jacobian in base frame.
Definition model.cpp:36
Definition dynamics_limit.cpp:8
Eigen::Vector< double, 7 > Vector7d
Definition types.hpp:12
Eigen::Matrix< double, 6, 7 > Jacobian
Definition types.hpp:13
Eigen::Affine3d Affine
Definition types.hpp:16
Full state of the robot.
Definition robot_state.hpp:20