Scene Objects¶
Objects in a scene are represented by a triangluar mesh (a Trimesh from the trimesh package), a 3D pose relative to the world (a RigidTransform from autolab_core), and a set of material properties (MaterialProperties).
SceneObject¶
-
class
meshrender.
SceneObject
(mesh, T_obj_world=RigidTransform(rotation=[[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]], translation=[ 0. 0. 0.], from_frame=obj, to_frame=world), material=<meshrender.material.MaterialProperties object>, enabled=True)¶ Bases:
object
A complete description of an object in a Scene.
This includes its geometry (represented as a Trimesh), its pose in the world, and its material properties.
-
__init__
(mesh, T_obj_world=RigidTransform(rotation=[[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]], translation=[ 0. 0. 0.], from_frame=obj, to_frame=world), material=<meshrender.material.MaterialProperties object>, enabled=True)¶ Initialize a scene object with the given mesh, pose, and material.
Parameters: - mesh (trimesh.Trimesh) – A mesh representing the object’s geometry.
- T_obj_world (autolab_core.RigidTransform) – A rigid transformation from the object’s frame to the world frame.
- material (MaterialProperties) – A set of material properties for the object.
- enabled (bool) – If False, the object will not be rendered.
-
enabled
¶ bool – If False, the object will not be rendered.
-
mesh
¶ trimesh.Trimesh – A mesh representing the object’s geometry.
-
material
¶ MaterialProperties – A set of material properties for the object.
-
T_obj_world
¶ autolab_core.RigidTransform – A rigid transformation from the object’s frame to the world frame.
-
InstancedSceneObject¶
-
class
meshrender.
InstancedSceneObject
(mesh, poses, T_obj_world=RigidTransform(rotation=[[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]], translation=[ 0. 0. 0.], from_frame=obj, to_frame=world), material=<meshrender.material.MaterialProperties object>, enabled=True)¶ Bases:
meshrender.scene_object.SceneObject
A scene object which consists as a set of identical objects.
-
__init__
(mesh, poses, T_obj_world=RigidTransform(rotation=[[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]], translation=[ 0. 0. 0.], from_frame=obj, to_frame=world), material=<meshrender.material.MaterialProperties object>, enabled=True)¶ Initialize a scene object with the given mesh, pose, and material.
Parameters: - mesh (trimesh.Trimesh) – A mesh representing the object’s geometry.
- poses (list of autolab_core.RigidTransform) – A set of poses, one for each instance of the scene object, relative to the full object’s origin.
- T_obj_world (autolab_core.RigidTransform) – A rigid transformation from the object’s frame to the world frame.
- material (MaterialProperties) – A set of material properties for the object.
- enabled (bool) – If False, the object will not be rendered.
-
poses
¶ list of autolab_core.RigidTransform – A set of poses for each instance relative to the object’s origin.
-