Giter Club home page Giter Club logo

gazebo_checkers's Introduction

gazebo_checkers

This repo contain the design of elements in gazebo to play checkers. This is part of a larger project (in development) where a robot arm play checkers agains a computer.

The repo contain clients that interact with the checkers in gazebo, as a way to provide the "computer movements"

How to use this package

  1. Include in the world "checkers_board" (check as example world/world_checkers.world). It can be placed in any position of the world.
  2. Launch in a node move_checkers.py (check as example launch/checkers_sim.launch)
  3. (optional) lauch rviz_board_publisher.py to place markers on the board and the checkers on rviz. Note: the update rate is slow..

move_checkers

This node is in encharge of

  1. Create the checkers for both players
  2. Put the checkers in initial position
  3. Allow interaction with the checkers trogh services

Note: this node is also a python package in catking_workspace, this mean its funcitons can be used in other python file (required import it)

The checker board is represented as a matrix where the rows are equibalent to the "y" direction (numbers) and the columns to the "x" direction (letters). Where the top right elements of the board match the top right elements of the matrix.

Each element of the matrix is a "Cell_info" objects that stores information about the position of the board's cell with respect the world frame and if there is a checker in that cell

Alt text

move_checkers services:

  1. 'checkers/computer_move/': move a piece from a position (from_row,from_col) to a position (to_row,to_column).
  2. 'checkers/remove_piece/': Remove a piece from gazebo. Piece is identified by its position on the board (from_row,from_col).
  3. 'checkers/become_king/': Tranform a piece to a king. Piece is identified by its position on the board (from_row,from_col)
  4. 'checkers/reset_game/': Restart board for a new game (respawn deleted pieces, delete kings, and place pieces in starting position)

Examples of clients are included in the scrip folder.

gazebo_checkers's People

Contributors

gbravoi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.