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 current_joint_pos = Eigen::VectorXd::Zero(num_joints);
74 joint_pos = Eigen::VectorXd::Zero(num_joints);
75 joint_vel = Eigen::VectorXd::Zero(num_joints);
76 joint_acc = Eigen::VectorXd::Zero(num_joints);
79 Eigen::VectorXd current_joint_pos;
80 Eigen::VectorXd joint_pos;
81 Eigen::VectorXd joint_vel;
82 Eigen::VectorXd joint_acc;
83 Eigen::Matrix<double, 6, 1> damping;
84 Eigen::Matrix<double, 6, 1> mass;
85 Eigen::Matrix<double, 6, 1> mass_inv;
86 Eigen::Matrix<double, 6, 1> selected_axes;
87 Eigen::Matrix<double, 6, 1> stiffness;
88 Eigen::Matrix<double, 6, 1> wrench_base;
89 Eigen::Matrix<double, 6, 1> admittance_acceleration;
90 Eigen::Matrix<double, 6, 1> admittance_velocity;
91 Eigen::Isometry3d admittance_position;
92 Eigen::Matrix<double, 3, 3> rot_base_control;
93 Eigen::Isometry3d ref_trans_base_ft;
94 std::string ft_sensor_frame;
101 const std::shared_ptr<admittance_controller::ParamListener> & parameter_handler)
103 parameter_handler_ = parameter_handler;
104 parameters_ = parameter_handler_->get_params();
105 num_joints_ = parameters_.joints.size();
111 controller_interface::return_type
configure(
112 const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> & node,
const size_t num_joint,
113 const std::string & robot_description);
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, const std::string &robot_description)
Configure admittance rule memory using number of joints.
Definition admittance_rule_impl.hpp:36
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:315