Skip to content

A high-performance Webots robot controller and monitoring UI for KUKA youBot, built with Rust and Tauri. Features 8-directional Mecanum control and real-time sensor visualization via WebSockets.

Notifications You must be signed in to change notification settings

Mostafasaad1/Webots_Rust_tauri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webots Rust Tauri Control App

A high-performance application for controlling a KUKA youBot in Webots using a Rust-based controller and a Tauri-based web interface.

Features

  • 8-Directional Mecanum Control: Support for forward, backward, strafing, and diagonal movement.
  • Real-time Sensor Visualization:
    • Front Camera: Compressed JPEG stream with frame-skipping optimization.
    • 180° LiDAR: SICK sensor visualization with radial grid mapping.
  • High Performance:
    • WebSocket-based low-latency communication (Port 9001).
    • Throttled telemetry updates to minimize UI lag.
    • Deterministic frame skipping for camera feed.

Tech Stack

  • Webots: Robot simulation environment.
  • Rust: Controller logic and WebSocket server.
  • Tauri: Cross-platform desktop UI framework.
  • Tailwind CSS: Modern glassmorphism UI design.
  • Tokio / Tungstenite: Asynchronous WebSocket handling.

Project Structure

  • webots-controller/: Rust source for the Webots controller.
    • src/main.rs: Core logic for sensors and motors.
    • src/webots_api.rs: FFI bindings for Webots C API.
  • ui/: Frontend application.
    • index.html: Main UI with sensor visualization and control logic.
  • worlds/: Webots world files.
    • youbot_control.wbt: Configured world with KUKA youBot.

Getting Started

  1. Open Webots: Load the world file in worlds/youbot_control.wbt.
  2. Build Controller: Run cargo build in webots-controller/.
  3. Run UI: Launch the Tauri application or open ui/index.html (if using a local dev server).
  4. Control: Use WASD or the UI buttons to move the robot.

Optimization Details

  • Camera: Images are converted from BGRA to RGB, then encoded as JPEG (quality 30) on the Rust side to reduce network payload by ~90%.
  • LiDAR: Points are processed and sent as a float array, rendered on a high-performance 2D canvas.
  • UI: CSS backdrop-filter was removed to ensure smooth rendering even on lower-end hardware.

About

A high-performance Webots robot controller and monitoring UI for KUKA youBot, built with Rust and Tauri. Features 8-directional Mecanum control and real-time sensor visualization via WebSockets.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published