Search docs...
K

Technical Documentation: Navigation Screen

The Navigation Screen is the most complex component, integrating the MapView widget with ROS 2 Action Servers and navigation stacks.

navigation_init (Light Theme)navigation_init (Dark Theme)

Architecture

The Navigation module serves as the primary coordination layer between the user interface and the Nav2 (Navigation 2) stack running on the robot.

  • File Path: lib/screens/navigation_screen.dart
  • ROS Topics:
    • /map: Receives static environment data.
    • /goal_pose: Publishes the destination coordinate.
    • /initialpose: Publishes manual localization corrections.
    • /plan: Subscribes to the Nav2 global path.
    • /local_plan: Subscribes to local trajectory updates.

Interaction Logic

Map Tapping & Coordinate Transformation

The onTap logic converts screen coordinates (Pixels) into Map coordinates (Meters) using the map.info.resolution and map.info.origin.

navigation_send_goal_trigger (Light Theme)navigation_send_goal_trigger (Dark Theme)
navigation_after_send_goal (Light Theme)navigation_after_send_goal (Dark Theme)

Initial Pose Tools (Manual Localization)

Manual localization is performed via the /initialpose topic. The UI triggers a set of tools to publish the estimated coordinate and orientation.

navigation_localize_trigger (Light Theme)navigation_localize_trigger (Dark Theme)
navigation_after_localize (Light Theme)navigation_after_localize (Dark Theme)

Map Loading

The Navigation screen integrates with the CustomSidebar to allow real-time map switching. When a map is selected, the UI triggers a ROS-level map load service.

navigation_map_load (Light Theme)navigation_map_load (Dark Theme)
navigation_after_map_load (Light Theme)navigation_after_map_load (Dark Theme)

Device Trigger Interactions

Users can initiate direct device commands (triggers) which are passed through to the ROS backend for low-level hardware interaction.

navigation_device_trigger (Light Theme)navigation_device_trigger (Dark Theme)

State Management & Pose Persistence

The system tracks the robot's current pose by subscribing to the tf (Transform Tree) map -> base_link transform.

navigation_save_pose_trigger (Light Theme)navigation_save_pose_trigger (Dark Theme)
navigation_after_save_pose (Light Theme)navigation_after_save_pose (Dark Theme)

Safety Systems

  • Auto-Stop: Listens to the /estop topic; if triggered, the Navigation Screen visually locks and displays a critical warning overlay.
© 2026 Robotoai. All rights reserved.