Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
pinocchio
Commits
c0ec9405
Commit
c0ec9405
authored
Sep 27, 2016
by
jcarpent
Browse files
[Python] Fix relative path for model files and dirs
parent
5ce64386
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/display.py
View file @
c0ec9405
import
unittest
import
pinocchio
as
se3
import
numpy
as
np
import
os
from
pinocchio.robot_wrapper
import
RobotWrapper
# Warning : the paths are here hard-coded. This file is only here as an example
list_py
=
[
"/local/fvalenza/devel/src/pinocchio/models"
,
"titi"
]
robot
=
RobotWrapper
(
"/local/fvalenza/devel/src/pinocchio/models/romeo.urdf"
,
list_py
,
se3
.
JointModelFreeFlyer
())
romeo_model_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
current_file
,
'../models'
))
romeo_model_file
=
romeo_model_path
+
"/romeo.urdf"
list_hints
=
[
romeo_model_path
,
"titi"
]
robot
=
RobotWrapper
(
romeo_model_file
,
list_hints
,
se3
.
JointModelFreeFlyer
())
robot
.
initDisplay
()
robot
.
loadDisplayModel
(
"world/pinocchio"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment