Skip to content

Commit 7d0f2cd

Browse files
committed
remove untested nullspace control
1 parent 0220c12 commit 7d0f2cd

File tree

1 file changed

+6
-26
lines changed

1 file changed

+6
-26
lines changed

cartesian_vic_controller/src/rules/vanilla_cartesian_impedance_rule.cpp

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -251,32 +251,12 @@ bool VanillaCartesianImpedanceRule::compute_controls(
251251
// Nullspace objective for stability
252252
// ------------------------------------------------
253253
if (vic_input_data.activate_nullspace_control) {
254-
RCLCPP_DEBUG(logger_, "Cmd nullspace joint acc...");
255-
nullspace_projection_ = I_joint_space_ - J_pinv_ * J_;
256-
M_nullspace_.diagonal() = vic_input_data.nullspace_joint_inertia;
257-
K_nullspace_.diagonal() = vic_input_data.nullspace_joint_stiffness;
258-
D_nullspace_.diagonal() = vic_input_data.nullspace_joint_damping;
259-
M_inv_nullspace_.diagonal() = M_nullspace_.diagonal().cwiseInverse();
260-
auto error_position_nullspace = \
261-
vic_input_data.nullspace_desired_joint_positions - vic_input_data.joint_state_position;
262-
// Add nullspace contribution to joint accelerations
263-
if (vic_input_data.has_external_torque_sensor()) {
264-
RCLCPP_DEBUG(logger_, "Cmd nullspace joint acc with external torques...");
265-
vic_command_data.joint_command_acceleration += nullspace_projection_ * M_inv_nullspace_ * (
266-
-D_nullspace_ * vic_input_data.joint_state_velocity +
267-
K_nullspace_ * error_position_nullspace +
268-
external_joint_torques_
269-
);
270-
} else {
271-
// Use natural joint space inertia
272-
RCLCPP_DEBUG(
273-
logger_,
274-
"Cmd nullspace joint acc with natural joint inertia (no ext torque sensor)...");
275-
vic_command_data.joint_command_acceleration += nullspace_projection_ * (
276-
-D_nullspace_ * vic_input_data.joint_state_velocity +
277-
K_nullspace_ * error_position_nullspace
278-
);
279-
}
254+
RCLCPP_ERROR(
255+
logger_,
256+
"Nullspace control is not implemented in VanillaCartesianImpedanceRule!"
257+
);
258+
// TODO(anyone): implement nullspace control for impedance rule
259+
success = false;
280260
} else {
281261
// Pure (small) damping in nullspace for stability
282262
RCLCPP_WARN_THROTTLE(

0 commit comments

Comments
 (0)