The Robotics Primer Workbook
Developed by  USC, iRobot® and Microsoft® Robotics Studio
Categories: Exercise | Player Exercise

Group:Exercise4-Herding

Contents

Introduction

This exercise uses two groups of robots. One is controlled using Aggregation (see above) while the other gets the robots to move toward some goal by herding the other bunch. This exercise will use a flock of robots to herd another flock of robots toward a goal. We will accomplish this by having the even numbered clients behave a certain way, and odd number clients behave another way.


Stage Revised

In this exercise, a different testing arena will be used in stage. Rather than a square room, a more rectangular room will be used:

Image:Blank-room.png

Save the above file as rectangle-room.png

# Desc: Stage demo with lots of models. Works with everything.cfg. 
# the size of a pixel in Stage's underlying raytrace model in meters
resolution     0.02

interval_sim 100  # milliseconds per update step
interval_real 100 # real-time milliseconds per update step

# defines Pioneer-like robots
include "pioneer.inc"

# defines 'map' object used for floorplans
include "map.inc"

# defines the laser model `sick_laser' configured like a Sick LMS-200
include "sick.inc"

size [40 40 ]
 
gui_disable 0
gui_interval 100
gui_menu_interval 20

window( 
  size [ 800 800.000 ] 
  center [0 0 ] 
  scale 0.025 
)

map( 
  bitmap "blank-room.png" 
  map_resolution 0.02
  size [35 35] 
  name "hospital"
)

# extend the pioneer2dx definition from pioneer.inc
#
define trickedoutpioneer pioneer2dx
(
  sick_laser(  
    pose [0.030 0.000 0.000 ]
    fiducialfinder( range_max 8 range_max_id 5 fov 360) 
 
    ptz(
      blobfinder( 
        channel_count 6 
        channels [ "red" "blue" "green" "cyan" "yellow" "magenta" ]  
      )
    )
  )
 
  fiducial_return 1
  gripper_return 0
 
  localization "gps"
  localization_origin [ 0 0 0 ]
 
  bumper( bcount 3  
      	   blength 0.2
          bpose[0] [0 -0.165  90]
          bpose[1] [0  0.165 -90] 
          bpose[2] [-0.26  0 0] 
  
 	  blength[2] 0.1 # set the length of a single bumper
        )
)
 
 
trickedoutpioneer ( name "robot1" pose [ 0 0 0 ] color "blue" fiducial_return 2)
trickedoutpioneer ( name "robot2" pose [ 0 -2 0 ] )
trickedoutpioneer ( name "robot3" pose [ 0 -3 0 ] )
trickedoutpioneer ( name "robot4" pose [ 0 -4 0 ] )
trickedoutpioneer ( name "robot5" pose [ 3 3 0 ] )

Save the above file as herd.world

# Desc: Player sample configuration file for controlling Stage devices

driver
(		
  name "stage"
  provides ["simulation:0"]
  plugin "libstageplugin"
  worldfile "herd.world"	
)

driver( name "stage" provides ["map:0" ] model "hospital" )


# robot 0
driver( name "stage"  provides [ "position2d:0" "fiducial:0" "sonar:0" "ptz:0" "blobfinder:0" "graphics2d:0"  "bumper:0" ]  model "robot1" )

# robot 1-4
driver(  name "stage" provides [ "position2d:1" "fiducial:1" "sonar:1" "ptz:1" "blobfinder:1" "graphics2d:1" "bumper:1" ]  model "robot2" ) 
driver(  name "stage" provides [ "position2d:2" "fiducial:2" "sonar:2" "ptz:2" "blobfinder:2" "graphics2d:2" "bumper:2" ]  model "robot3" )
driver(  name "stage" provides [ "position2d:3" "fiducial:3" "sonar:3" "ptz:3" "blobfinder:3" "graphics2d:3" "bumper:3" ]  model "robot4" )
driver(  name "stage" provides [ "position2d:4" "fiducial:4" "sonar:4" "ptz:4" "blobfinder:4" "graphics2d:4" "bumper:4" ]  model "robot5" )


Save the above file as herd.cfg

Aggregate Controller

This herd will largely behave the same as in the first exercise, which used the following rules for behavior:

1. If you can see no blobs, turn to the right.
2. If a blob is to the left of the screen, turn left, move forward.
3. If a blob is to the right of the screen, turn right, move forward.

with an additional rule:

4. Maintain distance from other robots

Herding Controller

Image:Herding-sim.jpg

Here are some suggested rules for a herding controller:

1. Position robot so that the aggregate herd is between it and the goal
2. Move toward goal

Retrieved from "http://roboticsprimer.sourceforge.net/workbook/Group:Exercise4-Herding"

This page has been accessed 1,004 times. This page was last modified 09:10, 22 October 2007. Content is available under GNU Free Documentation License 1.2.


Browse
Main Page
Glossary
Sections
Prerequisites
Introduction
Robot Components
Locomotion
Sensors
Feedback Control
Deliberative Control
Reactive Control
Hybrid Control
Behavior-based Control
Emergent Behavior
Navigation
Group Robotics
Learning


Log in / create account