the teambots environment tucker balch the borg lab georgia institute of technology

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

Upload: bryce-gibson

Post on 05-Jan-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

The TeamBots Environment

Tucker Balch

The Borg Lab

Georgia Institute of Technology

Page 2: 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

Page 3: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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)

Page 4: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

TeamBots Software Architecture: Design

API

Simulation Hardware

Robot Controller

Page 5: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 6: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 7: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 8: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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()

Page 9: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 10: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 11: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 12: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

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

Page 13: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

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

Page 14: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

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

Page 15: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

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

Page 16: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Nomad 150

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

Page 17: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Probotics’ Cye

Page 18: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 19: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Robot API Hierarchy: Design

Nomad150

Simple

Nomad150Comm

extends

extends

Nomad150HardNomad150Sim

implementsimplements

Nomad150CommSim Nomad150CommHard

implementsimplements

Page 20: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

{}

Page 21: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 22: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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();

Page 23: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 24: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Clay: Execution Hierarchy

Hardware/Simulation

Page 25: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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)

Page 26: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Move to Goal

Page 27: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Avoid Obstacle

Page 28: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Motor Schemas: Avoid Obstacle + Move to Goal

Page 29: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Example: Behaviors for Pushing

Page 30: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 31: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

Mobile Robot Programming10 May 2002

Tucker BalchGeorgia Institute of Technology

Methods of Composition

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

Page 32: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 33: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 34: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 35: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 36: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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

Page 37: The TeamBots Environment Tucker Balch The Borg Lab Georgia Institute of Technology

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