scene_synthesizer.utils
Classes
|
|
|
|
|
Sample positions on a 2D plane uniformly within a disk of radius r and center |
|
|
|
Gaussian 2D position sampler |
|
|
|
|
|
|
|
|
|
Functions
Helper function that returns arguments for add_object(..). |
|
|
Add extents to trimesh scene or individual mesh. |
|
Add file_path and file_name properties to trimesh scene or individual mesh. |
|
Add a new node (and edge) to the scene graph. |
|
Adjust the brightness and transparency of a color. |
|
Concatenate multiple scene objects into one scene. |
|
Return the center of mass of a selection of nodes in a scene. |
Helper function to get a dictionary of all object transformations in a collision manager. |
|
Helper function to set all transformations in a collision manager. |
|
|
Helper function to transform all objects of a collision manager. |
|
Return a trimesh collision manager for a trimesh scene, with a pre-multiplied transform for all objects. |
|
Convert cadquery object into Trimesh. |
|
Create torus mesh. |
|
This function builds a trimesh scene from a yourdfpy model. |
|
Generator function to cycle infinitely through a fixed order of elements. |
|
Return center-of-masses for each geom_type_etry based on a single desired joint CoM. |
|
Helper function to update the scene graph by running forward kinematics on all edges specified through joint_names. |
|
Calculate mass properties of trimesh geometry; even if not watertight. |
|
Generate a random 8-character file name that won't exist in the provided directory. |
|
|
|
|
|
Returns a watertight version of a trimesh geometry. |
Return a hash value for the metadata of trimesh.Geometry |
|
|
Inverse homogeneous matrix. |
|
Invalidate cache of scene's graph. |
|
Unofficial check whether a string is a regular expression, based on special characters (except '/' which is used for namespacing in scene_synthesizer). |
|
Helper to bind exceptions to function calls, e.g. when an import fails but import is only used for specific functionality. |
Helper function that returns arguments for add_object(..). |
|
|
|
|
Takes a trimesh scene and bakes all scale information contained in the transform tree into the vertices of all meshes. |
|
|
|
|
|
Generator that yields random homogeneous transformations that represent stable poses of an asset. |
Generator that yields homogeneous transformations that are randomly rotated around the z axis. |
|
|
Return a random RGB color using datatype specified. |
|
|
Helper function that returns arguments for add_object(..). |
|
|
Use rejection sampling to generate random points inside a polygon. |
|
Uniformly distributed directions on S2. |
|
Use rejection sampling to produce points randomly distributed in the volume of a mesh. |
|
Return a copy of the trimesh scene, with meshes and scene transforms scaled to the requested factor. |
|
Select a sublist of a given list, using a query. |
|
Return string s in snake_case. |
|
A generator that randomly returns supports. |