Skip to content

Commit 0ae2058

Browse files
mhubiigithub-actions[bot]
authored andcommitted
fix invalid integration (#320)
(cherry picked from commit b3a290d)
1 parent fffada3 commit 0ae2058

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lbr_description/ros2_control/lbr_controllers.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
ros__parameters:
101101
robot_name: lbr
102102
admittance:
103-
mass: [0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
104-
damping: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
103+
mass: [0.05, 0.05, 0.05, 0.005, 0.005, 0.005]
104+
damping: [1., 1., 1., 0.1, 0.1, 0.1]
105105
stiffness: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
106106
inv_jac_ctrl:
107107
chain_root: lbr_link_0

lbr_ros2_control/src/controllers/admittance_controller.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ AdmittanceController::update(const rclcpp::Time & /*time*/, const rclcpp::Durati
131131
admittance_impl_ptr_->compute(f_ext_, delta_x_, dx_, ddx_);
132132

133133
// integrate ddx_ to command velocity
134-
twist_command_ = ddx_ * dt;
134+
dx_ += ddx_ * dt;
135+
twist_command_ = dx_;
135136

136137
if (!inv_jac_ctrl_impl_ptr_) {
137138
RCLCPP_ERROR(this->get_node()->get_logger(), "Inverse Jacobian controller not initialized.");

0 commit comments

Comments
 (0)