Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions python/example_robot_data/robots_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,34 @@ class PR2Loader(RobotLoader):
ref_posture = "tuck_left_arm"


class HumanLoader(RobotLoader):
path = "human_description"
urdf_filename = "human.urdf"
free_flyer = True
ref_posture = "anatomical"
# Enforced, unchangeable free-flyer orientation (90° about X, and Y↔Z swap)
freeflyer_ori: np.ndarray = np.array(
[
[1, 0, 0],
[0, 0, -1],
[0, 1, 0],
]
)

def __init__(self, verbose: bool = False):
# call base loader
super().__init__(verbose=verbose)

# automatically apply the enforced free-flyer orientation
if self.free_flyer:
# get joint index
j_id = self.robot.model.getJointId("root_joint")
# assign enforced rotation
self.robot.model.jointPlacements[j_id].rotation = self.freeflyer_ori
# re-apply limits
self.addFreeFlyerJointLimits()


ROBOTS = {
"b1": B1Loader,
"bravo7_gripper": Bravo7GripperLoader,
Expand All @@ -750,6 +778,7 @@ class PR2Loader(RobotLoader):
"double_pendulum_simple": DoublePendulumSimpleLoader,
"hector": HectorLoader,
"hextilt": HextiltLoader,
"human": HumanLoader,
"hyq": HyQLoader,
"icub": ICubLoader,
"icub_reduced": ICubReducedLoader,
Expand Down
4 changes: 4 additions & 0 deletions robots/human_description/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Human model

source: original work by Gepetto Team members.
license: BSD-2-Clause.
Binary file added robots/human_description/meshes/abdomen_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/elbow_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/foot_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/hand_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/head_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/knee_mesh.STL
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added robots/human_description/meshes/neck_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/pelvis_mesh.STL
Binary file not shown.
Binary file not shown.
Binary file added robots/human_description/meshes/thight_mesh.STL
Binary file not shown.
Binary file added robots/human_description/meshes/torso_mesh.STL
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading