pub trait RobotModelBackend {
Show 15 methods
// Required methods
fn coriolis(
&self,
q: &[f64; 7],
dq: &[f64; 7],
i_total: &[f64; 9],
m_total: f64,
f_x_ctotal: &[f64; 3],
gravity_earth: &[f64; 3],
) -> [f64; 7];
fn gravity(
&self,
q: &[f64; 7],
gravity_earth: &[f64; 3],
m_total: f64,
f_x_ctotal: &[f64; 3],
) -> [f64; 7];
fn mass(
&self,
q: &[f64; 7],
i_total: &[f64; 9],
m_total: f64,
f_x_ctotal: &[f64; 3],
) -> [f64; 49];
fn pose(&self, q: &[f64; 7], joint_index: usize) -> [f64; 16];
fn pose_flange(&self, q: &[f64; 7]) -> [f64; 16];
fn pose_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 16];
fn pose_stiffness(
&self,
q: &[f64; 7],
f_t_ee: &[f64; 16],
ee_t_k: &[f64; 16],
) -> [f64; 16];
fn body_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42];
fn body_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42];
fn body_jacobian_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 42];
fn body_jacobian_stiffness(
&self,
q: &[f64; 7],
f_t_ee: &[f64; 16],
ee_t_k: &[f64; 16],
) -> [f64; 42];
fn zero_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42];
fn zero_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42];
fn zero_jacobian_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 42];
fn zero_jacobian_stiffness(
&self,
q: &[f64; 7],
f_t_ee: &[f64; 16],
ee_t_k: &[f64; 16],
) -> [f64; 42];
}Expand description
Rigid-body model backend.
Port of libfranka’s franka::RobotModelBase (src/robot_model_base.h).
The method set is deliberately identical so an alternative backend can be
slotted in the way libfranka’s tests slot in a mocked RobotModelBase.
All joint_index arguments are 1-based and must be in 1..=7.
Required Methods§
Sourcefn coriolis(
&self,
q: &[f64; 7],
dq: &[f64; 7],
i_total: &[f64; 9],
m_total: f64,
f_x_ctotal: &[f64; 3],
gravity_earth: &[f64; 3],
) -> [f64; 7]
fn coriolis( &self, q: &[f64; 7], dq: &[f64; 7], i_total: &[f64; 9], m_total: f64, f_x_ctotal: &[f64; 3], gravity_earth: &[f64; 3], ) -> [f64; 7]
Coriolis force vector C(q, dq) * dq, in Nm.
Port of RobotModelBase::coriolis with a gravity argument, which
libfranka evaluates as rnea(q, dq, 0) - generalized_gravity(q).
Sourcefn gravity(
&self,
q: &[f64; 7],
gravity_earth: &[f64; 3],
m_total: f64,
f_x_ctotal: &[f64; 3],
) -> [f64; 7]
fn gravity( &self, q: &[f64; 7], gravity_earth: &[f64; 3], m_total: f64, f_x_ctotal: &[f64; 3], ) -> [f64; 7]
Gravity torque vector, in Nm. Port of RobotModelBase::gravity.
Sourcefn mass(
&self,
q: &[f64; 7],
i_total: &[f64; 9],
m_total: f64,
f_x_ctotal: &[f64; 3],
) -> [f64; 49]
fn mass( &self, q: &[f64; 7], i_total: &[f64; 9], m_total: f64, f_x_ctotal: &[f64; 3], ) -> [f64; 49]
7x7 joint-space inertia matrix, column-major. Port of RobotModelBase::mass.
Sourcefn pose(&self, q: &[f64; 7], joint_index: usize) -> [f64; 16]
fn pose(&self, q: &[f64; 7], joint_index: usize) -> [f64; 16]
Pose of a joint frame in the base frame. Port of RobotModelBase::pose.
Sourcefn pose_flange(&self, q: &[f64; 7]) -> [f64; 16]
fn pose_flange(&self, q: &[f64; 7]) -> [f64; 16]
Pose of the flange frame. Port of RobotModelBase::poseFlange.
Sourcefn pose_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 16]
fn pose_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 16]
Pose of the end-effector frame. Port of RobotModelBase::poseEe.
Sourcefn pose_stiffness(
&self,
q: &[f64; 7],
f_t_ee: &[f64; 16],
ee_t_k: &[f64; 16],
) -> [f64; 16]
fn pose_stiffness( &self, q: &[f64; 7], f_t_ee: &[f64; 16], ee_t_k: &[f64; 16], ) -> [f64; 16]
Pose of the stiffness frame. Port of RobotModelBase::poseStiffness.
Sourcefn body_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42]
fn body_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42]
Body (LOCAL) Jacobian of a joint frame. Port of RobotModelBase::bodyJacobian.
Sourcefn body_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]
fn body_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]
Body Jacobian of the flange frame. Port of RobotModelBase::bodyJacobianFlange.
Sourcefn body_jacobian_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 42]
fn body_jacobian_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 42]
Body Jacobian of the end-effector frame. Port of RobotModelBase::bodyJacobianEe.
Sourcefn body_jacobian_stiffness(
&self,
q: &[f64; 7],
f_t_ee: &[f64; 16],
ee_t_k: &[f64; 16],
) -> [f64; 42]
fn body_jacobian_stiffness( &self, q: &[f64; 7], f_t_ee: &[f64; 16], ee_t_k: &[f64; 16], ) -> [f64; 42]
Body Jacobian of the stiffness frame. Port of RobotModelBase::bodyJacobianStiffness.
Sourcefn zero_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42]
fn zero_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42]
Zero (LOCAL_WORLD_ALIGNED) Jacobian of a joint frame. Port of
RobotModelBase::zeroJacobian.
Sourcefn zero_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]
fn zero_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]
Zero Jacobian of the flange frame. Port of RobotModelBase::zeroJacobianFlange.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".