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
bed7917b
Commit
bed7917b
authored
Oct 29, 2019
by
Carlos Mastalli
Browse files
[cleanup] Used "" instead of ''
parent
738e2eb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/example_robot_data/robots_loader.py
View file @
bed7917b
...
...
@@ -48,11 +48,11 @@ def loadANYmal(withArm=None):
if
withArm
is
None
:
URDF_FILENAME
=
"anymal.urdf"
SRDF_FILENAME
=
"anymal.srdf"
REF_POSTURE
=
'
standing
'
REF_POSTURE
=
"
standing
"
elif
withArm
==
"kinova"
:
URDF_FILENAME
=
"anymal-kinova.urdf"
SRDF_FILENAME
=
"anymal-kinova.srdf"
REF_POSTURE
=
'
standing_with_arm_up
'
REF_POSTURE
=
"
standing_with_arm_up
"
URDF_SUBPATH
=
"/anymal_b_simple_description/robots/"
+
URDF_FILENAME
SRDF_SUBPATH
=
"/anymal_b_simple_description/srdf/"
+
SRDF_FILENAME
modelPath
=
getModelPath
(
URDF_SUBPATH
)
...
...
@@ -160,7 +160,7 @@ def loadHyQ():
# Load URDF file
robot
=
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
],
pinocchio
.
JointModelFreeFlyer
())
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
'
standing
'
)
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
"
standing
"
)
# Add the free-flyer joint limits
addFreeFlyerJointLimits
(
robot
)
return
robot
...
...
@@ -178,7 +178,7 @@ def loadSolo(solo=True):
# Load URDF file
robot
=
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
],
pinocchio
.
JointModelFreeFlyer
())
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
'
standing
'
)
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
"
standing
"
)
# Add the free-flyer joint limits
addFreeFlyerJointLimits
(
robot
)
return
robot
...
...
@@ -193,7 +193,7 @@ def loadKinova():
# Load URDF file
robot
=
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
])
# Load SRDF file
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
'
arm_up
'
)
readParamsFromSrdf
(
robot
,
modelPath
+
SRDF_SUBPATH
,
False
,
False
,
"
arm_up
"
)
return
robot
...
...
@@ -242,7 +242,7 @@ def loadICub(reduced=True):
def
loadUR
(
robot
=
5
,
limited
=
False
):
URDF_FILENAME
=
'
ur%i%s_robot.urdf
'
%
(
robot
,
'
_joint_limited
'
if
limited
else
''
)
URDF_SUBPATH
=
'
/ur_description/urdf/
'
+
URDF_FILENAME
URDF_FILENAME
=
"
ur%i%s_robot.urdf
"
%
(
robot
,
"
_joint_limited
"
if
limited
else
''
)
URDF_SUBPATH
=
"
/ur_description/urdf/
"
+
URDF_FILENAME
modelPath
=
getModelPath
(
URDF_SUBPATH
)
return
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
])
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