Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-talos-balance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
sot-talos-balance
Commits
7803d76a
You need to sign in or sign up before continuing.
Commit
7803d76a
authored
6 years ago
by
François Bailly
Browse files
Options
Downloads
Patches
Plain Diff
[cleaned test_param_server]
parent
37c9b4ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/sot_talos_balance/test/test_param_server.py
+4
-18
4 additions, 18 deletions
python/sot_talos_balance/test/test_param_server.py
unittest/python/test_base_estimator.py
+1
-0
1 addition, 0 deletions
unittest/python/test_base_estimator.py
with
5 additions
and
18 deletions
python/sot_talos_balance/test/test_param_server.py
+
4
−
18
View file @
7803d76a
#!/usr/bin/python
# -*- coding: utf-8 -*-1
from
sot_talos_balance.create_entities_utils
import
*
from
dynamic_graph
import
plug
from
time
import
sleep
import
os
from
sot_talos_balance.utils.sot_utils
import
Bunch
from
dynamic_graph.sot.core.meta_tasks_kine
import
MetaTaskKine6d
,
MetaTaskKineCom
,
gotoNd
from
dynamic_graph.sot.core.matrix_util
import
matrixToTuple
from
dynamic_graph
import
plug
import
dynamic_graph
as
dg
from
dynamic_graph.sot.core
import
SOT
from
numpy
import
eye
from
time
import
sleep
def
get_default_conf
():
import
sot_talos_balance.talos.balance_ctrl_conf
as
balance_ctrl_conf
import
sot_talos_balance.talos.admittance_ctrl_conf
as
admittance_ctrl_conf
import
sot_talos_balance.talos.base_estimator_conf
as
base_estimator_conf
import
sot_talos_balance.talos.control_manager_conf
as
control_manager_conf
import
sot_talos_balance.talos.force_torque_estimator_conf
as
force_torque_estimator_conf
import
sot_talos_balance.talos.joint_torque_controller_conf
as
joint_torque_controller_conf
import
sot_talos_balance.talos.control_manager_conf
as
param_server_conf
conf
=
Bunch
();
conf
.
balance_ctrl
=
balance_ctrl_conf
;
conf
.
adm_ctrl
=
admittance_ctrl_conf
;
conf
.
base_estimator
=
base_estimator_conf
;
conf
.
param_server
=
control_manager_conf
;
conf
.
force_torque_estimator
=
force_torque_estimator_conf
;
conf
.
joint_torque_controller
=
joint_torque_controller_conf
;
conf
.
param_server
=
param_server_conf
;
return
conf
;
def
main
(
robot
,
conf
=
None
):
...
...
@@ -68,7 +53,7 @@ def main(robot, conf=None):
#--- ENTITIES
robot
.
param_server
=
create_parameter_server
(
conf
.
param_server
,
dt
)
robot
.
example
=
create_example
()
# will output the number of joints of the robot thanks to a pointer to the RobotUtil created in parameter server
robot
.
example
=
create_example
()
# --- RUN SIMULATION
plug
(
robot
.
comTrajGen
.
x
,
robot
.
taskCom
.
featureDes
.
errorIN
);
...
...
@@ -80,6 +65,7 @@ def main(robot, conf=None):
robot
.
comTrajGen
.
startSinusoid
(
1
,
0.05
,
8.0
);
sleep
(
1.0
)
robot
.
example
.
nbJoints
.
recompute
(
1
)
# outputs the number of joints of the robot thanks to a pointer to the RobotUtil created in parameter server
print
(
robot
.
example
.
nbJoints
.
value
)
This diff is collapsed.
Click to expand it.
unittest/python/test_base_estimator.py
+
1
−
0
View file @
7803d76a
...
...
@@ -42,6 +42,7 @@ example.firstAddend.value = 0.
example
.
secondAddend
.
value
=
0.
example
.
init
(
robot_name
)
embed
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment