Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
example-robot-data
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
Gepetto
example-robot-data
Commits
a8638660
Commit
a8638660
authored
1 year ago
by
Fabian Schramm
Browse files
Options
Downloads
Patches
Plain Diff
move import of paths
- always try to import EXAMPLE_ROBOT_DATA_MODEL_DIR and EXAMPLE_ROBOT_DATA_SOURCE_DIR
parent
f3aa2653
No related branches found
No related tags found
No related merge requests found
Pipeline
#28032
failed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/example_robot_data/robots_loader.py
+6
-2
6 additions, 2 deletions
python/example_robot_data/robots_loader.py
with
6 additions
and
2 deletions
python/example_robot_data/robots_loader.py
+
6
−
2
View file @
a8638660
...
...
@@ -5,6 +5,10 @@ import numpy as np
import
pinocchio
as
pin
from
pinocchio.robot_wrapper
import
RobotWrapper
try
:
from
.path
import
EXAMPLE_ROBOT_DATA_MODEL_DIR
,
EXAMPLE_ROBOT_DATA_SOURCE_DIR
except
ImportError
:
pass
def
getModelPath
(
subpath
,
printmsg
=
False
):
source
=
dirname
(
dirname
(
dirname
(
__file__
)))
# top level source directory
...
...
@@ -17,13 +21,13 @@ def getModelPath(subpath, printmsg=False):
join
(
source
,
"
robots
"
),
]
try
:
from
.path
import
EXAMPLE_ROBOT_DATA_MODEL_DIR
,
EXAMPLE_ROBOT_DATA_SOURCE_DIR
EXAMPLE_ROBOT_DATA_MODEL_DIR
# function called from installed project
paths
.
append
(
EXAMPLE_ROBOT_DATA_MODEL_DIR
)
# function called from off-tree build dir
paths
.
append
(
EXAMPLE_ROBOT_DATA_SOURCE_DIR
)
except
Import
Error
:
except
Name
Error
:
pass
paths
+=
[
join
(
p
,
"
../../../share/example-robot-data/robots
"
)
for
p
in
sys
.
path
]
for
path
in
paths
:
...
...
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