-
Notifications
You must be signed in to change notification settings - Fork 0
Connect Four Demo
This demonstration allows Baxter to play Connect 4!
- Installation/Prerequisites
- Video
- Overview
- Tutorial
- Interfaces
- Related Examples/Tutorials
- Troubleshooting
Required:
- A Baxter Robot with a SDK software version >= 0.7.0
- A development PC setup with >= 0.7.0 software (development branch latest)
- A Connect 4 game board and pieces
- At least one Baxter Electric Gripper
- A game piece feeder (instructions for building below)
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 developmentRun catkin_make to build the new additions in your ROS workspace
$ cd ~/ros_ws/
$ ./baxter.sh
$ catkin_makeConnect 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 Baxter is currently not nearly this 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.
Verify that the robot is enabled from an RSDK terminal session, ex:
$ rosrun baxter_tools enable_robot.py -eThe shape (particularly the lips around the edges) of the Connect 4 game pieces required some modification of the gripper fingertips allowing Baxter to grasp the pieces solidly.
To do this, simply file down plastic fingertips allowing the parallel gripper to close solidly on the center of the piece.

During modification, test that the gripper has a solid grasp on the piece using the gripper_cuff_control example:
$ rosrun baxter_examples gripper_cuff_control.pyIt will be necessary to create a feeder which will provide Baxter with pieces for grasping in a static location.
80x20 was used to create a feeder which will backfill the pieces some static location -

The end of the extruded portion was bent, to stop the pieces from further rolling. Adding the rubber finger tip over this allowed for a gentle stop.

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]
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.
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).

