Franka Arm playing Air Hockey -HockeyBot

Overview

My team and I developed a package in ROS2 (python) that allows a Franka Emika Panda arm to autonomously play air hockey by integrating perception (OpenCV) and motion planning for continously blocking and hitting the puck. An Intel RealSense D435i camera and computer vision was used to track the puck sliding on the air hockey table. The trajectory of the puck was predicted using the tracked positions of the puck,after sending the expected position to our SimpleMove API, which tells the arm to move to meet the puck. All of these tasks are integrated in a main node, this completes our workflow and allows the robot to play constantly.


SimpleMove API

The SimpleMove API is a ROS2 python package that is a motion planning interface capable of planning and executing of paths using the MoveIt! move group node. A service can be called to set a desired position and the API will plan the path of the Franka end effector, another service can be called to execution the motion depending on whether the given position is valid. It also had the ability to plan the trajectory in the cartesian plane and add collison objects in the environment.

Checkout this a github link to the helper package for further details.


Perception

The RealSense IR camera is used for this project to track the puck at 90 fps. OpenCV is implemented to detect circles within given range of radius and continuously collect the position of its center. To account for faulty values and noise while detecting the circle, a best fit line is calculated and values that are not within tolerance distance from the line are removed. Only the positions that are collected when the puck is moving halfway towards the robot are then sent for their trajectory calculation.


Trajectory Calculation

The positions from the RealSense is processed and the expected trajectory of the puck is calculated by applying simple straight line geometry. Given the parameters of the airhockey table the collision of the puck against the sides is considered by taking a its reflection abouth the angle of impact


Integration & Testing

Initial Sequence and Return Home:

The Franka arm follows a start up sequence when the program is started. It goes to a designated homepositions, graps the paddle and starts hitting the puck placed infront. It is also made to return to its home position everytime it moves to hit the puck. in case there is a position the arm can not reach in order to hit the puck, it remains in the home position to defend its goal.

Puck blocking and hitting:

The arm end effector moves to its desired goal position by following waypoints which mimic the trajectory of the incoming puck. By following this path, the end effector holding the paddle eventually encounters the puck hitting it back to its opponent.

My Teammates:

  • Ava Zahedi
  • Marthinius Nel
  • Hanyin Yuan

Know more about this project at this github link .