File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
cartesian_vic_controller/src/rules Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,6 @@ bool VanillaCartesianImpedanceRule::compute_controls(
212
212
M_inv = M.inverse ();
213
213
}
214
214
215
-
216
215
// Compute impedance control law in the base frame
217
216
// ------------------------------------------------
218
217
// VIC rule: M * err_p_ddot + D * err_p_dot + K * err_p = F_ext - F_ref
@@ -278,12 +277,15 @@ bool VanillaCartesianImpedanceRule::compute_controls(
278
277
if (parameters_.vic .use_natural_robot_inertia ) {
279
278
raw_joint_command_effort_ = \
280
279
vic_input_data.natural_joint_space_inertia .diagonal ().asDiagonal () *
281
- vic_command_data.joint_command_acceleration ; // F_ext is already cancelled in IC Eq.
280
+ vic_command_data.joint_command_acceleration ;
281
+ // Note: F_ext is already cancelled in IC Eq.
282
+ // See https://www.diag.uniroma1.it/deluca/rob2_en/15_ImpedanceControl.pdf (page 9)
283
+ // J_.transpose() * (vic_input_data.natural_cartesian_inertia * M_inv - I_) * F_ext;
282
284
} else {
283
285
raw_joint_command_effort_ = \
284
- vic_input_data.natural_joint_space_inertia .diagonal ().asDiagonal () *
285
- vic_command_data.joint_command_acceleration - \
286
- J_.transpose () * F_ext;
286
+ vic_input_data.natural_joint_space_inertia .diagonal ().asDiagonal ()
287
+ * vic_command_data.joint_command_acceleration
288
+ + J_.transpose () * F_ext;
287
289
}
288
290
289
291
// Gravity compensation
You can’t perform that action at this time.
0 commit comments