iRobot%20Create%20Command%20Interface - PowerPoint PPT Presentation

About This Presentation
Title:

iRobot%20Create%20Command%20Interface

Description:

iRobot Create Command Interface – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 22
Provided by: robkr4
Category:

less

Transcript and Presenter's Notes

Title: iRobot%20Create%20Command%20Interface


1
iRobot Create Command Interface
  • CPSC 601.68/CPSC 599.68
  • Rob Kremer
  • Department of Computer Science
  • University of Calgary

2
Anatomy
3
Anatomy
Bump Sensors
4
Anatomy
5
Agent software support sensor tab
6
Agent software support sensor tab
7
Agent software support execute command
execute takes a string of bytes (in
decimal). Can also prefix a number with "s" to
make it parse it as two bytes (a short).
8
Modes
  • OFF
  • Unresponsive (except START (128))
  • Can charge
  • PASSIVE
  • Sensor status commands
  • No Actuator commands
  • Can charge
  • SAFE ? recommended!
  • Sensor status commands
  • Actuator commands
  • But reverts to PASSIVE if moving forward and any
    cliff sensor is activated any wheel drop sensor
    is activated or the charger is plugged in
  • No Charging
  • FULL
  • Sensor status commands
  • Actuator commands
  • No Charging

9
Modes
START (128)
OFF
PASSIVE
SAFE (131)
FULL (132)
START (128)
START (128)
SAFE (131)
FULL
SAFE
FULL (132)
10
Modes WAIT
  • A 5th Mode WAIT
  • When in WAIT mode the robot does not respond to
    ANY input.
  • Goes into WAIT mode for 3 commands (see WAIT
    slide)
  • WAIT-DISTANCE
  • WAIT-ANGLE
  • WAIT-TIME
  • WAIT-EVENT
  • If the robot is prevented, for some reason, from
    traveling the distance or the angle, it wont
    respond to anything (try the undocumented command
    7).
  • Use only in scripts, NOT RECOMMENDED

11
Actuators Drive
  • DRIVE (137 ltvelocityhighgt ltvelocitylowgt
    ltradiushighgt ltradiuslowgt)
  • 2 short (16 bit) parameters
  • Each represented by 2 bytes, high byte first (so
    a total of 5 bytes for this command)
  • Parameter 1 velocity in mm/sec
  • -500 to 500 (-ve means backwards)
  • Parameter 2 curve radius in mm
  • -2000 to 2000 where -ve means clockwise and ve
    means counterclockwise
  • 32768 means go straight
  • -1 and 1 mean spin in place clockwise,
    counterclockwise respectively

12
Actuators LEDs
  • LEDs (139 ltAdvPlaygt ltpowerColorgt ltpowerIntengt)
  • AdvPlay
  • Bit 1 (2) Play LED
  • Bit 3 (8) Advance LED
  • PowerColor (0-255)
  • 0green 255red
  • PowerIntensity (0-255)
  • 0off 255full intensity

13
Actuators Send IR
  • SEND-IR (151 ltIRbytegt)
  • Sends a byte using an add-on circuit and a IR LED
  • Can be received by the omnidirectional IR
    reciever at the front of the robot
  • Could be use to transmit short-distance
    identifiers for each robot
  • Does not replace CASA agent communication
    protocols!

14
Actuators Songs
  • Load a song
  • 140 ltsonggt ltlengthgt ltnotegt ltdurationgt
  • ltsonggt 0-15
  • ltlengthgt number of notes (1/2 of bytes) (up to
    16 notes)
  • ltnotegt see table in OI Manual
  • ltdurationgt in 1/64 second (31G_at_49.0Hz
    127G_at_12543.9Hz)
  • Play a song
  • 141 ltsonggt
  • Doesnt work if a song is already playing

15
Inputs Sensors
  • Read Sensors
  • 142 ltpacketIDgt
  • Packets 0-6 are packet groups (eg 0 is sensors
    7-26, which is 26 bytes some are two-byte
    returns)
  • Packets 7-42 are individual sensors
  • Either numerical values (1 or 2 bytes) or bitmaps
  • See OI Manual
  • Also a commands for
  • reading a list of sensors (149)
  • requesting a continuous stream of packet data
    (148)
  • pausing/resuming a stream (150)

16
Sensor Groups Packets
17
Sensor Single Packets
18
Scripts
  • Load a script
  • 152 ltlengthgt ltopcodegt
  • ltlengthgt number of bytes in script (up to 100)
  • ltopcodegt OI commands
  • Play a script
  • 143
  • No flow control except for WAIT commands (next
    slide)
  • Show script
  • 154
  • Returns the current script

19
Scripts Wait
  • Wait time
  • 155 lttimegt
  • lttimegt in 1/10 sec (resolution of 15ms)
  • Wait Distance
  • 156 ltdisthighgt ltdistlowgt
  • ltdistgt distance in mm. veforward, -veback
  • Works for passively rotating the wheels
  • Wait Angle
  • 157 ltanglehighgt ltanglelowgt
  • ltanglegt angle in deg. vecounterclockwise,
    -veclockwise
  • Wait Event
  • 158 lteventgt
  • lteventgt eg 1wheel drop (see table in OI
    Manual, p.16)
  • Use -ve for inverse of event (eg -1 wheel drop
    stops)

20
Tasks measuring
  • You can track the distance traveled by using
    sensor 19 (distance)
  • Angle with sensor 20 (angle)
  • Note reading these sensors causes them to be
    reset
  • Distance (angles) increment for forward
    (counterclockwise) and decrement for backward
    (clockwise)
  • Class iRobotCreates regular sensor reading keeps
    an accumulator for distance and angle

21
Tasks Following a wall
  • You can track along a wall using the wall sensor
    (sensor 8)
  • Use Drive straight (137 ltvelocitygt 32687) when
    the wall is there or a wide right curve (137
    ltvelocitygt -2000) when the wall goes away
  • You should expect the occasional right-bump
  • If you get a left-bumb, youve probably hit a
    corner
Write a Comment
User Comments (0)
About PowerShow.com