Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
example-robot-data
Commits
f31382d8
Commit
f31382d8
authored
Aug 20, 2019
by
Carlos Mastalli
Browse files
[loader] Added the free-flyer joint limits to all the floating-base robots
parent
21e463a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/robots_loader.py
View file @
f31382d8
...
...
@@ -23,6 +23,17 @@ def readParamsFromSrdf(robot, SRDF_PATH, verbose):
return
def
addFreeFlyerJointLimits
(
robot
):
rmodel
=
robot
.
model
ub
=
rmodel
.
upperPositionLimit
ub
[:
7
]
=
1
rmodel
.
upperPositionLimit
=
ub
lb
=
rmodel
.
lowerPositionLimit
lb
[:
7
]
=
-
1
rmodel
.
lowerPositionLimit
=
lb
def
loadTalosArm
():
URDF_FILENAME
=
"talos_left_arm.urdf"
URDF_SUBPATH
=
"/talos_data/robots/"
+
URDF_FILENAME
...
...
@@ -48,6 +59,8 @@ def loadTalos():
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
)
assert
((
robot
.
model
.
armature
[:
6
]
==
0.
).
all
())
# Add the free-flyer joint limits
addFreeFlyerJointLimits
(
robot
)
return
robot
...
...
@@ -61,6 +74,8 @@ def loadHyQ():
robot
=
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
],
pinocchio
.
JointModelFreeFlyer
())
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
)
# Add the free-flyer joint limits
addFreeFlyerJointLimits
(
robot
)
return
robot
...
...
@@ -103,4 +118,6 @@ def loadICub(reduced=True):
robot
=
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
],
pinocchio
.
JointModelFreeFlyer
())
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
)
# Add the free-flyer joint limits
addFreeFlyerJointLimits
(
robot
)
return
robot
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment