MCPcopy Create free account
hub / github.com/BerkeleyAutomation/meshrender / add_object

Method add_object

meshrender/scene.py:95–108  ·  view source on GitHub ↗

Adds an object to the scene. Parameters ---------- name : str An identifier for the object. obj : SceneObject A SceneObject representing the object, including its pose and material properties.

(self, name, obj)

Source from the content-addressed store, hash-verified

93 self._camera = camera
94
95 def add_object(self, name, obj):
96 """Adds an object to the scene.
97
98 Parameters
99 ----------
100 name : str
101 An identifier for the object.
102 obj : SceneObject
103 A SceneObject representing the object, including its pose and material properties.
104 """
105 if not isinstance(obj, SceneObject):
106 raise ValueError('obj must be an object of type SceneObject')
107 self._objects[name] = obj
108 self.close_renderer()
109
110 def remove_object(self, name):
111 """Removes an object from the scene.

Callers 1

test_viewer.pyFile · 0.80

Calls 1

close_rendererMethod · 0.95

Tested by

no test coverage detected