Self-Balancing Robotic Arm

The goal of this project is to control the motion of a ping pong ball on a platform with two degrees of freedom using a Sawyer robotic arm. Specifically, this project employs camera vision and model predictive control (MPC) to accurately track and predict future ball position and velocity to control the ball. This is especially useful in single-point balancing, path-planning with obstacle avoidance, and path-tracking.

Hardware & Manufacturing

The project relied on a single webcam to track the ping-pong ball and a lightweight platform for ball balancing. This platform needed to attach seamlessly to the Sawyer arm for smooth movement.

We went through six iterations, each refining the design. The most significant change was shifting from wooden profiles to carbon fiber. This change resulted in a final platform that remained sturdy enough to prevent camera shake while staying lightweight.

ROS Architecture - 30 Hz

Computer Vision

The initial results regarding the computational time were:

  • ●Blur: 7.6e-4 s

    ●Threshold: 3.6e-4 s

    ●Grayscale: 7.1e-5 s

    ●Contour detection: 1.1e-4 s

    ●Circle estimation: 1.1e-5 s

    Total: 1.4e-3 s (-50% without blur)

To reduce the computational time, we implemented the following measures:

  • ●Getting rid of blur

    ●Low pass filter

    ● Fine-tune HSV threshold with shadow

    ●Add erosion + dilatation

Model Predictive Controls (MPC)

The team chose a Model Predictive Controller (MPC) for our robot's motion control, offering predictive capabilities for smoother movement. Due to limitations in the robot's strength, traditional controllers weren't effective. We opted for joint velocity control within the MPC, considering constraints to ensure effectiveness. Our simplified model focused on point-mass plate movement, lacking dynamics like friction. Simulations confirmed our MPC's performance in various scenarios, though steady-state error remained an issue. Integrating a state estimator in the control loop could address this.

Final Results