SineSweepController
Code Repository:
SineSweepTorqueCalibration
Overview
This section provides documentation and configurations for performing sine sweep torque calibration validation on the TALOS robot.
The goal is not to identify full joint dynamics, but rather to validate the torque calibration by exciting a specific joint with a chirp (sine sweep) signal and analyzing its response.
Two modes of operation are supported:
- Position Control: the sine sweep is applied through the position controller.
⚠️ When using this mode, choose small amplitudes, since the input is specified directly in radians. - Torque Control: the sine sweep is applied directly through the torque controller.
This allows comparing the robot’s behavior under both control modes and verifying the correctness and robustness of the torque calibration.
1. Initial Robot Configuration
Before starting the calibration:
- Move the robot into a configuration where the joint to be calibrated is aligned with gravity (minimizes gravitational effects and simplifies the dynamic model).
- Start the position controllers and the rqt_joint_trajectory_controller to manually position the robot.
roslaunch my_talos_config talos_position_controllers.launch
rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller
Example:

2. Start Controller
After positioning the robot, stop the current controllers and start the SineSweepController.
You can test either Position Control or Torque Control.
roslaunch local_sine_sweep_torque_controller sine_sweep_controller.launch local_joint_control:=direct_position_control local_joint_control_pkg:=pal_local_joint_control joint_name:=leg_right_4_joint controller_pkg_name:=talos_controller_configuration
roslaunch local_sine_sweep_torque_controller sine_sweep_controller.launch local_joint_control:=inertia_shaping_effort_analytic_dob_control local_joint_control_pkg:=inertia_shaping_effort_control joint_name:=leg_right_4_joint controller_pkg_name:=talos_controller_configuration
3. Sending the Calibration Signal
Once the SineSweepController is active, send the sine sweep (chirp) signal to the joint.
Use axclient.py to send the action goal to the controller.
- The chirp signal is a sinusoidal signal with varying frequency.
- If start and end frequencies are very close, the chirp degenerates into a pure single-frequency sine wave.
rosrun actionlib axclient.py /sine_sweep_controller/chirp local_sine_sweep_torque_controller/ChirpFunctionAction
4. Record Data
Record relevant data using rosbag:
rosbag record -O PositionControlRightLegJoint4.bag /motors_statistics/names /motors_statistics/values /introspection_data/names /introspection_data/values