Skip to content

sim2bot.Robot.delete_marker

delete_marker(marker_id: str) -> None

Remove one debug marker.

Parameters:

  • marker_id (str) –

    ID previously supplied to marker.

Returns:

  • None

    Deleting an unknown marker ID is harmless.

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 delete_marker(self, marker_id: str) -> None:
    """Remove one debug marker.

    Args:
        marker_id: ID previously supplied to
            [`marker`][sim2bot.client.Robot.marker].

    Returns:
        Deleting an unknown marker ID is harmless.

    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_delete", "id": marker_id})

Practical examples

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

Delete one target

sim.delete_marker("goal")

Replace a marker shape

sim.delete_marker("target")
sim.marker("target", "axes", position=[0.4, 0.0, 0.3])

Guidance

Common error

Deleting an unknown ID is harmless but does not clear other markers.


See also