This project ultimately evolved from a lofty goal of having a robot holding a tennis racket and infinitely bouncing a ball, to a more practical objective of having the robot appropriately tilt and manipulate a board (with handles) in order to bounce a ball in a simplified Gazebo environment.
Many of the challenges we initially faced were related to the environment setup - it was difficult to properly create the Gazebo objects with the desired properties, and get the robot to robustly pick up the board.
Once we overcame this initial hurdle, we focused our efforts on the perception, planning, and control. With the aid of the Kinect sensors, we were able to track the ball's centroid location using both image triangulation and point cloud methods.
We then realized that we needed our ball tracking to be both robust to noise, and that we need to infer the velocity of the ball's trajectory. Thus, we implemented a Kalman Filter from scratch, which ended up to be an essential and successful piece of the pipeline.
A lot of thought went into the planning phase as well; given our sensing information, we needed to determine what an effective, but practical, control strategy would be. Our physics inference node was designed to accomplish this; using projectile motion physics and rotational geometry, we determined what an optimal board tilt would be to return the ball to a central, more manageable location.
The information derived from the physics inference then went into our controller node. For simplicity, and because our robot's movement would ultimately need to be small, we opted to use open-loop control. However, we added additional complexities to our control strategy to ensure the movements were steady and smooth. For instance, we implemented a low-pass filter to induce steadier joint movements, and also developed a strategy to simultaneously tilt the arms.
We also had to make several simplifications along the way. For instance, we reduced the environment's gravity to make computation more feasible, and also configured the board so that it was unaffected by gravity, resulting in it being easier to manipulate. Our control strategy was also simplified so that the robot would only tilt the board along one axis at a time, making our physics inference and control simpler to implement.
This was an awesome project and it was interesting to apply the theoretical knowledge that we learned throughout the semester. After the completion of our project, we realized that there is still a lot of room for growth. The following are some things that we would improve on if we had more time.
We would like to make our control more robust and sophisticated - one avenue of this could be closed loop control, such as PID control.
Another particularly interesting avenue could be optimal control - it would be interesting to investigate how this problem could be formulated in a way such that bouncing the ball as long as possible corresponds to an objective function which the robot tries to maximize. A similar formulation could also lend itself to a reinforcement learning approach to this task.
We would like to remove some of the simplifications we made in our setup, in particular the reduction of gravity. This would result in a more realistic setup, and we hope to test this project in an actual Baxter robot (outside of simulation) if given the chance.
We also strive to have the Baxter be able to actually manipulate a tennis racket and bounce a tennis ball, and perhaps progress to tasks such as hitting the ball repeatedly against a wall.