Skip to content

Connect Four Demo

Kyle Maroney edited this page Jan 15, 2014 · 40 revisions

Connect 4

Summary

This demonstration allows Baxter to play Connect 4!

Video

ScreenShot

Installation/Prerequisites

Required:

Check out the baxter_sandbox software (where Connect 4 demo is hosted) into your ROS workspace

    $ cd ~/ros_ws/src
    $ git clone https://github.com/RethinkRobotics/baxter_sandbox.git  

This demo requires the ability to specify the precision of joint position moves. This is availble in the development of the baxter_interface repository.

    $ cd ~/ros_ws/src/baxter_interface
    $ git checkout development

Run catkin_make to build the new additions in your ROS workspace

    $ cd ~/ros_ws/
    $ ./baxter.sh
    $ catkin_make

Overview

Connect Four is a two player turn based game where the objective is for a player to align four game pieces either horizontally, vertically or diagonally in the 7x6 game board. This demonstration was inspired by Victor Allis' Masters Thesis - A Knowledge-based Approach of Connect-Four (although currently not nearly as good!).
This demonstration exemplifies Baxter's SDK 0.7 software advances, including manipulation/accuracy improvements, as well as OpenCV usage for perception of the board state, and a minimax strategy implementation.

Video

Tutorial

Placeholder

Interfaces

ROS APIs

See the API Reference page for details.

  • Joint Position Commands - /robot/limb/<left/right>/joint_command
    [baxter_core_msgs/JointCommand]
  • Baxter Hand Cameras - /cameras/<left/right>_hand_camera/image
    [sensor_msgs/Image]

Related Examples/Tutorials

Troubleshooting

The arm is moving oddly/colliding with the board/table

It is possible that the IK solutions found may have resulted in an 'elbow down' configuration causing the motion between positions to be large causing the collision.

Restart the demo recording new goal points. Make sure that the arm is capable of reaching 5cm above the board across all positions while grabbing the robot in zero-g mode.

Baxter is not seeing the user moves

The vision portion of the program is not configured correctly.

Please verify that the ROI of the board (dragging the blue circles overlaid on the image to the corners of the game board), that the board slots line up with the projected image grid, and that the gain is set (sliding the gain slider) so that the pieces are identified on the red and yellow masks accurately (lighting dependent).

Clone this wiki locally