sot-talos-balance
2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
test_joystick_dcmZmpControl.py
Go to the documentation of this file.
1
"""Test CoM admittance control as described in paper,
2
with a Reference Velocity provided"""
3
4
# File adapted from appli_dcmZmpControl_file.py and
5
# appli_dcmZmpControl_online_ISA.py written by Isabelle Maroger
6
# ALL THINGS ADDED OR CHANGED ARE COMMENTED IN CAPITAL LETTERS
7
8
# from dynamic_graph import * # for entity graph display
9
from
dynamic_graph.sot_talos_balance.utils.run_test_utils
import
(
10
ask_for_confirmation,
11
run_ft_calibration,
12
run_test,
13
runCommandClient,
14
)
15
16
run_test
(
"appli_joystick_dcmZmpControl.py"
)
17
18
run_ft_calibration
(
"robot.ftc"
)
19
input
(
"Wait before running the test"
)
20
21
# Connect ZMP reference and reset controllers
22
print(
"Connect ZMP reference"
)
23
runCommandClient
(
"plug(robot.zmp_estimator.emergencyStop,robot.cm.emergencyStop_zmp)"
)
24
runCommandClient
(
"plug(robot.dcm_control.zmpRef,robot.com_admittance_control.zmpDes)"
)
25
runCommandClient
(
26
"robot.com_admittance_control.setState(robot.wp.comDes.value,[0.0,0.0,0.0])"
27
)
28
runCommandClient
(
"robot.com_admittance_control.Kp.value = Kp_adm"
)
29
runCommandClient
(
"robot.dcm_control.resetDcmIntegralError()"
)
30
runCommandClient
(
"robot.dcm_control.Ki.value = Ki_dcm"
)
31
32
c =
ask_for_confirmation
(
"Execute trajectory?"
)
33
if
c:
34
print(
"Executing the trajectory"
)
35
runCommandClient
(
"robot.triggerPG.sin.value = 1"
)
36
37
else
:
38
print(
"Not executing the trajectory"
)
39
40
input
(
"Wait before dumping the data"
)
41
42
runCommandClient
(
"dump_tracer(robot.tracer)"
)
43
44
print(
"Bye!"
)
sot_talos_balance.utils.run_test_utils.runCommandClient
runCommandClient
Definition:
run_test_utils.py:23
sot_talos_balance.utils.run_test_utils.ask_for_confirmation
def ask_for_confirmation(text)
Definition:
run_test_utils.py:110
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_calibration
def run_ft_calibration(sensor_name, force=False)
Definition:
run_test_utils.py:118
sot_talos_balance.utils.run_test_utils.run_test
def run_test(appli, verbosity=1, interactive=True)
Definition:
run_test_utils.py:83
src
dynamic_graph
sot_talos_balance
test
test_joystick_dcmZmpControl.py
Generated by
1.8.17