Roomba Wait Distance Roomba Wait Time navigation bar

Table of Contents

Roomba Wait Event

Waits until Roomba detects the specified event.

Library

QUARC Targets/Devices/Third-Party/iRobot/Roomba/Interfacing

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Devices/Third-Party/iRobot/Roomba/Interfacing')

Description

Roomba Wait Event

The Roomba Wait Event block causes the robot to wait until it detects the specified event. Roomba's state does not change, nor does it react to any inputs until the specified event is detected.

Roomba events are specified as follows:

Event name

Event number

Unsigned equivalent of inverse

Wheel Drop

1

255

Front Wheel Drop

2

254

Left Wheel Drop

3

253

Right Wheel Drop

4

252

Bump

5

251

Left Bump

6

250

Right Bump

7

249

Virtual Wall

8

248

Wall

9

247

Cliff

10

246

Left Cliff

11

245

Front Left Cliff

12

244

Front Right Cliff

13

243

Right Cliff

14

242

Home Base

15

241

Advance Button

16

240

Play Button

17

239

Digital Input 0

18

238

Digital Input 1

19

237

Digital Input 2

20

236

Digital Input 3

21

235

Roomba Mode = Passive

22

234

To wait for the inverse of an event, the negative of its number using two's complement notation is sent to Roomba. For example, to wait for no bumps, 251 (unsigned equivalent of -5) is sent to Roomba.

This command is available in Passive, Safe, or Full operating mode of Roomba (see Roomba Modes block). Execution of this command does not change current Roomba operating mode.

Important Notes

Note Use System Timebase block in Normal simulation.

Input Ports

rmb

A reference to the Roomba stream (see Roomba Initialize block).

Output Ports

rmb

A reference to the Roomba stream, which is the same as input Roomba stream reference. It helps creating a daisy chain of Roomba blocks.

err

This signal returns a negative value in case of memory allocation error or data communication error through Roomba serial port.

Parameters and Dialog Box

Roomba Wait Event

Event

Options for Roomba events are: Wheel Drop, Front Wheel Drop, Left Wheel Drop, Right Wheel Drop, Bump, Left Bump, Right Bump, Virtual Wall, Wall, Cliff, Left Cliff, Front Left Cliff, Front Right Cliff, Right Cliff, Home Base, Advance Button, Play Button, Digital Input, Digital Input, Digital Input, Digital Input, and OI Mode = Passive.

Inverse event

Check this option to specify inverse of the selected Roomba event.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time. A sample time of -1 indicates that the block inherits its sample time.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

Use System Timebase.

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar