In the old code, there used to be an option to select between inverse_dynamics_controller and kuka_torque_controller. The two are slightly different where the inputs to the kuka_torque_controller has a "Tau input". The inverse_dynamics_controller is selected for position control where kuka_torque_controller is selected for torque control.
In the new code for manipulation_station, how come the option to use kuka_torque_controller is gone and inverse_dynamics_controller is the only type of controller being used? Does this mean that manipulation station is made only for position control and not torque control?
If not, then how would you enable torque control?
The code below is from kuka_simulation
// Adds a iiwa controller.
StateFeedbackControllerInterface<double>* controller = nullptr;
if (FLAGS_torque_control) {
VectorX<double> stiffness, damping_ratio;
SetTorqueControlledIiwaGains(&stiffness, &damping_ratio);
stiffness = stiffness.replicate(num_iiwa, 1).eval();
damping_ratio = damping_ratio.replicate(num_iiwa, 1).eval();
controller = builder.AddController<KukaTorqueController<double>>(
RigidBodyTreeConstants::kFirstNonWorldModelInstanceId, tree.Clone(),
stiffness, damping_ratio);
} else {
VectorX<double> iiwa_kp, iiwa_kd, iiwa_ki;
SetPositionControlledIiwaGains(&iiwa_kp, &iiwa_ki, &iiwa_kd);
iiwa_kp = iiwa_kp.replicate(num_iiwa, 1).eval();
iiwa_kd = iiwa_kd.replicate(num_iiwa, 1).eval();
iiwa_ki = iiwa_ki.replicate(num_iiwa, 1).eval();
controller = builder.AddController<InverseDynamicsController<double>>(
RigidBodyTreeConstants::kFirstNonWorldModelInstanceId, tree.Clone(),
iiwa_kp, iiwa_ki, iiwa_kd,
false /* without feedforward acceleration */);
}
Thanks