Debug Drawing [omni.isaac.debug_draw]
Debug Drawing
This submodule provides bindings to draw debug lines and points
- Point Example:
drawn points to the screen with random colors and sizes
import random from omni.isaac.debug_draw import _debug_draw draw = _debug_draw.acquire_debug_draw_interface() N = 10000 point_list_1 = [ (random.uniform(-1000, 1000), random.uniform(-1000, 1000), random.uniform(-1000, 1000)) for _ in range(N) ] point_list_2 = [ (random.uniform(-1000, 1000), random.uniform(1000, 3000), random.uniform(-1000, 1000)) for _ in range(N) ] point_list_3 = [ (random.uniform(-1000, 1000), random.uniform(-3000, -1000), random.uniform(-1000, 1000)) for _ in range(N) ] colors = [(random.uniform(0.5, 1), random.uniform(0.5, 1), random.uniform(0.5, 1), 1) for _ in range(N)] sizes = [random.randint(1, 50) for _ in range(N)] draw.draw_points(point_list_1, [(1, 0, 0, 1)] * N, [10] * N) draw.draw_points(point_list_2, [(0, 1, 0, 1)] * N, [10] * N) draw.draw_points(point_list_3, colors, sizes)
- Line Example:
drawn lines to the screen with random colors and widths
import random from omni.isaac.debug_draw import _debug_draw draw = _debug_draw.acquire_debug_draw_interface() N = 10000 point_list_1 = [ (random.uniform(1000, 3000), random.uniform(-1000, 1000), random.uniform(-1000, 1000)) for _ in range(N) ] point_list_2 = [ (random.uniform(1000, 3000), random.uniform(-1000, 1000), random.uniform(-1000, 1000)) for _ in range(N) ] colors = [(random.uniform(0, 1), random.uniform(0, 1), random.uniform(0, 1), 1) for _ in range(N)] sizes = [random.randint(1, 25) for _ in range(N)] draw.draw_lines(point_list_1, point_list_2, colors, sizes)
- Spline Example:
drawn splines to the screen with random colors and widths
from omni.isaac.debug_draw import _debug_draw draw = _debug_draw.acquire_debug_draw_interface() point_list_1 = [ (random.uniform(-300, -100), random.uniform(-100, 100), random.uniform(-100, 100)) for _ in range(10) ] draw.draw_lines_spline(point_list_1, (1, 1, 1, 1), 10, False) point_list_2 = [ (random.uniform(-300, -100), random.uniform(-100, 100), random.uniform(-100, 100)) for _ in range(10) ] draw.draw_lines_spline(point_list_2, (1, 1, 1, 1), 5, True)
- class DebugDraw
Bases:
pybind11_builtins.pybind11_object
- clear_lines(self: omni.isaac.debug_draw._debug_draw.DebugDraw) None
Clear lines
- clear_points(self: omni.isaac.debug_draw._debug_draw.DebugDraw) None
Clear points
- draw_lines(self: omni.isaac.debug_draw._debug_draw.DebugDraw, arg0: List[carb._carb.Float3], arg1: List[carb._carb.Float3], arg2: List[carb._carb.ColorRgba], arg3: List[float]) None
Draw a set of lines to the screen
- draw_lines_spline(self: omni.isaac.debug_draw._debug_draw.DebugDraw, arg0: List[carb._carb.Float3], arg1: carb._carb.ColorRgba, arg2: float, arg3: bool) None
Draw spline between a list of points as line segments
- draw_points(self: omni.isaac.debug_draw._debug_draw.DebugDraw, arg0: List[carb._carb.Float3], arg1: List[carb._carb.ColorRgba], arg2: List[float]) None
Draw a set of points to the screen
- get_num_lines(self: omni.isaac.debug_draw._debug_draw.DebugDraw) int
Return the current number of lines being drawn
- get_num_points(self: omni.isaac.debug_draw._debug_draw.DebugDraw) int
Return the current number of points being drawn
- acquire_debug_draw_interface(plugin_name: str = None, library_path: str = None) omni.isaac.debug_draw._debug_draw.DebugDraw
- release_debug_draw_interface(arg0: omni.isaac.debug_draw._debug_draw.DebugDraw) None
Omnigraph Nodes
IsaacXPrimAxisVisualizer
[‘displays the x,y,z axis of an xPrim for visualization.’]
- Inputs
execIn (execution): The input execution port.
xPrim (target): Usd prim to visualize.
length (float): Length of the axis lines. Default to 1.
thickness (float): Thickness of the axis lines. Default to 1.
DebugDrawPointCloud
[‘Take a point cloud as input and display it in the scene.’]
- Inputs
exec (execution): The input execution port.
transform (matrixd[4]): The matrix to transform the points by.
dataPtr (uint64): Buffer of points containing point cloud data.
bufferSize (uint64): Size (in bytes) of the buffer (0 if the input is a texture).
color (colorf[4]): Color of points. Default to [0.75, 0.75, 1, 1].
size (float): Size of points. Default to 0.02.
doTransform (bool): Translate and Rotate point cloud by transform. Default to True.
testMode (bool): Act as Writer with no rendering.
IsaacXPrimRadiusVisualizer
[‘displays the Radius of the xPrim for visualization.’]
- Inputs
execIn (execution): The input execution port.
xPrim (target): Usd prim to visualize.
radius (float): Radius of the sphere. Default to 1.
thickness (float): Thickness of the radius lines. Default to 1.
segments (int): Number of segments in the circle. Default to 30.
drawXAxis (bool): True to draw the x axis circle. Default to True.
drawYAxis (bool): True to draw the y axis circle. Default to True.
drawZAxis (bool): True to draw the z axis circle. Default to True.
xAxisColor (colorf[4]): Color of the x axis sphere points. Default to [1, 0, 0, 1].
yAxisColor (colorf[4]): Color of the y axis sphere points. Default to [0, 1, 0, 1].
zAxisColor (colorf[4]): Color of the z axis sphere points. Default to [0, 0, 1, 1].