![]() |
amino
1.0-beta2
Lightweight Robot Utility Library
|
A scene graph. More...
Public Member Functions | |
def | __init__ (self, ptr=None) |
def | __del__ (self) |
def | add_frame_fixed (self, parent, name, tf=QuatTrans.identity(), geom=None) |
Adds a new fixed frame to the scene. | |
def | add_frame_revolute (self, parent, name, tf=QuatTrans.identity(), config_name=None, axis=(0, 0, 1), offset=0, geom=None) |
Adds a new revolute frame to the scene. | |
def | add_frame_prismatic (self, parent, name, tf=QuatTrans.identity(), config_name=None, axis=(0, 0, 1), offset=0, geom=None, limits=None) |
Adds a new prismatic frame to the scene. | |
def | remove_frame (self, name) |
Removes a frame from the scene. | |
def | attach_geom (self, name, geom) |
Attaches geometry to the named frame. | |
def | reparent (self, new_parent, frame, rel_tf=QuatTrans.identity()) |
Change the parent of frame in the scenegraph. | |
def | load (self, filename, name, root="") |
Loads a scene plugin into this scene. More... | |
def | init (self) |
Initializes the scene, must be called after all frames are added. | |
def | allow_collision (self, i, j, allowed=1) |
Set allowed collisions between frames id0 and id1. | |
def | config_count (self) |
Number of configuration variables in the scene. | |
def | frame_count (self) |
Number of frames in the scene. | |
def | config_id (self, name) |
Returns the config id for string name. | |
def | frame_id (self, name) |
Returns the frame id for string name. | |
def | config_name (self, i) |
Returns the config name for the id. | |
def | frame_name (self, i) |
Returns the frame name for the id. More... | |
def | ensure_config_id (self, value) |
Ensures value is a config id, converting strings if necessary. More... | |
def | ensure_config_name (self, value) |
Ensures value is a string config name, converting int ids if necessary. More... | |
def | ensure_frame_id (self, value) |
Ensures value is a frame id, converting strings if necessary. More... | |
def | ensure_frame_id_actual (self, value) |
Ensures value is a frame id, converting strings if necessary. More... | |
def | ensure_frame_name (self, value) |
Ensures value is a string frame name, converting int ids if necessary. More... | |
def | config_vector (self, config, vector=None) |
Create or convert to a configuration vector. More... | |
def | copy_config (self, config) |
Copy configuration as a vector. | |
def | config_dict (self, vector) |
Convert vector to a dict. | |
def | get_parent (self, frame) |
Get the name of the parent of the input frame. | |
def | __getitem__ (self, key) |
Return a SubSceneGraph for the chain from root to tip. More... | |
def | copy (self) |
Create a copy of the scenegraph. | |
Static Public Attributes | |
restype | |
argtypes | |
A scene graph.
Definition at line 335 of file scenegraph.py.
def amino.scenegraph.SceneGraph.__getitem__ | ( | self, | |
key | |||
) |
Return a SubSceneGraph for the chain from root to tip.
key | a slice starting at the root and ending at the tip. |
LookupError | invalid slice or frames |
Definition at line 619 of file scenegraph.py.
def amino.scenegraph.SceneGraph.config_vector | ( | self, | |
config, | |||
vector = None |
|||
) |
Create or convert to a configuration vector.
IndexError | provided vector is the wrong size |
Definition at line 578 of file scenegraph.py.
def amino.scenegraph.SceneGraph.ensure_config_id | ( | self, | |
value | |||
) |
Ensures value is a config id, converting strings if necessary.
IndexError | value is out range. |
ValueError | config name is invalid. |
Definition at line 498 of file scenegraph.py.
def amino.scenegraph.SceneGraph.ensure_config_name | ( | self, | |
value | |||
) |
Ensures value is a string config name, converting int ids if necessary.
IndexError | value is out of range. |
ValueError | config name is invalid. |
Definition at line 514 of file scenegraph.py.
def amino.scenegraph.SceneGraph.ensure_frame_id | ( | self, | |
value | |||
) |
Ensures value is a frame id, converting strings if necessary.
IndexError | value is out range. |
ValueError | frame name is invalid. |
Definition at line 531 of file scenegraph.py.
def amino.scenegraph.SceneGraph.ensure_frame_id_actual | ( | self, | |
value | |||
) |
Ensures value is a frame id, converting strings if necessary.
The difference between this function and ensure_frame_id() is that this function throws errors if given reserved frame ids, FRAME_ROOT and FRAME_NONE.
IndexError | value is out range. |
Definition at line 551 of file scenegraph.py.
def amino.scenegraph.SceneGraph.ensure_frame_name | ( | self, | |
value | |||
) |
Ensures value is a string frame name, converting int ids if necessary.
IndexError | value is out of range. |
ValueError | frame name is invalid. |
Definition at line 563 of file scenegraph.py.
def amino.scenegraph.SceneGraph.frame_name | ( | self, | |
i | |||
) |
Returns the frame name for the id.
IndexError | value is out of range. |
Definition at line 485 of file scenegraph.py.
def amino.scenegraph.SceneGraph.load | ( | self, | |
filename, | |||
name, | |||
root = "" |
|||
) |
Loads a scene plugin into this scene.
filname | plugin name, passed directly to dlopen(). |
name | scene name, as provided to the scene compiler. |
root | parent frame for the loaded scene. |
LookupError | the shared object or named scene could not be found. |
Definition at line 435 of file scenegraph.py.