talos-torque-control  1.1.0
Collection of dynamic-graph entities aiming at the implementation of torque control on TALOS.
doc/running.md
Go to the documentation of this file.
1 # Running a test
2 
3 In the following, we quickly demonstrate how to run a test with <a href="https://github.com/stack-of-tasks/sot-torque-control">sot-torque-control</a> and talos-torque-control.
4 
5 ## Start the simulation
6 
7 First of all, you need to start the simulation.
8 
9 To start Gazebo, load a scene and spawn Talos, the simplest way is to directly use the launch file provided by PAL:
10 ```
11 roslaunch talos_gazebo talos_gazebo.launch
12 ```
13 
14 Notice that this will spawn Talos at configuration zero. This is not always what you want.
15 The package talos_data offers different launch files to spawn it at different configurations.
16 
17 Most commonly, you might want to spawn the robot in the half-sitting position:
18 ```
19 roslaunch talos_data talos_gazebo.launch start_half_sitting:=true
20 ```
21 
22 
23 ## Start the SoT in position mode
24 
25 To start the SoT in simulation in position mode:
26 ```
27 roslaunch roscontrol_sot_talos sot_talos_controller_gazebo.launch
28 ```
29 
30 ## Start the SoT in torque mode
31 
32 To start the SoT in simulation in torque mode:
33 ```
34 roslaunch roscontrol_sot_talos sot_talos_controller_gazebo_effort.launch
35 ```
36 
37 ## Run the test
38 
39 First of all, you need to go to the folder where your script is.
40 For instance, for running the standard tests of talos-torque-control, assuming you are in the root directory:
41 
42 ```
43 cd script
44 ```
45 
46 Then, you can just run the chosen test. For instance:
47 
48 ```
49 python sim_com.py position
50 ```
51 
52 This will launch a test routine executing a sinusoid on the CoM of the robot in position control (you should have started the SoT in position mode).
53 It also saves the dynamic graph in /tmp/sot_talos_tsid_com.pdf.
54 
55 ### Graph of the architecture
56 
57 \image html Sot_torque_control_framework_for_position_control.png
58 
59 For torque control simply run:
60 
61 ```
62 python sim_com.py torque
63 ```
64 ### Graph of the architecture
65 
66 \image html Sot_torque_control_framework_for_torque_control.png
67 
68 These two examples replicate the ex2 of the TSID jupyter notebooks in position and torque control in Gazebo (see the jupyter <a href="https://github.com/stack-of-tasks/tsid/blob/master/exercizes/notebooks/TSID_ex2.ipynb">here</a>).
69 
70 
71 ## Interacting with the dynamic graph
72 
73 If you want to dynamically interact with the graph
74 
75 ```
76 rosrun dynamic_graph_bridge run_command
77 ```
78 
79 ## Other
80 
81 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).
82 
83