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
loco-3d
sot-talos-balance
Commits
a35da6de
Commit
a35da6de
authored
5 years ago
by
Olivier Stasse
Committed by
olivier stasse
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] Make test_dcmZmpControl_file.py running through rosrun
Needed for unit test.
parent
12c40c56
Branches
Branches containing commit
Tags
v1.9.1
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+12
-0
12 additions, 0 deletions
src/CMakeLists.txt
src/sot_talos_balance/utils/run_test_utils.py
+9
-5
9 additions, 5 deletions
src/sot_talos_balance/utils/run_test_utils.py
with
21 additions
and
5 deletions
src/CMakeLists.txt
+
12
−
0
View file @
a35da6de
...
...
@@ -164,6 +164,12 @@ SET(${PROJECT_NAME}_SIMULATION_FILES
appli_hip_flexibility_compensation.py
)
# simulation files
SET
(
${
PROJECT_NAME
}
_ROS_EXEC_FILES
test_dcmZmpControl_file.py
appli_dcmZmpControl_file.py
)
IF
(
BUILD_PYTHON_INTERFACE
)
FOREACH
(
python
${${
PROJECT_NAME
}
_PYTHON_FILES
}
)
PYTHON_INSTALL_ON_SITE
(
${
PY_NAME
}
${
python
}
)
...
...
@@ -180,4 +186,10 @@ IF(BUILD_PYTHON_INTERFACE)
FOREACH
(
python
${${
PROJECT_NAME
}
_SIMULATION_FILES
}
)
PYTHON_INSTALL_ON_SITE
(
${
PY_NAME
}
/test
${
python
}
)
ENDFOREACH
(
python
${${
PROJECT_NAME
}
_SIMULATION_FILES
}
)
FOREACH
(
python
${${
PROJECT_NAME
}
_ROS_EXEC_FILES
}
)
INSTALL
(
PROGRAMS
${
PY_NAME
}
/test/
${
python
}
DESTINATION
${
CMAKE_BINARY_DIR
}
/lib/
${
PROJECT_NAME
}
)
ENDFOREACH
(
python
${${
PROJECT_NAME
}
_ROS_EXEC_FILES
}
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
This diff is collapsed.
Click to expand it.
src/sot_talos_balance/utils/run_test_utils.py
+
9
−
5
View file @
a35da6de
...
...
@@ -54,8 +54,9 @@ def evalCommandClient(code):
return
eval
(
runCommandClient
(
code
).
result
)
def
launch_script
(
code
,
title
,
description
=
""
,
verbosity
=
1
):
input
(
title
+
'
:
'
+
description
)
def
launch_script
(
code
,
title
,
description
=
""
,
verbosity
=
1
,
interactive
=
True
):
if
interactive
:
input
(
title
+
'
:
'
+
description
)
rospy
.
loginfo
(
title
)
rospy
.
loginfo
(
code
)
indent
=
'
'
...
...
@@ -79,7 +80,7 @@ def launch_script(code, title, description="", verbosity=1):
rospy
.
loginfo
(
"
...done with
"
+
title
)
def
run_test
(
appli
,
verbosity
=
1
):
def
run_test
(
appli
,
verbosity
=
1
,
interactive
=
True
):
try
:
rospy
.
loginfo
(
"
Waiting for run_command
"
)
rospy
.
wait_for_service
(
'
/run_command
'
)
...
...
@@ -95,8 +96,11 @@ def run_test(appli, verbosity=1):
rospy
.
loginfo
(
"
Stack of Tasks launched
"
)
launch_script
(
initCode
,
'
initialize SoT
'
,
verbosity
=
verbosity
)
input
(
"
Wait before starting the dynamic graph
"
)
launch_script
(
initCode
,
'
initialize SoT
'
,
verbosity
=
verbosity
,
interactive
=
interactive
)
if
interactive
:
input
(
"
Wait before starting the dynamic graph
"
)
runCommandStartDynamicGraph
()
print
()
except
rospy
.
ServiceException
as
e
:
...
...
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