Table of Contents
Roomba Play Script
Executes the specified script.
Library
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
The Roomba Play Script block specifies a script to be played. A script consists of iRobot Roomba API commands and can be up to 100 bytes long. The first byte specifies the number of data bytes in the script. For example, to drive 400 cm and stop, the following script command is sent to Roomba:
13 137 1 44 128 0 156 1 144 137 0 0 0 0
where 13 is the number of data bytes in the script, 137 is the opcode of drive command, and 156 is the opcode of wait distance command. The rest of the bytes specifiy data bytes corresponding to different commands. For example, 1, 44, 128, and 0 define the velocity and radius bytes for the first drive command. Then, 1 and 144 define wait distance data bytes and the last four bytes define the data bytes for the last drive command. The following table specifies Roomba commands.
Source: iRobot Create Open Interface v.2 Manual |
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
Use System Timebase block in Normal simulation.
Input Ports
rmb
A reference to the Roomba stream (see Roomba Initialize block).
script
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
Parameters and Dialog Box
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 |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
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. |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.