|
| AdmittanceRule (const std::shared_ptr< admittance_controller::ParamListener > ¶meter_handler) |
|
controller_interface::return_type | configure (const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > &node, const size_t num_joint, const std::string &robot_description) |
| Configure admittance rule memory using number of joints. More...
|
|
controller_interface::return_type | reset (const size_t num_joints) |
| Reset all values back to default.
|
|
bool | get_all_transforms (const trajectory_msgs::msg::JointTrajectoryPoint ¤t_joint_state, const trajectory_msgs::msg::JointTrajectoryPoint &reference_joint_state) |
|
void | apply_parameters_update () |
|
controller_interface::return_type | update (const trajectory_msgs::msg::JointTrajectoryPoint ¤t_joint_state, const geometry_msgs::msg::Wrench &measured_wrench, const trajectory_msgs::msg::JointTrajectoryPoint &reference_joint_state, const rclcpp::Duration &period, trajectory_msgs::msg::JointTrajectoryPoint &desired_joint_states) |
|
const control_msgs::msg::AdmittanceControllerState & | get_controller_state () |
|
|
std::shared_ptr< admittance_controller::ParamListener > | parameter_handler_ |
|
admittance_controller::Params | parameters_ |
|
|
bool | calculate_admittance_rule (AdmittanceState &admittance_state, double dt) |
|
void | process_wrench_measurements (const geometry_msgs::msg::Wrench &measured_wrench, const Eigen::Matrix< double, 3, 3 > &sensor_world_rot, const Eigen::Matrix< double, 3, 3 > &cog_world_rot) |
|
template<typename T1 , typename T2 > |
void | vec_to_eigen (const std::vector< T1 > &data, T2 &matrix) |
|
◆ apply_parameters_update()
void admittance_controller::AdmittanceRule::apply_parameters_update |
( |
| ) |
|
Updates parameter_ struct if any parameters have changed since last update. Parameter dependent Eigen field members (end_effector_weight_, cog_pos_, mass_, mass_inv_ stiffness, selected_axes, damping_) are also updated
◆ calculate_admittance_rule()
bool admittance_controller::AdmittanceRule::calculate_admittance_rule |
( |
AdmittanceState & |
admittance_state, |
|
|
double |
dt |
|
) |
| |
|
protected |
Calculates the admittance rule from given the robot's current joint angles. The admittance controller state input is updated with the new calculated values. A boolean value is returned indicating if any of the kinematics plugin calls failed.
- Parameters
-
[in] | admittance_state | contains all the information needed to calculate the admittance offset |
[in] | dt | controller period |
[out] | success | true if no calls to the kinematics interface fail |
◆ configure()
controller_interface::return_type admittance_controller::AdmittanceRule::configure |
( |
const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > & |
node, |
|
|
const size_t |
num_joint, |
|
|
const std::string & |
robot_description |
|
) |
| |
Configure admittance rule memory using number of joints.
Configure admittance rule memory for num joints and load kinematics interface.
◆ get_all_transforms()
bool admittance_controller::AdmittanceRule::get_all_transforms |
( |
const trajectory_msgs::msg::JointTrajectoryPoint & |
current_joint_state, |
|
|
const trajectory_msgs::msg::JointTrajectoryPoint & |
reference_joint_state |
|
) |
| |
Calculate all transforms needed for admittance control using the loader kinematics plugin. If the transform does not exist in the kinematics model, then TF will be used for lookup. The return value is true if all transformation are calculated without an error
- Parameters
-
[in] | current_joint_state | current joint state of the robot |
[in] | reference_joint_state | input joint state reference |
[out] | success | true if no calls to the kinematics interface fail |
◆ get_controller_state()
const control_msgs::msg::AdmittanceControllerState & admittance_controller::AdmittanceRule::get_controller_state |
( |
| ) |
|
Set fields of state_message
from current admittance controller state.
- Parameters
-
[out] | state_message | message containing target position/vel/accel, wrench, and actual robot state, among other things |
◆ process_wrench_measurements()
void admittance_controller::AdmittanceRule::process_wrench_measurements |
( |
const geometry_msgs::msg::Wrench & |
measured_wrench, |
|
|
const Eigen::Matrix< double, 3, 3 > & |
sensor_world_rot, |
|
|
const Eigen::Matrix< double, 3, 3 > & |
cog_world_rot |
|
) |
| |
|
protected |
Updates internal estimate of wrench in world frame wrench_world_
given the new measurement measured_wrench
, the sensor to base frame rotation sensor_world_rot
, and the center of gravity frame to base frame rotation cog_world_rot
. The wrench_world_
estimate includes gravity compensation
- Parameters
-
[in] | measured_wrench | most recent measured wrench from force torque sensor |
[in] | sensor_world_rot | rotation matrix from world frame to sensor frame |
[in] | cog_world_rot | rotation matrix from world frame to center of gravity frame |
◆ update()
controller_interface::return_type admittance_controller::AdmittanceRule::update |
( |
const trajectory_msgs::msg::JointTrajectoryPoint & |
current_joint_state, |
|
|
const geometry_msgs::msg::Wrench & |
measured_wrench, |
|
|
const trajectory_msgs::msg::JointTrajectoryPoint & |
reference_joint_state, |
|
|
const rclcpp::Duration & |
period, |
|
|
trajectory_msgs::msg::JointTrajectoryPoint & |
desired_joint_states |
|
) |
| |
Calculate 'desired joint states' based on the 'measured force', 'reference joint state', and 'current_joint_state'.
- Parameters
-
[in] | current_joint_state | current joint state of the robot |
[in] | measured_wrench | most recent measured wrench from force torque sensor |
[in] | reference_joint_state | input joint state reference |
[in] | period | time in seconds since last controller update |
[out] | desired_joint_state | joint state reference after the admittance offset is applied to the input reference |
The documentation for this class was generated from the following files: