Skip to main content

RobotModelBackend

Trait RobotModelBackend 

Source
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§

Source

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).

Source

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.

Source

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.

Source

fn pose(&self, q: &[f64; 7], joint_index: usize) -> [f64; 16]

Pose of a joint frame in the base frame. Port of RobotModelBase::pose.

Source

fn pose_flange(&self, q: &[f64; 7]) -> [f64; 16]

Pose of the flange frame. Port of RobotModelBase::poseFlange.

Source

fn pose_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 16]

Pose of the end-effector frame. Port of RobotModelBase::poseEe.

Source

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.

Source

fn body_jacobian(&self, q: &[f64; 7], joint_index: usize) -> [f64; 42]

Body (LOCAL) Jacobian of a joint frame. Port of RobotModelBase::bodyJacobian.

Source

fn body_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]

Body Jacobian of the flange frame. Port of RobotModelBase::bodyJacobianFlange.

Source

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.

Source

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.

Source

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.

Source

fn zero_jacobian_flange(&self, q: &[f64; 7]) -> [f64; 42]

Zero Jacobian of the flange frame. Port of RobotModelBase::zeroJacobianFlange.

Source

fn zero_jacobian_ee(&self, q: &[f64; 7], f_t_ee: &[f64; 16]) -> [f64; 42]

Zero Jacobian of the end-effector frame. Port of RobotModelBase::zeroJacobianEe.

Source

fn zero_jacobian_stiffness( &self, q: &[f64; 7], f_t_ee: &[f64; 16], ee_t_k: &[f64; 16], ) -> [f64; 42]

Zero Jacobian of the stiffness frame. Port of RobotModelBase::zeroJacobianStiffness.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§