Skip to content

simulo.Visual

Factory for creating visual markers.

Visual markers are non-physical visualization elements for debugging. They can be added to scenes and updated dynamically.

Example:

# Create an axes marker to show end-effector pose
ee_marker = simulo.Visual.axes(name="ee_pose", scale=0.1)
scene.add(ee_marker)
# Update each step
ee_marker.set_pose(position, quaternion)

Available marker types:

  • axes: XYZ coordinate axes (red=X, green=Y, blue=Z)
  • sphere: Sphere marker for points/targets
  • arrow: Directional arrow for forces/velocities
  • point: Simple point marker (lightweight)
class Visual
Visual.axes(
name: str,
scale: float = 0.1,
color: Optional[Color] = None,
num_instances: int = 1,
) -> AxesMarker

Create an XYZ coordinate axes marker.

Displays three colored arrows: X (red), Y (green), Z (blue).

Args:

  • name — Unique marker name
  • scale — Size of axes (arrow length)
  • color — Optional override color (default: RGB for XYZ)
  • num_instances — Number of instances for multi-env

Returns:

AxesMarker instance

Example:

marker = simulo.Visual.axes("ee_frame", scale=0.15)
scene.add(marker)
marker.set_pose(position, quaternion)
Visual.sphere(
name: str,
radius: float = 0.05,
color: Color = (1.0, 0.0, 0.0),
num_instances: int = 1,
) -> SphereMarker

Create a sphere marker.

Args:

  • name — Unique marker name
  • radius — Sphere radius in meters
  • color — RGB or RGBA color tuple
  • num_instances — Number of instances for multi-env

Returns:

SphereMarker instance

Example:

target = simulo.Visual.sphere("target", radius=0.03, color=(0, 1, 0))
scene.add(target)
target.set_pose(target_position)
Visual.arrow(
name: str,
length: float = 0.2,
radius: float = 0.01,
color: Color = (0.0, 1.0, 0.0),
num_instances: int = 1,
) -> ArrowMarker

Create a directional arrow marker.

Args:

  • name — Unique marker name
  • length — Arrow length in meters
  • radius — Arrow shaft radius
  • color — RGB or RGBA color tuple
  • num_instances — Number of instances for multi-env

Returns:

ArrowMarker instance

Example:

force_arrow = simulo.Visual.arrow("force", length=0.3, color=(1, 0, 0))
scene.add(force_arrow)
force_arrow.set_pose(position, direction_quat)
Visual.point(
name: str,
size: float = 0.02,
color: Color = (1.0, 1.0, 0.0),
num_instances: int = 1,
) -> PointMarker

Create a simple point marker.

Lightweight marker for visualizing many points.

Args:

  • name — Unique marker name
  • size — Point size
  • color — RGB or RGBA color tuple
  • num_instances — Number of instances for multi-env

Returns:

PointMarker instance

Example:

waypoints = simulo.Visual.point("waypoint", size=0.01, color=(1, 1, 0))
scene.add(waypoints)
waypoints.set_pose(positions) # Can be (N, 3) for multiple points