f110_planning.render_callbacks package

Submodules

f110_planning.render_callbacks.camera module

Camera tracking render callback for following the ego vehicle.

f110_planning.render_callbacks.camera.create_camera_tracking(rotate: bool = True) Callable[[EnvRenderer], None]

Factory for an ego-centric camera tracking callback.

The camera will center on the ego vehicle (index 0). If rotation is enabled, the world will rotate around the car such that the car’s heading is always directed “Up” (North) on the screen.

Scaling: Uses the standard 50.0 pixels-per-meter scale.

f110_planning.render_callbacks.dynamic_waypoint module

Render callback for visualizing the dynamic waypoint

f110_planning.render_callbacks.dynamic_waypoint.create_dynamic_waypoint_renderer(planner: Any, agent_idx: int = 0) Callable[[EnvRenderer], None]

Factory to visualize the planner’s internal target waypoint.

This renderer extracts ‘last_target_point’ from the planner instance, ensuring that the visual magenta point matches the exactly computed adaptive lookahead point used in the steering logic.

f110_planning.render_callbacks.lidar module

LiDAR visualization and analysis utilities for the F1TENTH simulation.

f110_planning.render_callbacks.lidar.create_heading_error_renderer(waypoints: ndarray, agent_idx: int = 0) Callable[[EnvRenderer], None]

Factory to create a heading error rendering callback.

Parameters:
  • waypoints – Array of waypoints [N, 2] or [N, 3+] with x, y coordinates

  • agent_idx – Index of the agent to display heading error for

f110_planning.render_callbacks.lidar.render_lidar(env_renderer: EnvRenderer) None

Render LIDAR point cloud rays.

Draws lines from the car center to detected obstacles. Closer hits are rendered in red, while farther ones fade to blue.

Note: The world-to-pixel scale is 50.0.

f110_planning.render_callbacks.lidar.render_side_distances(env_renderer: EnvRenderer) None

Render the left and right side distances on the screen.

f110_planning.render_callbacks.trace module

Render callback for visualizing the trajectory trace of an agent.

f110_planning.render_callbacks.trace.create_cloud_call_renderer(planner, agent_idx: int = 0, max_points: int = 5000, color: tuple[int, int, int] = (255, 140, 0), radius: float = 3.0) Callable[[EnvRenderer], None]

Render callback that highlights steps where a cloud call was issued.

The renderer examines planner.last_cloud_call on each frame. When True it appends an orange circle at the agent’s current position. This paints a deep-orange dot (larger than the normal trace) for each step the scheduler decided to contact the cloud. The tracer history is capped at max_points to avoid unbounded memory growth.

f110_planning.render_callbacks.trace.create_trace_renderer(agent_idx: int = 0, max_points: int = 5000, color: tuple[int, int, int] = (255, 255, 0)) Callable[[EnvRenderer], None]

Factory to create a trajectory trace rendering callback.

Parameters:
  • agent_idx – Index of the agent to trace.

  • max_points – Maximum number of points to keep in the trace.

  • color – RGB tuple for the trace points.

f110_planning.render_callbacks.waypoints module

Render callback for visualizing waypoints in the simulation.

f110_planning.render_callbacks.waypoints.create_waypoint_renderer(waypoints: ndarray, color: tuple[int, int, int] | tuple[int, int, int, int] = (183, 193, 222), name: str = 'waypoint_shapes') Callable[[EnvRenderer], None]

Factory to create a waypoint rendering callback.

Parameters:
  • waypoints – np.ndarray of shape (N, 2+) where waypoints[:, 0:2] are x, y.

  • color – tuple of (r, g, b) or (r, g, b, a)

  • name – unique name to store the shapes on the renderer object

Module contents

Render callbacks for the F1TENTH simulation.

f110_planning.render_callbacks.create_camera_tracking(rotate: bool = True) Callable[[EnvRenderer], None]

Factory for an ego-centric camera tracking callback.

The camera will center on the ego vehicle (index 0). If rotation is enabled, the world will rotate around the car such that the car’s heading is always directed “Up” (North) on the screen.

Scaling: Uses the standard 50.0 pixels-per-meter scale.

f110_planning.render_callbacks.create_cloud_call_renderer(planner, agent_idx: int = 0, max_points: int = 5000, color: tuple[int, int, int] = (255, 140, 0), radius: float = 3.0) Callable[[EnvRenderer], None]

Render callback that highlights steps where a cloud call was issued.

The renderer examines planner.last_cloud_call on each frame. When True it appends an orange circle at the agent’s current position. This paints a deep-orange dot (larger than the normal trace) for each step the scheduler decided to contact the cloud. The tracer history is capped at max_points to avoid unbounded memory growth.

f110_planning.render_callbacks.create_dynamic_waypoint_renderer(planner: Any, agent_idx: int = 0) Callable[[EnvRenderer], None]

Factory to visualize the planner’s internal target waypoint.

This renderer extracts ‘last_target_point’ from the planner instance, ensuring that the visual magenta point matches the exactly computed adaptive lookahead point used in the steering logic.

f110_planning.render_callbacks.create_heading_error_renderer(waypoints: ndarray, agent_idx: int = 0) Callable[[EnvRenderer], None]

Factory to create a heading error rendering callback.

Parameters:
  • waypoints – Array of waypoints [N, 2] or [N, 3+] with x, y coordinates

  • agent_idx – Index of the agent to display heading error for

f110_planning.render_callbacks.create_trace_renderer(agent_idx: int = 0, max_points: int = 5000, color: tuple[int, int, int] = (255, 255, 0)) Callable[[EnvRenderer], None]

Factory to create a trajectory trace rendering callback.

Parameters:
  • agent_idx – Index of the agent to trace.

  • max_points – Maximum number of points to keep in the trace.

  • color – RGB tuple for the trace points.

f110_planning.render_callbacks.create_waypoint_renderer(waypoints: ndarray, color: tuple[int, int, int] | tuple[int, int, int, int] = (183, 193, 222), name: str = 'waypoint_shapes') Callable[[EnvRenderer], None]

Factory to create a waypoint rendering callback.

Parameters:
  • waypoints – np.ndarray of shape (N, 2+) where waypoints[:, 0:2] are x, y.

  • color – tuple of (r, g, b) or (r, g, b, a)

  • name – unique name to store the shapes on the renderer object

f110_planning.render_callbacks.render_lidar(env_renderer: EnvRenderer) None

Render LIDAR point cloud rays.

Draws lines from the car center to detected obstacles. Closer hits are rendered in red, while farther ones fade to blue.

Note: The world-to-pixel scale is 50.0.

f110_planning.render_callbacks.render_side_distances(env_renderer: EnvRenderer) None

Render the left and right side distances on the screen.