Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Isaac sim IsaacGymEnvs SimplePlotterTasks

From Leeroopedia
Knowledge Sources
Domains Visualization, Primitive_Drawing
Last Updated 2026-02-15 11:00 GMT

Overview

SimplePlotterTasks provides the primitive drawing task types (lines, dots, and trails) in both 2D and 3D variants for the poselib visualization framework.

Description

This module defines three abstract base drawing task classes -- DrawXDLines, DrawXDDots, and DrawXDTrail -- which encapsulate the data and rendering properties for line segments, dot markers, and motion trails respectively. Each base class inherits from BasePlotterTask and stores numpy arrays of geometric data along with visual properties such as color, line width or marker size, alpha transparency, and whether the data should influence the plot axis limits.

DrawXDLines stores an array of line segments with shape (N, 2, dim) where each line is defined by two endpoints. DrawXDDots stores an array of points with shape (N, dim). DrawXDTrail extends DrawXDDots by reinterpreting the marker size as line width, providing a trail visualization that connects sequential positions. All three base classes require subclasses to implement the dim property.

Six concrete subclasses provide the 2D and 3D specializations: Draw2DLines, Draw3DLines, Draw2DDots, Draw3DDots, Draw2DTrail, and Draw3DTrail. Each simply overrides the dim property to return either 2 or 3, and the base class validation logic ensures that the data arrays match the expected dimensionality. These primitives serve as the building blocks for more complex visualization tasks such as skeleton rendering.

Usage

Use these classes to create primitive drawing tasks for visualizing geometric data in the poselib plotting system. The 3D variants (Draw3DLines, Draw3DDots, Draw3DTrail) are the most commonly used, particularly as sub-tasks within skeleton visualization tasks. They can also be used standalone for plotting arbitrary line segments, point clouds, or motion trails in 3D space.

Code Reference

Source Location

Signature

class DrawXDLines(BasePlotterTask):
    def __init__(self, task_name: str, lines: np.ndarray, color: str = "blue",
                 line_width: int = 2, alpha: float = 1.0, influence_lim: bool = True) -> None: ...
    def update(self, lines): ...

class DrawXDDots(BasePlotterTask):
    def __init__(self, task_name: str, dots: np.ndarray, color: str = "blue",
                 marker_size: int = 10, alpha: float = 1.0, influence_lim: bool = True) -> None: ...
    def update(self, dots): ...

class DrawXDTrail(DrawXDDots):
    @property
    def line_width(self): ...

class Draw2DLines(DrawXDLines): ...
class Draw3DLines(DrawXDLines): ...
class Draw2DDots(DrawXDDots): ...
class Draw3DDots(DrawXDDots): ...
class Draw2DTrail(DrawXDTrail): ...
class Draw3DTrail(DrawXDTrail): ...

Import

from isaacgymenvs.tasks.amp.poselib.poselib.visualization.simple_plotter_tasks import Draw3DLines, Draw3DDots, Draw3DTrail

I/O Contract

Inputs

Name Type Required Description
task_name str Yes Unique identifier for the drawing task
lines np.ndarray Yes (for DrawXDLines) Array of line segments with shape (N, 2, dim) where dim is 2 or 3
dots np.ndarray Yes (for DrawXDDots/DrawXDTrail) Array of points with shape (N, dim) where dim is 2 or 3
color str No Color name for rendering (default: "blue")
line_width int No Width of line segments in pixels (default: 2)
marker_size int No Size of dot markers in pixels (default: 10)
alpha float No Transparency value from 0.0 to 1.0 (default: 1.0)
influence_lim bool No Whether data should affect axis limits (default: True)

Outputs

Name Type Description
raw_data np.ndarray The underlying lines or dots data array
color str The configured color string
line_width int The configured line width (lines and trails)
marker_size int The configured marker size (dots and trails)
alpha float The configured transparency value
influence_lim bool Whether this task influences plot limits
dim int The dimensionality (2 or 3) of the data

Usage Examples

import numpy as np
from isaacgymenvs.tasks.amp.poselib.poselib.visualization.simple_plotter_tasks import (
    Draw3DLines, Draw3DDots, Draw3DTrail
)

# Draw line segments connecting pairs of 3D points
lines_data = np.array([
    [[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]],
    [[1.0, 1.0, 1.0], [2.0, 0.0, 0.5]],
])
lines_task = Draw3DLines("bone_lines", lines_data, color="blue", line_width=3)

# Draw dot markers at 3D positions
dots_data = np.array([
    [0.0, 0.0, 0.0],
    [1.0, 1.0, 1.0],
    [2.0, 0.0, 0.5],
])
dots_task = Draw3DDots("joint_dots", dots_data, color="red", marker_size=8)

# Draw a motion trail from sequential positions
trail_positions = np.array([
    [0.0, 0.0, 0.0],
    [0.1, 0.05, 0.0],
    [0.2, 0.1, 0.0],
])
trail_task = Draw3DTrail("com_trail", trail_positions, color="black", marker_size=2)

# Update data dynamically
new_lines = np.array([
    [[0.0, 0.0, 0.0], [1.5, 1.5, 1.5]],
    [[1.5, 1.5, 1.5], [3.0, 0.0, 1.0]],
])
lines_task.update(new_lines)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment