omegaliii / gomoku_robot

An AI-based robot that can play Gomoku with human players on a physical chessboard
https://gomokuee106a.wixsite.com/home
1 stars 1 forks source link

How to use this repo? #1

Open WwYyFan opened 5 years ago

WwYyFan commented 5 years ago

@omegaliii Hi,I'm new to ros,and If I want to implement it on my own 6DOFs Universal Robot, what should I modify?

omegaliii commented 5 years ago

Hi, I updated the README with detailed commands about how to run the project. Hope it will help.

To implement it on your own robot, I will suggest you take a look of the progresser.py under the /gomoku_controller/src. Basically, we use MoveIt which is a Motion Planning Framework of ROS to control our robot and you may want to replace it with your own controller.

WwYyFan commented 5 years ago

@omegaliii thanks for your reply and I found a few problems. 1.camera_srv.py and image_process.py don't have permission to run. use

chmod  a+x  camera_srv.py image_process.py

2.no module name gomoku_cv in camera_srv.py.

from gomoku_cv.srv ---> from gomoku_brain.srv

3.Modify abs_path to local address

4.Is there a requirement for the specifications of the chessboard?

look forward to your reply!!!

omegaliii commented 5 years ago

Thank for your advice. I updated the code and the instruction.

In terms of the chessboard, There were some pictures of the chessboard we used in our website under the computer vision part. We built the chessboard simply using a whiteboard and black tapes, so I believed something similar to our chessboard should be fine or please feel free to modify the computer vision algorithm to suit your own chessboard or maybe your own camera. We did spend lots of time to make our algorithm be stable for our own chessboard.

WwYyFan commented 5 years ago

The chessboard I use is a chessboard photo(15*19 1.5cm) printed on A4 paper.

ladpdgq9qc7hhg_na_dnavq_756_1008

But always return None

None
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
('erasing_list', [])
('drawing_list', [])
Press enter to capture an image:

None
None
('erasing_list', [])
('drawing_list', [])
Press enter to capture an image:
omegaliii commented 5 years ago

Probably improvement:

  1. Our chessboard was 10x10.
  2. Draw thicker lines.
  3. It could detect only green and red color now.
  4. The most important one: modify the computer vision algorithm to suit your own board and crema. The original algorithm worked well for our setting but not always for yours. Please feel free to visit our website for a better understanding of how the algorithm works.