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
Carlos Mastalli
example-robot-data
Commits
08433109
Commit
08433109
authored
Nov 06, 2019
by
Guilhem Saurel
Browse files
load ur 3/5 with or without its gripper
parent
c53499ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
python/example_robot_data/robots_loader.py
View file @
08433109
...
...
@@ -236,8 +236,9 @@ def loadICub(reduced=True):
return
robot
def
loadUR
(
robot
=
5
,
limited
=
False
):
URDF_FILENAME
=
"ur%i%s_robot.urdf"
%
(
robot
,
"_joint_limited"
if
limited
else
''
)
def
loadUR
(
robot
=
5
,
limited
=
False
,
gripper
=
False
):
assert
(
not
(
gripper
and
(
robot
==
10
or
limited
)))
URDF_FILENAME
=
"ur%i%s_%s.urdf"
%
(
robot
,
"_joint_limited"
if
limited
else
''
,
'gripper'
if
gripper
else
'robot'
)
URDF_SUBPATH
=
"/ur_description/urdf/"
+
URDF_FILENAME
modelPath
=
getModelPath
(
URDF_SUBPATH
)
return
RobotWrapper
.
BuildFromURDF
(
modelPath
+
URDF_SUBPATH
,
[
modelPath
])
...
...
unittest/test_load.py
View file @
08433109
...
...
@@ -101,6 +101,18 @@ class UR5Test(RobotTestCase):
RobotTestCase
.
NV
=
6
class
UR5LimitedTest
(
RobotTestCase
):
RobotTestCase
.
ROBOT
=
example_robot_data
.
loadUR
(
limited
=
True
)
RobotTestCase
.
NQ
=
6
RobotTestCase
.
NV
=
6
class
UR5GripperTest
(
RobotTestCase
):
RobotTestCase
.
ROBOT
=
example_robot_data
.
loadUR
(
gripper
=
True
)
RobotTestCase
.
NQ
=
6
RobotTestCase
.
NV
=
6
class
KinovaTest
(
RobotTestCase
):
RobotTestCase
.
ROBOT
=
example_robot_data
.
loadKinova
()
RobotTestCase
.
NQ
=
9
...
...
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