45 Eigen::Isometry3d ref_base_ft_;
48 Eigen::Isometry3d base_ft_;
51 Eigen::Isometry3d base_control_;
54 Eigen::Isometry3d base_tip_;
57 Eigen::Isometry3d base_cog_;
59 Eigen::Isometry3d world_base_;
66 admittance_velocity.setZero();
67 admittance_acceleration.setZero();
72 selected_axes.setZero();
73 auto idx =
static_cast<Eigen::Index
>(num_joints);
74 current_joint_pos = Eigen::VectorXd::Zero(idx);
75 joint_pos = Eigen::VectorXd::Zero(idx);
76 joint_vel = Eigen::VectorXd::Zero(idx);
77 joint_acc = Eigen::VectorXd::Zero(idx);
80 Eigen::VectorXd current_joint_pos;
81 Eigen::VectorXd joint_pos;
82 Eigen::VectorXd joint_vel;
83 Eigen::VectorXd joint_acc;
84 Eigen::Matrix<double, 6, 1> damping;
85 Eigen::Matrix<double, 6, 1> mass;
86 Eigen::Matrix<double, 6, 1> mass_inv;
87 Eigen::Matrix<double, 6, 1> selected_axes;
88 Eigen::Matrix<double, 6, 1> stiffness;
89 Eigen::Matrix<double, 6, 1> wrench_base;
90 Eigen::Matrix<double, 6, 1> admittance_acceleration;
91 Eigen::Matrix<double, 6, 1> admittance_velocity;
92 Eigen::Isometry3d admittance_position;
93 Eigen::Matrix<double, 3, 3> rot_base_control;
94 Eigen::Isometry3d ref_trans_base_ft;
95 std::string ft_sensor_frame;
102 const std::shared_ptr<admittance_controller::ParamListener> & parameter_handler)
104 parameter_handler_ = parameter_handler;
105 parameters_ = parameter_handler_->get_params();
106 num_joints_ = parameters_.joints.size();
112 controller_interface::return_type
configure(
113 const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node,
const size_t num_joint);
116 controller_interface::return_type
reset(
const size_t num_joints);
126 const trajectory_msgs::msg::JointTrajectoryPoint & current_joint_state,
127 const trajectory_msgs::msg::JointTrajectoryPoint & reference_joint_state);
147 controller_interface::return_type
update(
148 const trajectory_msgs::msg::JointTrajectoryPoint & current_joint_state,
149 const geometry_msgs::msg::Wrench & measured_wrench,
150 const trajectory_msgs::msg::JointTrajectoryPoint & reference_joint_state,
151 const rclcpp::Duration & period,
152 trajectory_msgs::msg::JointTrajectoryPoint & desired_joint_states);
164 std::shared_ptr<admittance_controller::ParamListener> parameter_handler_;
165 admittance_controller::Params parameters_;
186 const geometry_msgs::msg::Wrench & measured_wrench,
187 const Eigen::Matrix<double, 3, 3> & sensor_world_rot,
188 const Eigen::Matrix<double, 3, 3> & cog_world_rot);
190 template <
typename T1,
typename T2>
191 void vec_to_eigen(
const std::vector<T1> & data, T2 & matrix);
197 std::shared_ptr<pluginlib::ClassLoader<kinematics_interface::KinematicsInterface>>
199 std::unique_ptr<kinematics_interface::KinematicsInterface> kinematics_;
202 Eigen::Matrix<double, 6, 1> wrench_world_;
211 Eigen::Vector3d cog_pos_;
214 Eigen::Vector3d end_effector_weight_;
217 control_msgs::msg::AdmittanceControllerState state_message_;
controller_interface::return_type configure(const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > &node, const size_t num_joint)
Configure admittance rule memory using number of joints.
Definition admittance_rule_impl.hpp:35
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)
Definition admittance_rule_impl.hpp:172
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)
Definition admittance_rule_impl.hpp:316