sot-torque-control  1.6.4
Collection of dynamic-graph entities aimed at implementing torque control on different robots.
doc/ddpRun.md
Go to the documentation of this file.
1 # Running the DDP on the right elbow joint of Pyrene
2 
3 In the following, we demonstrate how to run a test with sot-torque-control, <a href="https://github.com/stack-of-tasks/ddp-actuator-solver">ddp-actuator-solver</a> and <a href="https://gitlab.laas.fr/pyrene-dev/talos-torque-control.git">talos-torque-control</a>.
4 
5 ## Start the simulation
6 
7 Start the simulation with the robot in the half-sitting position:
8 ```
9 roslaunch talos_data talos_gazebo.launch start_half_sitting:=true
10 ```
11 If you are on the real robot just ignore this step.
12 
13 ## Start the SoT in torque mode
14 
15 To start the SoT in simulation in torque mode:
16 ```
17 roslaunch roscontrol_sot_talos sot_talos_controller_gazebo_effort.launch
18 ```
19 
20 To start the SoT on the real robot in torque mode:
21 ```
22 roslaunch roscontrol_sot_talos sot_talos_controller_effort.launch
23 ```
24 
25 ## Run the test
26 
27 First of all, you need to go to the folder where your script is.
28 For running the ddp test of talos-torque-control, assuming you are in the root directory:
29 
30 ```
31 cd script
32 ```
33 
34 Then, you can just run the test, specifying that you are in simulation mode:
35 
36 ```
37 python test_ddp_sinu_effort.py simu
38 ```
39 
40 Or on the real robot:
41 
42 ```
43 python test_ddp_sinu_effort.py robot
44 ```
45 
46 This will launch the test making the robot executing a sinusoid with its right arm (on the elbow joint) using the DDP solver.
47 This one computes a trajectory avoiding the limits in position, velocity and torque of the robot.
48 
49 The script also saves the dynamic graph in /tmp/sot_ddp_talos_effort.pdf.
50 
51 You can add loads on the arm of the robot and see how it will react: by degrading the sinusoid movement of its elbow to respect its limits.
52 
53 To make the loads taken into account by the DDP formulation you should use the following commands:
54 
55 ```
56 rosrun dynamic_graph_bridge run_command
57 robot.ddp_ctrl.setLoadParam(30.0,-0.021481595, 0.10)
58 ```
59 
60 It will add a load of 30kg at the coordinates (-0.021481595, 0.10) with respect to the elbow joint (10cm ahead on the arm from the joint, almost centered).
61 
62 To remove the load just run:
63 
64 ```
65 robot.ddp_ctrl.removeLoad()
66 ```
67 
68 ## Other
69 
70 More information on how to use the SoT and how to work on Talos can be found <a href="https://wiki.laas.fr/robots/Pyrene">in the robot wiki page</a> (you need LAAS permissions to access this).