Expand description
Kinematics and dynamics of the arm, mirroring libfranka’s franka::Model.
Model is a port of franka::Model (include/franka/model.h,
src/model.cpp); it is a thin dispatch layer over a RobotModelBackend,
the equivalent of libfranka’s franka::RobotModelBase. The default backend
is native_backend::NativeBackend, a serial-chain implementation that
reproduces libfranka’s Pinocchio-based franka::RobotModel bit-for-bit
within 1e-9 (kinematics) and 1e-6 (dynamics).
§Matrix layouts
- 4x4 poses are vectorised column-major (
[f64; 16]). - Jacobians are 6x7 column-major (
[f64; 42]); within a column the rows are the linear partsvx, vy, vzfirst and the angular partswx, wy, wzsecond. This is Pinocchio’sMotionlayout, which is what libfranka copies out of Eigen verbatim. - The mass matrix is 7x7 column-major (
[f64; 49]); it is symmetric.
§Example
use franka::model::{Frame, Model};
use franka::robot_state::RobotState;
let urdf = std::fs::read_to_string("fr3.urdf").unwrap();
let model = Model::from_urdf(&urdf).unwrap();
let state = RobotState::default();
let o_t_ee = model.pose(Frame::EndEffector, &state);
let gravity = model.gravity(&state);Re-exports§
pub use model_library::load_from_robot;pub use native_backend::NativeBackend;pub use so_backend::SoModelBackend;
Modules§
- model_
library - Downloading and loading the FCI v5 (Franka Emika Robot, FER) model library.
- native_
backend - Native serial-chain rigid-body backend.
- so_
backend RobotModelBackendover the robot-servedlibfcimodelsshared object.
Structs§
- Model
- Poses of the joints and dynamic properties of the robot.
Enums§
- Frame
- The seven joints, the flange, the end effector and the stiffness frame.
Constants§
- DEFAULT_
GRAVITY_ EARTH - Earth’s gravity used by
Model::coriolis, matching libfranka’sRobotModel::coriolisfallback of{0, 0, -9.81}. - FER_
URDF - The Franka Emika Robot (FER)’s arm, as a URDF the
native_backendcan evaluate.
Traits§
- Robot
Model Backend - Rigid-body model backend.