The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology.

Post on 05-Jan-2016

216 views 2 download

Tags:

Transcript of The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology.

The TeamBots Environment

Tucker Balch

The Borg Lab

Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Why TeamBots? Why “Environment?”

• Robotics researchers need more than a language, we need a flexible, manageable environment that provides:– Consistent APIs to robot hardware– Simulation– Communication– Graphical tools– Code reuse

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

What is TeamBots?

• TeamBots is a Java-based collection of applications and libraries designed to support robotics research:– TBSim: configurable simulation tool– TBHard: robot executive– RoboComm: communications package– Clay: library for programming behavior-based

controllers (maybe Clay is an architecture)

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

TeamBots Software Architecture: Design

API

Simulation Hardware

Robot Controller

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Java: The Good• Syntax supports layered control system configuration

(more on that later)• Rich set of libraries (threads, GUI tools,

communications)• Portable• Automated documentation• Hard to shoot yourself in the foot

– Strongly typed– Object oriented– No pointers

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Java: The Bad

• Religion & Hype• Java is slow• Timing is unpredictable due to GC• Work arounds:

– Speed:• Use JITs, native compilers

– GC• GC at regular intervals• 10% to 20% performance hit

er

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Example TeamBots Simulations

• RoboCup small size soccer• Nomad 150• Probotics Cye vehicle• Outdoor vehicles

API

Simulation

Robot Controller

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

How TBSim Works

1. Read in and parse description file:– Two types of objects

• Objects without control systems• Objects with control systems (robots)

2. For each object: object.init()3. For each control system: cs.init()4. While not done

– For each object: object.takeStep()– For each control system: cs.takeStep()

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

TBSim Implementation

simulated obstaclesimulated

robot hardware

Control Systems

Simulated World

simulated obstacle

simulated obstacle

simulated obstacle

Robot 1 Control System

simulated robot

hardware

Robot 2 Control System

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Description File Syntaxbounds –5 5 5 –5 // meters

timestep 100 // milliseconds

timeout 60000 // milliseconds

trials 10

graphics on

seed 993

windowsize 500 500 // pixels

object Obstacle 0 4 0 1 x0000FF x000000 4

robot Nomad150 forage 0 1 0 x000000 xFF0000 2

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

TeamBots Hardware Support• Nomad 150 (Balch & Arkin, Georgia Tech)• ISR Pebbles (Ram, Georgia Tech)• Probotics’ Cye (Balch & Veloso, CMU)• Amigobot (Luke, UMD)• RWI ATRV (Koenig & Balch, Georgia Tech)

API

Hardware

Robot Controller

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

TBHardjava TBHard Nomad150 forage desoto.cc.gatech.edu 3 600 0 0 0

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

• Balch, AI Magazine, 1997.• Balch, Autonomous Robots, 2000.

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

• Balch, AI Magazine, 1997.• Balch, Autonomous Robots, 2000.

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

• Balch, AI Magazine, 1997.• Balch, Autonomous Robots, 2000.

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

• Balch, AI Magazine, 1997.• Balch, Autonomous Robots, 2000.

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Probotics’ Cye

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

How Robot APIs are Defined

• Make use of Java features– Inheritance– Interfaces

API

Simulation Hardware

Robot Controller

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Robot API Hierarchy: Design

Nomad150

Simple

Nomad150Comm

extends

extends

Nomad150HardNomad150Sim

implementsimplements

Nomad150CommSim Nomad150CommHard

implementsimplements

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Robot API Hierarchy: Codepublic interface Nomad150Comm extends Nomad150, Transciever

{}

public class Nomad150CommSim extends Nomad150Sim implements Nomad150Comm, SimulatedObject

{}

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Inter-Robot Communication: RoboComm

• Simple API to TCP/IP– Unicast– Broadcast– Multicast

• Implemented in simulation and on mobile robots• Uses Java serialization for marshaling and

unmarshaling

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Inter-Robot Communication

t.unicast(2, new

stringMessage( "hello!"));

if (r.hasMoreElements())

new_message = r.getNextElement();

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Clay: An Architecture for Robot Control

• Uses features of Java syntax to embed perceptual processes within action and selection processes

• Allows specification of flexible hierarchies• Run time execution is efficient because only the

necessary portions of the configuration are executed

• Includes library of perceptual and motor schemas

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Clay: Execution Hierarchy

Hardware/Simulation

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Building Blocks: Motor Schemas

• Multiple independent processes each generate a vector combined by weighted summation

• Computationally simple and fast• Enables design by composition. (Arkin 1989)• Related to artificial potential fields

– Khatib (85), Krogh (84), Payton (89), Singh (98)

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Move to Goal

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Avoid Obstacle

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Avoid Obstacle + Move to Goal

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Example: Behaviors for Pushing

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Specification at Initialization Timedetect_home = new v_Goal_r(abstract_robot,0,0);

move_to_home = new v_Attraction_v(detect_home);

detect_obstacles = new va_Obstacles_r( abstract_robot);

avoid_obstacles = new v_Avoid_va(2.0, 1.0, detect_obstacles);

swirl_obstacles = new v_Swirl_va(2.0, 1.0, detect_obstacles, detect_goal);

detect_home

detect_obstacles

avoid_obstaclesswirl_obstaclesmove_to_home

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Methods of Composition

• Weighted sum• Winner take all• Perceptual sequencing• Learning

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Example: Combining by Weighted Sumavoid_n_swirl = new StaticWeightedSum_va();

avoid_n_swirl.embedded[0] = avoid_obstacles;

avoid_n_swirl.weights[0] = 0.5;

avoid_n_swirl.embedded[1]= swirl_obstacles;

avoid_n_swirl.weights[1] = 0.5;

avoid_n_swirl.embedded[2] = move_to_home;

avoid_n_swirl.weights[2] = 1.0;

steering_configuration = avoid_n_swirl;

detect_home

detect_obstacles

avoid_obstaclesswirl_obstaclesmove_to_home

avoid_n_swirl

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Communication as Sensingdetect_ball = new v_DetectRed_r(abstract_robot);

team_ball_obs = va_CommRed_r(abstract_robot);

ball_observations = v_Combine_vav(team_ball_obs, detect_ball);

fused_ball_obs = v_Fuse_va(ball_observations);

detect_ball team_ball_obs

ball_observations

fused_ball_observaions

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Comments on Clay/Java

• Nodes (schemas) are naturally embedded, combined and selected using Java syntax

• Java provides type checking at configuration time– For node configuration– For robot/control system matching

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Research & Education Using TeamBots• Robot formations (Balch & Hybinette)• Learning behaviors for soccer & foraging (Balch)• Cooperative observation and localization

(Stroupe & Balch)• Learning behaviors for herding (Potter, des

Jardins)• Pheromone-based behavior (Payton)• Robot soccer (Balch, Kitano)• Education: SoccerBots

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Obtaining TeamBots

• www.teambots.org• Free for non-commercial use• New release due June 1

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Summary

• TeamBots architecture leverages OO/Java features to provide:– Rapid prototyping in simulation

• Using well-defined API to robot hardware• Behavior specification using Clay (or not)

– Easy to use robot-robot communication– Tested control systems run directly on robots