Skip to content

Latest commit

 

History

History

README.md

scripts — Autonomous Delivery, Waypoint Navigation & Web Dashboard

This directory contains standalone Python navigation orchestrators, delivery dispatchers, initialization scripts, and the Autonomous Robot Ready & Delivery Web Dashboard.


📁 Directory Structure

scripts/
├── web_dashboard.py                    # Autonomous Robot Ready & Delivery Web Dashboard (Flask + ROS 2)
├── navigate_to.py                      # CLI argument-based navigation runner
├── initialise.py                       # Delayed AMCL initial pose setter
├── go_to_home.py                       # Navigates to home origin (0.0, 0.0)
├── go_to_rack_r4_a3.py                 # Position 1: Rack R4 A3 (Aisle 3 / Row 4 / Rack 1)
├── go_to_rack_r4_a2.py                 # Position 2: Rack R4 A2 (Aisle 2 / Row 4 / Rack 1)
├── go_to_rack_r3_b3.py                 # Position 3: Rack R3 B3 (Aisle B3 / Row 3 / Rack 1)
├── go_to_waypoint_alpha.py             # Waypoint Alpha (Central Aisle)
├── go_to_waypoint_beta.py              # Waypoint Beta (East Corridor)
├── go_to_ne_corner.py                  # North-East Corner (Top-Right)
└── go_to_se_corner.py                  # South-East Corner (Bottom-Right)

🌐 Delivery Web Dashboard (web_dashboard.py)

A full-stack operator dashboard running at http://localhost:5000:

  1. Live Camera Feed: Real-time MJPEG stream of /camera/image_raw with active frame rendering.
  2. Interactive 2D Facility Map:
    • Renders Simulation/maps/New_map.pgm with meter-to-pixel coordinate transforms.
    • Plots current robot pose from AMCL, plus target pins for all 4 corners, waypoints, and racks.
  3. Robot & Gimbal Teleop Controls:
    • Virtual directional joystick driving the robot base via /diff_cont/cmd_vel_unstamped.
    • Pan (Yaw: 0° to 180°) and Tilt (Pitch: 0° to 90°) sliders publishing directly to /camera_base_cylinder/cmd_pos and /camera_cylinder_sphere/cmd_pos.
  4. Autonomous Dispatch Grid:
    • One-click buttons to send the robot to any predefined delivery destination or home.
  5. Real-Time Status & Delivery History Log:
    • In-transit broadcast: "Going to <Position Name>"
    • Arrival broadcast: "Reached <Position Name> - Delivered"
    • Home transit: "Going to Home Position""Home Position Reached"
    • Tracks delivery timestamps, destination, and completion status.

Launching the Delivery Web Dashboard

source ~/WareOps/install/setup.bash
python3 scripts/web_dashboard.py

(Or launch the complete system including Gazebo, Nav2, teleop, and dashboard via ros2 launch wareops_system_launch robot_webcontroller.launch.py)


📍 Target Positions & Coordinates

Target ID Location Name Location String X ($m$) Y ($m$) Yaw ($rad$) Dedicated Script
position_1 Position 1 (Rack R4 A3) Aisle_3/Row_4/Rack_1 1.922 -2.745 0.051 go_to_rack_r4_a3.py
position_2 Position 2 (Rack R4 A2) Aisle_2/Row_4/Rack_1 3.658 -2.684 0.044 go_to_rack_r4_a2.py
position_3 Position 3 (Rack R3 B3) Aisle_B3/Row_3/Rack_1 2.981 -2.825 3.097 go_to_rack_r3_b3.py
waypoint_alpha Waypoint Alpha Waypoint_Alpha 0.613 -2.945 0.067 go_to_waypoint_alpha.py
waypoint_beta Waypoint Beta Waypoint_Beta 7.692 -2.926 3.139 go_to_waypoint_beta.py
ne_corner North-East Corner NE_Corner 7.500 4.800 -2.356 go_to_ne_corner.py
se_corner South-East Corner SE_Corner 7.500 -4.800 2.356 go_to_se_corner.py
home Home Position / Origin Origin 0.000 0.000 3.141 go_to_home.py

⌨️ CLI Navigation Tool (navigate_to.py)

Dispatch the robot from the command line using the --target flag:

# Navigate to Position 1
python3 scripts/navigate_to.py --target position_1

# Navigate to NE Corner
python3 scripts/navigate_to.py --target ne_corner

# Return Home
python3 scripts/navigate_to.py --target home

📡 Published & Subscribed ROS 2 Topics

Topic Message Type Purpose
/delivery_status std_msgs/msg/String Broadcasts transit events (Going to ..., Reached ... - Delivered)
/delivered std_msgs/msg/String Signals "delivered" payload for downstream integration
/bot_status std_msgs/msg/String Inter-node coordination status
/diff_cont/cmd_vel_unstamped geometry_msgs/msg/Twist Virtual joystick base movement
/camera_base_cylinder/cmd_pos std_msgs/msg/Float64 Camera gimbal pan (Yaw)
/camera_cylinder_sphere/cmd_pos std_msgs/msg/Float64 Camera gimbal tilt (Pitch)
/initialpose geometry_msgs/msg/PoseWithCovarianceStamped Initial AMCL localization seed pose