Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.
Andrea Del Prete edited this page Apr 4, 2017 · 17 revisions

Welcome to the sot-torque-control wiki! This repository contains a set of dynamic-graph entities for the implementation of sensor-feedback control of legged robots. In this wiki you can find a description of these entities, which you can see in the image below.

sot-torque-control-overview

General Information

All the entities in sot-torque-control have a command init that needs to be called to initialize the entity. Typically the init command takes as input the control loop period dt and other necessary information. Once you are connected to the python terminal on the robot, you can start creating entities and plugging signals. Once your computational graph is ready you can start the computation by using the appropriate script start_dynamic_graph.

All entities have an extremely useful command to retrieve the list of signals:

  • displaySignals()

and another command to retrieve the list of commands:

  • commands()

These will be your best friends for the first few weeks!

Device

The device entity represents the robot. Even if it does not belong to sot-torque-control---but to sot-core---we describe it here because it is fundamental to understand the whole system. The output signals of the device are the sensor measurements (e.g. encoders, IMU, force/torque sensors). The input signal of the device are the motor commands (typically motor currents). When connecting to the python interpreter on the robot the device entity already exists and you can access it through robot.device.

Control Manager

The main role of this entity is to handle the fact that not all of the robot joints may be controlled by the same controller. For instance, small joints such as wrists, grippers and neck are typically position controlled, whereas the other joints are torque controlled. The input signals of the Control Manager are the control commands computed by all the available controllers (i.e. position and torque controller in the figure above). The output signal is the control command to send to the device. To change the control mode of a joint you can use the command setCtrlMode (see also commands getCtrlMode, addCtrlMode and ctrlModes). When changing control mode of a joint, to avoid discontinuities, the Control Manager performs a linear interpolation of 1 second between the old and the new control signal. Another key feature of the Control Manager is a safety check: in case the control commands are too large it prints an error message and starts commanding zero current to the device. The maximum control can be changed through the input signal max_current. The stop of the control can also be triggered by another entity through the input signal emergencyStop.

Clone this wiki locally