Skip to main content

Admittance Class

Declaration​

class moveit_pro_controllers::Admittance { ... }

Included Headers​

#include <admittance.hpp>

Public Constructors Index​

Admittance (const size_t num_joints, const size_t num_tips, const std::vector< AdmittanceParameters > &parameters, const Eigen::VectorNd &joint_damping, const AdmittanceKinematics &kinematics)

Public Member Functions Index​

AdmittanceResultupdateKinematics (const TimedJointState &current_joint_state, const TimedJointState &reference_joint_state)
Eigen::Vector6dpayloadGravityWrenchInSensorFrame (size_t tip_index) const
AdmittanceResultupdate (const TimedJointState &current_joint_state, const std::vector< Eigen::Vector6d > &measured_wrenches, const TimedJointState &reference_joint_state, const Duration &period, TimedJointState &desired_joint_state)
const AdmittanceState &getAdmittanceState () const
AdmittanceState &getAdmittanceState ()

Private Member Attributes Index​

AdmittanceStatestate_
std::vector< AdmittanceParameters >parameters_
Eigen::VectorNdjoint_damping_
AdmittanceKinematicskinematics_
boolkinematics_updated_ = false

Definition at line 137 of file admittance.hpp.

Public Constructors​

Admittance()​

moveit_pro_controllers::Admittance::Admittance (const size_t num_joints, const size_t num_tips, const std::vector< AdmittanceParameters > & parameters, const Eigen::VectorNd & joint_damping, const AdmittanceKinematics & kinematics)
inline explicit

Definition at line 140 of file admittance.hpp.

Public Member Functions​

getAdmittanceState()​

const AdmittanceState & moveit_pro_controllers::Admittance::getAdmittanceState ()
inline nodiscard

Definition at line 186 of file admittance.hpp.

getAdmittanceState()​

AdmittanceState & moveit_pro_controllers::Admittance::getAdmittanceState ()
inline

Definition at line 192 of file admittance.hpp.

payloadGravityWrenchInSensorFrame()​

Eigen::Vector6d moveit_pro_controllers::Admittance::payloadGravityWrenchInSensorFrame (size_t tip_index)
nodiscard

The wrench the payload of tip tip_index exerts on its force/torque sensor at the poses of the last updateKinematics call, expressed in the sensor frame. Zero for a tip without payload mass. Valid only after that call succeeded.

Declaration at line 163 of file admittance.hpp, definition at line 116 of file admittance.cpp.

update()​

AdmittanceResult moveit_pro_controllers::Admittance::update (const TimedJointState & current_joint_state, const std::vector< Eigen::Vector6d > & measured_wrenches, const TimedJointState & reference_joint_state, const Duration & period, TimedJointState & desired_joint_state)

Calculate 'desired joint states' based on the 'measured force', 'reference joint state', and 'current_joint_state', at the poses of the last updateKinematics call. Pass the same current_joint_state and reference_joint_state as that call.

Parameters
[in] current_joint_state

the last commanded joint state, which the admittance offset integrates from.

[in] measured_wrenches

external wrench in each sensor frame, with tare offset, payload compensation, filter and deadband already applied.

[in] reference_joint_state

input joint state reference.

[in] period

the control loop period.

[out] desired_joint_state

joint state reference after the admittance offset is applied to the input reference.

Returns

SUCCESS, ERROR_COMPUTING_TRANSFORMS if updateKinematics has not succeeded since the previous update, or ERROR_COMPUTING_ADMITTANCE_OFFSET if the admittance law failed.

Declaration at line 180 of file admittance.hpp, definition at line 131 of file admittance.cpp.

updateKinematics()​

AdmittanceResult moveit_pro_controllers::Admittance::updateKinematics (const TimedJointState & current_joint_state, const TimedJointState & reference_joint_state)
nodiscard

Refreshes the sensor and end-effector poses for this control cycle. Call it once per cycle before update; payloadGravityWrenchInSensorFrame and update use the poses it computes.

Parameters
[in] current_joint_state

the last commanded joint state, which the admittance offset integrates from.

[in] reference_joint_state

input joint state reference.

Returns

SUCCESS, or ERROR_COMPUTING_TRANSFORMS if the forward kinematics failed.

Declaration at line 155 of file admittance.hpp, definition at line 109 of file admittance.cpp.

Private Member Attributes​

joint_damping_​

Eigen::VectorNd moveit_pro_controllers::Admittance::joint_damping_

Definition at line 200 of file admittance.hpp.

kinematics_​

AdmittanceKinematics moveit_pro_controllers::Admittance::kinematics_

Definition at line 201 of file admittance.hpp.

kinematics_updated_​

bool moveit_pro_controllers::Admittance::kinematics_updated_ = false

Definition at line 204 of file admittance.hpp.

parameters_​

std::vector<AdmittanceParameters> moveit_pro_controllers::Admittance::parameters_

Definition at line 199 of file admittance.hpp.

state_​

AdmittanceState moveit_pro_controllers::Admittance::state_

Definition at line 198 of file admittance.hpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.