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
506fb4d0
Commit
506fb4d0
authored
4 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
[Tests] use load
Which lead to find that __main__ was missing the variations of icub & ur5
parent
146632c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/example_robot_data/robots_loader.py
+12
-1
12 additions, 1 deletion
python/example_robot_data/robots_loader.py
unittest/test_load.py
+23
-19
23 additions, 19 deletions
unittest/test_load.py
with
35 additions
and
20 deletions
python/example_robot_data/robots_loader.py
+
12
−
1
View file @
506fb4d0
...
@@ -237,7 +237,12 @@ ROBOTS = {
...
@@ -237,7 +237,12 @@ ROBOTS = {
'
double_pendulum
'
:
(
loadDoublePendulum
,
{}),
'
double_pendulum
'
:
(
loadDoublePendulum
,
{}),
'
hector
'
:
(
loadHector
,
{}),
'
hector
'
:
(
loadHector
,
{}),
'
hyq
'
:
(
loadHyQ
,
{}),
'
hyq
'
:
(
loadHyQ
,
{}),
'
icub
'
:
(
loadICub
,
{}),
'
icub
'
:
(
loadICub
,
{
'
reduced
'
:
False
}),
'
icub_reduced
'
:
(
loadICub
,
{
'
reduced
'
:
True
}),
'
iris
'
:
(
loadIris
,
{}),
'
iris
'
:
(
loadIris
,
{}),
'
kinova
'
:
(
loadKinova
,
{}),
'
kinova
'
:
(
loadKinova
,
{}),
'
panda
'
:
(
loadPanda
,
{}),
'
panda
'
:
(
loadPanda
,
{}),
...
@@ -258,6 +263,12 @@ ROBOTS = {
...
@@ -258,6 +263,12 @@ ROBOTS = {
'
hand
'
:
False
'
hand
'
:
False
}),
}),
'
ur5
'
:
(
loadUR
,
{}),
'
ur5
'
:
(
loadUR
,
{}),
'
ur5_gripper
'
:
(
loadUR
,
{
'
gripper
'
:
True
}),
'
ur5_limited
'
:
(
loadUR
,
{
'
limited
'
:
True
}),
}
}
...
...
This diff is collapsed.
Click to expand it.
unittest/test_load.py
+
23
−
19
View file @
506fb4d0
...
@@ -2,66 +2,70 @@
...
@@ -2,66 +2,70 @@
import
unittest
import
unittest
import
example_robot_data
as
er
d
from
example_robot_data
import
loa
d
class
RobotTestCase
(
unittest
.
TestCase
):
class
RobotTestCase
(
unittest
.
TestCase
):
def
check
(
self
,
robot
,
expected_nq
,
expected_nv
):
def
check
(
self
,
name
,
expected_nq
,
expected_nv
):
"""
Helper function for the real tests
"""
"""
Helper function for the real tests
"""
robot
=
load
(
name
,
display
=
False
)
self
.
assertEqual
(
robot
.
model
.
nq
,
expected_nq
)
self
.
assertEqual
(
robot
.
model
.
nq
,
expected_nq
)
self
.
assertEqual
(
robot
.
model
.
nv
,
expected_nv
)
self
.
assertEqual
(
robot
.
model
.
nv
,
expected_nv
)
self
.
assertTrue
(
hasattr
(
robot
,
"
q0
"
))
self
.
assertTrue
(
hasattr
(
robot
,
"
q0
"
))
def
test_anymal
(
self
):
def
test_anymal
(
self
):
self
.
check
(
erd
.
loadANY
mal
()
,
19
,
18
)
self
.
check
(
'
any
mal
'
,
19
,
18
)
def
test_anymal_kinova
(
self
):
def
test_anymal_kinova
(
self
):
self
.
check
(
erd
.
loadANYmal
(
withArm
=
"
kinova
"
)
,
25
,
24
)
self
.
check
(
'
anymal_
kinova
'
,
25
,
24
)
def
test_hyq
(
self
):
def
test_hyq
(
self
):
self
.
check
(
erd
.
loadHyQ
()
,
19
,
18
)
self
.
check
(
'
hyq
'
,
19
,
18
)
def
test_talos
(
self
):
def
test_talos
(
self
):
self
.
check
(
erd
.
loadT
alos
()
,
39
,
38
)
self
.
check
(
'
t
alos
'
,
39
,
38
)
def
test_talos_arm
(
self
):
def
test_talos_arm
(
self
):
self
.
check
(
erd
.
loadT
alos
(
arm
=
True
)
,
7
,
7
)
self
.
check
(
'
t
alos
_
arm
'
,
7
,
7
)
def
test_talos_legs
(
self
):
def
test_talos_legs
(
self
):
self
.
check
(
erd
.
loadT
alos
(
legs
=
True
)
,
19
,
18
)
self
.
check
(
'
t
alos
_
legs
'
,
19
,
18
)
def
test_icub
(
self
):
def
test_icub
(
self
):
self
.
check
(
erd
.
loadICub
(
reduced
=
False
),
39
,
38
)
self
.
check
(
'
icub
'
,
39
,
38
)
def
test_icub_reduced
(
self
):
self
.
check
(
'
icub_reduced
'
,
36
,
35
)
def
test_solo
(
self
):
def
test_solo
(
self
):
self
.
check
(
erd
.
loadS
olo
()
,
15
,
14
)
self
.
check
(
'
s
olo
'
,
15
,
14
)
def
test_solo12
(
self
):
def
test_solo12
(
self
):
self
.
check
(
erd
.
loadSolo
(
False
)
,
19
,
18
)
self
.
check
(
'
solo12
'
,
19
,
18
)
def
test_tiago
(
self
):
def
test_tiago
(
self
):
self
.
check
(
erd
.
loadT
iago
()
,
50
,
48
)
self
.
check
(
'
t
iago
'
,
50
,
48
)
def
test_tiago_no_hand
(
self
):
def
test_tiago_no_hand
(
self
):
self
.
check
(
erd
.
loadTiago
(
hand
=
False
)
,
14
,
12
)
self
.
check
(
'
tiago_no_hand
'
,
14
,
12
)
def
test_ur5
(
self
):
def
test_ur5
(
self
):
self
.
check
(
erd
.
loadUR
()
,
6
,
6
)
self
.
check
(
'
ur5
'
,
6
,
6
)
def
test_ur5_limited
(
self
):
def
test_ur5_limited
(
self
):
self
.
check
(
erd
.
loadUR
(
limited
=
True
)
,
6
,
6
)
self
.
check
(
'
ur5_
limited
'
,
6
,
6
)
def
test_ur5_gripper
(
self
):
def
test_ur5_gripper
(
self
):
self
.
check
(
erd
.
loadUR
(
gripper
=
True
)
,
6
,
6
)
self
.
check
(
'
ur5_
gripper
'
,
6
,
6
)
def
test_kinova
(
self
):
def
test_kinova
(
self
):
self
.
check
(
erd
.
loadK
inova
()
,
9
,
6
)
self
.
check
(
'
k
inova
'
,
9
,
6
)
def
test_romeo
(
self
):
def
test_romeo
(
self
):
self
.
check
(
erd
.
loadR
omeo
()
,
62
,
61
)
self
.
check
(
'
r
omeo
'
,
62
,
61
)
def
test_panda
(
self
):
def
test_panda
(
self
):
self
.
check
(
erd
.
loadP
anda
()
,
9
,
9
)
self
.
check
(
'
p
anda
'
,
9
,
9
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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