sot-talos-balance  2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
test_admittance_end_effector.py
Go to the documentation of this file.
1 from time import sleep
2 
3 from dynamic_graph.sot_talos_balance.utils.run_test_utils import (
4  run_ft_wrist_calibration,
5  run_test,
6  runCommandClient,
7 )
8 
9 try:
10  # Python 2
11  input = raw_input # noqa
12 except NameError:
13  pass
14 
15 run_test("appli_admittance_end_effector.py")
16 
17 run_ft_wrist_calibration("robot.forceCalibrator")
18 
19 input("Wait before running the test")
20 
21 sleep(10.0)
22 
23 # --- DISPLAY
24 # force_data = np.loadtxt(
25 # "/tmp/dg_" + evalCommandClient("robot.controller.name") + "-force.dat"
26 # )
27 # w_force_data = np.loadtxt(
28 # "/tmp/dg_" + evalCommandClient("robot.controller.name") + "-w_force.dat"
29 # )
30 
31 # plt.ion()
32 
33 # plt.figure()
34 # plt.plot(force_data[:,1],'b-')
35 # plt.plot(force_data[:,2],'r-')
36 # plt.plot(force_data[:,3],'g-')
37 # plt.title('force')
38 # plt.legend(['force x', 'force y', 'force z'])
39 
40 # plt.figure()
41 # plt.plot(w_force_data[:,1],'b-')
42 # plt.plot(w_force_data[:,2],'r-')
43 # plt.plot(w_force_data[:,3],'g-')
44 # plt.title('w_force')
45 # plt.legend(['w_force x', 'w_force y', 'w_force z'])
46 
47 input("Wait before leaving the simulation")
48 
49 runCommandClient("dump_tracer(robot.tracer)")
sot_talos_balance.utils.run_test_utils.runCommandClient
runCommandClient
Definition: run_test_utils.py:23
sot_talos_balance.test.test_admittance_end_effector.input
input
Definition: test_admittance_end_effector.py:11
sot_talos_balance.utils.run_test_utils.run_ft_wrist_calibration
def run_ft_wrist_calibration(sensor_name, force=False)
Definition: run_test_utils.py:132
sot_talos_balance.utils.run_test_utils.run_test
def run_test(appli, verbosity=1, interactive=True)
Definition: run_test_utils.py:83