morse.builder.robots package¶
Submodules¶
morse.builder.robots.human module¶
-
class
Human
(filename='human_rig', name=None)[source]¶ Bases:
morse.builder.morsebuilder.GroundRobot
Append a human model to the scene.
Usage example:
#! /usr/bin/env morseexec from morse.builder import * human = Human() human.translate(x=5.5, y=-3.2, z=0.0) human.rotate(z=-3.0) human.skeleton.add_stream('pocolibs')
Currently, only one human per simulation is supported.
The MORSE human avatar is based on a 3D model generated from MakeHuman, and stored in human_rig.blend.
The model is rigged with an armature (human.skeleton), used to control the postures of the human and to deform accordingly the human mesh.
This armature is used by MORSE as both a sensor to read and export the human pose and an actuator to modify the pose.
TODO: give code examples to read and modify the pose
The armature defines 5 particular points (IK targets) that can be manipulated to control the human model in a simpler way: the head, the two wrists and the two feet.
-
IK_TARGETS
= ['head', 'wrist_L', 'wrist_R', 'foot_L', 'foot_R']¶
-
morse.builder.robots.morserobots module¶
morse.builder.robots.pr2 module¶
-
class
BarePR2
(name=None)[source]¶ Bases:
morse.builder.morsebuilder.GroundRobot
A PR2 model, without any sensor or actuator.
-
class
BasePR2
(name=None)[source]¶ Bases:
morse.builder.robots.pr2.BarePR2
A PR2 only equipped with its armatures for the arms, the torso and the head.
It also provides the compound sensor
pr2.joint_state
that exports the whole joint state of the robot.
Bases:
morse.builder.robots.pr2.BasePR2
A PR2 equipped with sensors and actuators required for 2D navigation.
Add a service and stream interface to the component
Its argument is the name of the interface to be used.