Obstacles#
- class Box#
A box collision object.
- x: float#
Width of the box.
- y: float#
Depth of the box.
- z: float#
Height of the box.
- __init__(x: float, y: float, z: float)#
Construct a box of size x, y, z along the respective axis, corresponding to the width, depth, height of the box.
- class Capsule#
A capsule collision object.
- radius: float#
Radius of the capsule.
- length: float#
Length of the capsule.
- __init__(radius: float, length: float)#
Construct a capsule with the given radius and length. As a side note, a capsule is computationally efficient for collision checking.
- class Convex#
A convex mesh collision object.
- property bounding_box_minimum: List[float]#
The minimum position of the axis-aligned bounding box.
- property bounding_box_maximum: List[float]#
The maximum position of the axis-aligned bounding box.
- load_from_file(path: Path, scale: float = None)#
Loads a mesh from a *.obj or *.stl file from the given path, and returns the convex hull of the mesh. If no scale is given, we automatically estimate the scale of the mesh to match base SI units e.g.
[m]
.
- reference_studio_file(path: Path, scale: float = None)#
Create a reference to a mesh file with the given filename already uploaded to a Studio project. This is helpful to visualize objects dynamically using Studio Live.
- class Cylinder#
A cylinder collision object.
- radius: float#
Radius of the cylinder.
- length: float#
Length of the cylinder.
- __init__(radius: float, length: float)#
Construct a cylinder with the given radius and length.
- class HeightField#
A height field or depth map collision object.
- class Matrix#
Type alias for
List[List[float]]
.
- x: float#
Size along the x-axis.
- y: float#
Size along the xyaxis.
- class Sphere#
A sphere collision object.
- radius: float#
Radius of the sphere.
- __init__(radius: float)#
Construct a sphere with the given radius.
- class Obstacle#
An environment obstacle.
- class Object#
Type alias for
Box | Capsule | Convex | Cylinder | HeightField | Sphere
.
- name: str#
The name of the obstacle.
- color: str#
The hex-string representation of the obstacle’s color, without the leading #.
- for_visual: bool = True#
Whether this obstacle is used for visual checking.
- for_collision: bool = True#
Whether this obstacle is used for collision checking.
- safety_margin: float = 0.0#
An additional obstacle-specific safety margin.