Week 10

Hello World!

We are now in week 10 of our project and we have some exciting new developments to show off!

In the previous post, you saw the details of the ‘Horseshoe’ prototype. This week we made a lot of progress on another board based game we were working on. The objective was to make Cozmo play ‘Tapatan’ with the player. You can read the rules by clicking here.

There were several challenges that emerged during the implementation of this idea:

1. The need for precise movement

The game required Cozmo to move autonomously between any two points on the 3 x 3 grid. We wanted to avoid adjusting Cozmo’s position manually during play. Thus, it became critical to ensure that Cozmo moves as precisely as possible during the course of a game session.

The SDK comes with an inbuilt method: cozmo.robot.Robot.go_to_pose() which should have made this task trivial. However, the movement through this method was pretty inconsistent and Cozmo would end up at a different location even in consecutive calls to the same Pose.

The solution we came up with was to assign a unique ID to each of the 9 points on the grid and then manually move Cozmo using the cozmo.robot.Robot.turn_in_place() and cozmo.robot.Robot.drive_straight() methods. This provides an elegant way to move between any two points using just three helper functions:

a. Move Horizontal
b. Move Vertical
c. Move Diagonal

The distance and direction is affected by certain parameters passed to these functions.

2. Creating a common play area

Another important aspect of the game was to have a common play area, so that the player’s attention is not completely diverted away from Cozmo. Initially we set up a board that Cozmo could drive around on. At the 9 node points of the grid, we placed a button that the player could press to select a cell within the grid. These were covered with a PlexiGlass sheet to provide a smooth surface for Cozmo to drive on. However, this solution was not too robust and the Makey Makey connections were a bit flaky leading to a frustrating player experience.

Therefore, we ditched this idea and moved to a more visual form of feedback. Using PyGame, we created a grid that would light up with different colors based on whether the player or Cozmo had a marker occupying a cell on the grid:

grid

3. Making the input seamless

Initially we were using the numpad of a keyboard to emulate the cells. Players would press a numpad key to place and move their markers. However, this didn’t feel too intuitive and so we switched to a mouse (cursor) based input instead.

TODO:

  • Our plan for next week is to set up a projector that can set up a common play area for Cozmo and the player to interact with each other.
  • Since we have the cursor functionality working, we will now try different controllers / devices to let the player interact with the grid.
  • We will also be improving Cozmo’s AI for the game and making him more emotive in between turns (let the trash talk begin!)

Here’s a video of our progress so far. Please keep in mind that is work in progress and we’ll have a more polished version of the game next week:

PLAYTEST

On Saturday, November  5, we participated in the ETC Playtest day. We had 9 prototypes on display that were launched through a sleek web interface as shown below:

Tapatan was also playable even though it wasn’t part of the interface. We have a few photos from the event below. We’ll be uploading a video with the highlights soon.

154815005315817971
729258293826228163

754092024041431703

772056758852000715

847564449283054456