Jayinaksha / Robocon 2025

DD Robocon 2025/ IIT Patna/ Basketball

TeamPhoenix

Basketball, played by robots

Robocon 2025 was basketball, played by robots — two teams, two robots each. Our R1 attacks: it collects the ball, dribbles across and auto-aims from the 2- or 3-point zone with twin flywheels. R2 defends: it blocks shots, intercepts passes and recovers rebounds.

20+Engineers
2Robots, one base
3Sub-teams
2×350 WFlywheel motors
Practice court · week before nationals00:00.00
Both robots on the practice court.
§ 01

On the court

The team’s edited film first — then unedited footage from testing and the national arena.

The film · 1:58 · with soundchallenge → shooter → match day

R1 · flywheel shooter00:00.00
Two flywheels, a motorised angle stage, and a servo for trim.
Shot test · 3-point zone00:00.00
Shooting from the three-point zone.
DD Robocon 2025 · arena00:00.00
Match play at the national arena.
§ 02

Shot in simulation first

Before any aluminium was cut, the shooter’s CAD went into MuJoCo and took physics-simulated three-point shots. Twin flywheels on 350 W motors set ball speed and angle by RPM; a projectile model corrects for the robot’s own motion.

MuJoCo · shooter CAD00:00.00
§ 03

From thumbstick to flywheel

The manual control path. A gamepad on a laptop, ROS 2 in the middle, an ESP32 driving the omni base and the shooter.

Gamepadaxes + buttons joy_nodeROS 2 · /joy joy_serial_bridge"axes;buttons" ESP32parse · map · PWM 4 × drive motors 2 × flywheel Angle motor Trim servo USB serial · 115200
The wire formatone line per /joy message
# joy_serial_bridge → ESP32, newline-terminated
0.00,-0.82,0.00,0.15,1.00,1.00;0,0,1,0,0,0,0,0,0,0,0
#  └──────── axes ─────────┘ └────── buttons ──────┘

A protocol you can read in a serial monitor. When something misbehaves at the arena, minicom shows exactly what the robot was told.

Drive

Left stick → four-wheel drive: forward, back, strafe and turn.

Shoot

A button spins both flywheels; another axis moves the angle stage; servo buttons trim the shot.

§ 04

Auto-aim

How R1 scores without a human lining up the shot.

  1. 01

    Find the basket

    On the robot, an IMX219 camera and an ML detector on a Jetson Nano find the basket. The repo’s detector prototype does the same with a RealSense D455, which adds range.

    Detection/simple_hoop_detector.py · last.pt
  2. 02

    Set speed and angle

    Ball speed and launch angle come from flywheel RPM, so aiming is a motor command, not a mechanism change.

    arduino_codes/_shoot_with_auto
  3. 03

    Correct for motion

    A projectile model compensates for the robot’s own velocity, so it can shoot while the omni base is still moving.

    arduino_codes/Drive_with_auto
§ 06

What is in the repo

Run R1 yourself
# 1. flash arduino_codes/…ino to the ESP32 (115200 baud)
# 2. build the bridge
cd joy_serial_ws && colcon build --packages-select joy_serial_bridge
source install/setup.bash
# 3. gamepad in, serial out
ros2 run joy joy_node --ros-args -p deadzone:=0.0
ros2 run joy_serial_bridge joy_to_serial --ros-args -p dev:=/dev/ttyUSB0 -p baud:=115200
# watch what the robot is told
minicom -D /dev/ttyUSB0 -b 115200