Thanks to visit codestin.com
Credit goes to github.com

Skip to content

deushon/kiball

Repository files navigation

Ainex Paintball Robot Control Application

A Flutter application for controlling a paintball robot with keyboard input and real-time camera viewing.

Features

  • Keyboard Control:

    • W - Move forward
    • S - Move backward
    • A - Move left
    • D - Move right
    • Q - Rotate left
    • E - Rotate right
    • SHIFT - Move up
    • CTRL - Move down
    • F - Continuous shooting
    • G - Punch action
    • T - Get up (when robot falls)
    • R - Reset head position
  • Mouse Control:

    • Right mouse drag - Head pan/tilt control
    • Left mouse click - Single shot
  • Real-time Camera: Live video feed from robot camera

  • Robot Status Display: HP and armor indicators with visual feedback

  • Hit Effects: Red overlay effect when taking damage

  • Velocity Charts: Real-time display of linear and angular velocities

  • ROS Integration: WebSocket connection to ROS system

Installation

  1. Make sure you have Flutter installed
  2. Clone the repository
  3. Navigate to the project directory
  4. Run the following commands:
flutter pub get
flutter run

Configuration

  1. Edit the lib/assets/config.yaml file:

    • Set the robot's IP address
    • Configure ROS Bridge ports
    • Specify required ROS topics
  2. When starting the application, enter the ROS Bridge port (usually 9090)

Project Structure

lib/
├── main.dart                    # Main application file
├── main_page.dart              # Main page with robot control
├── globals.dart                # Global variables
├── ros_service.dart           # ROS service for WebSocket
├── assets/
│   ├── config.yaml            # Configuration file
│   └── AiNexCL.png            # Robot image
└── pages/
    ├── camera.dart            # Camera module
    └── keyboard_controller.dart  # Keyboard control module
└── widgets/
    └── crosshair_overlay.dart  # Crosshair overlay widget

Requirements

  • Flutter 3.0+
  • ROS with rosbridge_server
  • WebSocket connection to the robot
  • Robot with camera and control systems

Usage

  1. Start the application
  2. Select robot type from dropdown
  3. Enter ROS Bridge port
  4. Click START
  5. Use keyboard keys to control the robot
  6. Use mouse for head control and shooting
  7. Monitor robot status (HP/Armor) and camera feed

Game Features

  • Health System: Robot has HP (1000) and Armor (200)
  • Damage System: Taking hits reduces armor first, then HP
  • Death State: When HP reaches 0, robot locks and resets head position
  • Visual Feedback: Red overlay effect when taking damage
  • Reset Function: Restore full HP and armor

Dependencies

  • web_socket_channel: For WebSocket connection
  • yaml: For configuration file handling
  • fl_chart: For velocity charts display
  • flutter/material: For UI components

Controls Summary

Movement

  • WASD: Classic movement (W/S - Forward/Backward, A/D - Left/Right)
  • Q/E: Rotate Left/Right
  • SHIFT/CTRL: Up/Down movement

Actions

  • F: Hold for continuous shooting
  • G: Punch action
  • T: Get up when robot falls
  • R: Reset head position

Mouse

  • Right Mouse Drag: Head pan/tilt control
  • Left Mouse Click: Single shot

Technical Details

  • Real-time WebSocket communication with ROS
  • Compressed image streaming from robot camera
  • Velocity data visualization with charts
  • Responsive UI with status indicators
  • Cross-platform support (Web, Desktop, Mobile)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published