0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ruby Player - client library for the Player (operation system for robots) in pure Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 0.9
~> 2.7
>= 0

Runtime

~> 0.0.4
 Project Readme

The RubyPlayer is a client library for the Player (operation system for robots) in pure Ruby. Build Status

Why?

The Player project distributes bindings of client libraries for Ruby and Python but I think that this project has several reasons to be:

  1. Pure implementation doesn't require C\C++ libraries of Player, SWIG and compilator. You can use it on any platform with installed Ruby.
  2. In contrast to standard bindings Ruby Player is spreaded as gem and you can use it with Bundle, RVM and others tools which we all are loving.
  3. Standard bindings doesn't use the expression of Ruby. Calls of function in C style without blocks, hashes and exceptions.

Install

gem install ruby-player

Example

  require 'ruby-player'
  Player::Client.connect("localhost") do |robot|
    pos2d = robot.position2d(1)
    ranger = robot.ranger
    pos2d.set_speed(vx: 1, vy: 0, va: 0.2)
    #main loop
    robot.loop do
      puts "Position: x=%{px}, y=%{py}, a=%{pa}" % pos2d.state
      puts "Rangers: #{ranger.collect(&:range)}"
    end
  end

API coverage

The list of support objects and devices of Player.

  • Client object
  • ActArray
  • AIO
  • BlobFinder
  • Gripper
  • Position2d
  • Power
  • Ranger

Requirements

  • Ruby 1.9.2 or later
  • Player 3.1.0 or later
  • For examples Stage 4.1.0 or later

References

Home page

API

Player project

C API Player

Authors

Aleksey Timin atimin@gmail.com