sot-talos-balance  1.7.0
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 sot-talos-balance.
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, without een using sot-talos-balance
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 sot-talos-balance 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 sot_talos_balance talos_gazebo_half_sitting.launch
20 ```
21 
22 If you ever need a different configuration, all you have to do is taking talos_gazebo_half_sitting.launch, copying it with a different name and modifying it.
23 
24 ## Start the SoT in position mode
25 
26 To start the SoT in simulation in position mode:
27 ```
28 roslaunch roscontrol_sot_talos sot_talos_controller_gazebo.launch
29 ```
30 
31 ## Run the test
32 
33 First of all, you need to go to the folder where your script is.
34 For instance, for running the standard tests of sot-talos-balance,
35 assuming you are in the root directory:
36 
37 ```
38 cd python/sot_talos_balance/test
39 ```
40 
41 Then, you can just run the chosen test. For instance:
42 
43 ```
44 python test_dcm_zmp_control.py
45 ```
46 This will launch a test routine executing a sinusoid and raising the foot.
47 
48 ## Run the test with your own recorded movements
49 
50 The test that needs to be run in order o execute your own prerecorded movement is
51 
52 ```
53 python test_dcm_zmp_control.py [testfolder]
54 ```
55 
56 where `[testfolder]` contains the following files:
57 ```
58 CoM.dat
59 LeftFoot.dat
60 RightFoot.dat
61 WaistOrientation.dat
62 optionally, ZMP.dat (if not given, it is computed from the CoM)
63 ```
64 where the CoM and the ZMP are in the following format:
65 ```
66 [position3D velocity3D acceleration3D]
67 ```
68 the feet are
69 ```
70 [position6D velocity6D acceleration6D]
71 ```
72 and the waist
73 ```
74 [orientation3D angular_velocity3D angular_acceleration3D]
75 ```
76 
77 Pay attention that the lines of each file should *not* have trailing whitespace.
78 Actually, the velocity and acceleration information are only really needed for the CoM. For all other quantities, these values are not really employed, but they are needed due to how nd-trajectory-generator is implemented. You can set this quantities arbitrarily to zero.
79 
80 If you are running a simulation, folder `[testfolder]` can be anyways in your computer.
81 If you are running an experiment on the robot, folder `[testfolder]` must be installed somewhere on the robot itself.
82 
83 A quick-and-dirty way of installing new motions in the robot is putting them in sot-talos-balance.
84 In this case, you have to put it in
85 ```
86 [sot-talos-balance-repo]/ros/sot_talos_balance/data
87 ```
88 This way, when executing (see <a href="md_doc_installation.html">the installation page</a>)
89 ```
90 make install
91 ```
92 it will automatically be copied to
93 ```
94 /opt/openrobots/share/sot_talos_balance/data
95 ```
96 which will then be copied to the robot when you update sot-talos-balance on it.
97 
98 If you which, you can access the motions in sot-talos-balance without specifying the full path, by doing
99 ```
100 python test_dcm_zmp_control.py -0 [testfolder]
101 ```
102 which will automatically look in
103 ```
104 /opt/openrobots/share/sot_talos_balance/data/[testfolder]
105 ```
106 
107 ## Interacting with the dynamic graph
108 
109 If you want to dynamically interact with the graph
110 
111 ```
112 rosrun dynamic_graph_bridge run_command
113 ```
114 
115 ## Other
116 
117 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).
118 
119