Skip to content

sim2bot.Robot.clear_markers

clear_markers() -> None

Remove every SDK-created debug marker from the current scene.

Returns:

  • None

    Robots, objects, cameras, and room elements are unaffected.

Raises:

  • RuntimeError

    If the client is not connected.

  • ConnectionClosed

    If the WebSocket closes while sending the command.

  • OSError

    If the selected transport cannot send the command.

Source code in sim2bot/client.py
def clear_markers(self) -> None:
    """Remove every SDK-created debug marker from the current scene.

    Returns:
        Robots, objects, cameras, and room elements are unaffected.

    Raises:
        RuntimeError: If the client is not connected.
        ConnectionClosed: If the WebSocket closes while sending the command.
        OSError: If the selected transport cannot send the command.
    """
    self._send({"type": "marker_clear"})

Practical examples

Examples use objects discovered from the current scene rather than hard-coded robot metadata.

Clear before a new plan

sim.clear_markers()
draw_new_plan(sim, plan)

Clean up after debugging

try:
    debug_controller(sim)
finally:
    sim.clear_markers()

Guidance

Usage tip

Clearing markers does not remove robots, objects, cameras, or room elements.


See also