forked from robot-descriptions/robot_descriptions.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_descriptions.py
148 lines (133 loc) · 6.11 KB
/
_descriptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Stéphane Caron
"""List of all robot descriptions."""
from dataclasses import dataclass
from enum import IntEnum
from typing import Dict, Set
class Format(IntEnum):
"""Format of a robot description."""
URDF = 0
MJCF = 1
@dataclass
class Description:
"""Metadata for a robot description.
Attributes:
formats: List of formats (URDF, MJCF) provided by the description.
"""
formats: Set[Format]
def __init__(self, single_format):
"""Initialize a description that provides a single format.
Args:
single_format: Format provided by the description.
"""
self.formats = {single_format}
@property
def has_mjcf(self) -> bool:
"""Check if description provides MJCF."""
return Format.MJCF in self.formats
@property
def has_urdf(self) -> bool:
"""Check if description provides URDF."""
return Format.URDF in self.formats
DESCRIPTIONS: Dict[str, Description] = {
"a1_description": Description(Format.URDF),
"a1_mj_description": Description(Format.MJCF),
"aliengo_description": Description(Format.URDF),
"aliengo_mj_description": Description(Format.MJCF),
"aloha_mj_description": Description(Format.MJCF),
"allegro_hand_description": Description(Format.URDF),
"allegro_hand_mj_description": Description(Format.MJCF),
"anymal_b_description": Description(Format.URDF),
"anymal_b_mj_description": Description(Format.MJCF),
"anymal_c_description": Description(Format.URDF),
"anymal_c_mj_description": Description(Format.MJCF),
"atlas_drc_description": Description(Format.URDF),
"atlas_v4_description": Description(Format.URDF),
"b1_description": Description(Format.URDF),
"b2_description": Description(Format.URDF),
"barrett_hand_description": Description(Format.URDF),
"baxter_description": Description(Format.URDF),
"berkeley_humanoid_description": Description(Format.URDF),
"bolt_description": Description(Format.URDF),
"cassie_description": Description(Format.URDF),
"cassie_mj_description": Description(Format.MJCF),
"cf2_description": Description(Format.URDF),
"cf2_mj_description": Description(Format.MJCF),
"double_pendulum_description": Description(Format.URDF),
"draco3_description": Description(Format.URDF),
"edo_description": Description(Format.URDF),
"ergocub_description": Description(Format.URDF),
"eve_r3_description": Description(Format.URDF),
"fanuc_m710ic_description": Description(Format.URDF),
"fetch_description": Description(Format.URDF),
"finger_edu_description": Description(Format.URDF),
"g1_mj_description": Description(Format.MJCF),
"gen2_description": Description(Format.URDF),
"gen3_description": Description(Format.URDF),
"gen3_mj_description": Description(Format.MJCF),
"ginger_description": Description(Format.URDF),
"go1_description": Description(Format.URDF),
"go1_mj_description": Description(Format.MJCF),
"g1_description": Description(Format.URDF),
"h1_description": Description(Format.URDF),
"h1_mj_description": Description(Format.MJCF),
"hyq_description": Description(Format.URDF),
"icub_description": Description(Format.URDF),
"iiwa7_description": Description(Format.URDF),
"iiwa14_description": Description(Format.URDF),
"iiwa14_mj_description": Description(Format.MJCF),
"jaxon_description": Description(Format.URDF),
"jvrc_description": Description(Format.URDF),
"jvrc_mj_description": Description(Format.MJCF),
"laikago_description": Description(Format.URDF),
"leap_hand_v1": Description(Format.URDF),
"leap_hand_mj_description": Description(Format.MJCF),
"mini_cheetah_description": Description(Format.URDF),
"minitaur_description": Description(Format.URDF),
"nextage_description": Description(Format.URDF),
"op3_mj_description": Description(Format.MJCF),
"panda_description": Description(Format.URDF),
"panda_mj_description": Description(Format.MJCF),
"pepper_description": Description(Format.URDF),
"poppy_ergo_jr_description": Description(Format.URDF),
"poppy_torso_description": Description(Format.URDF),
"pr2_description": Description(Format.URDF),
"r2_description": Description(Format.URDF),
"reachy_description": Description(Format.URDF),
"rhea_description": Description(Format.URDF),
"robotiq_2f85_description": Description(Format.URDF),
"robotiq_2f85_mj_description": Description(Format.MJCF),
"robotiq_2f85_v4_mj_description": Description(Format.MJCF),
"romeo_description": Description(Format.URDF),
"sawyer_mj_description": Description(Format.MJCF),
"shadow_hand_mj_description": Description(Format.MJCF),
"simple_humanoid_description": Description(Format.URDF),
"skydio_x2_description": Description(Format.URDF),
"skydio_x2_mj_description": Description(Format.MJCF),
"so_arm100": Description(Format.URDF),
"so_arm100_mj_description": Description(Format.MJCF),
"solo_description": Description(Format.URDF),
"spryped_description": Description(Format.URDF),
"stretch_description": Description(Format.URDF),
"stretch_mj_description": Description(Format.MJCF),
"talos_description": Description(Format.URDF),
"talos_mj_description": Description(Format.MJCF),
"tiago_description": Description(Format.URDF),
"trifinger_edu_description": Description(Format.URDF),
"upkie_description": Description(Format.URDF),
"ur10_description": Description(Format.URDF),
"ur10e_mj_description": Description(Format.MJCF),
"ur3_description": Description(Format.URDF),
"ur5_description": Description(Format.URDF),
"ur5e_mj_description": Description(Format.MJCF),
"valkyrie_description": Description(Format.URDF),
"viper_mj_description": Description(Format.MJCF),
"widow_mj_description": Description(Format.MJCF),
"xarm7_mj_description": Description(Format.MJCF),
"yumi_description": Description(Format.URDF),
"z1_description": Description(Format.URDF),
"z1_mj_description": Description(Format.MJCF),
}