Opening The Session—Open - Omron Pioneer LX User Manual

Omron adept mobile robots platforms for research, education and development
Table of Contents

Advertisement

Table of Contents
The response to the last synchronization packet, SYNC2, also includes robot identifying information as
three NULL-terminated character strings: robot name, robot class or type, and robot subclass or subtype.
For the Pioneer LX, the class is always "MTX" and the subclass is "marc_devel" in early versions of the
robot, or "pioneer-lx" in later versions. Clients use these identifying strings to configure their own
operating parameters. ARIA, for instance, uses the Subclass to identify the robot subtype and load the
Aria/params
matching parameter file found in the
directory (e.g. for subclass "pioneer-lx" ARIA loads
"pioneer-lx.p"), followed by a custom robot parameter file corresponding to the name, if one exists (e.g.
for name "myrobot", ARIA would load "myrobot.p", overriding parameters from "pioneer-lx.p" and its
built-in defaults).
Opening the session—OPEN
Once it's established a connection, the client should send the OPEN command #1 (250, 251, 3, 1, 0, 1,
which causes the controller to begin transmitting information to the client.
When first connected, the motion commands are disabled. Depending on the robot, motor power may be
disabled, and mechanical or electric brakes may be engaged. To enable the motors and release brakes,
send the ENABLE command #4 with an integer argument of one. Send ENABLE with an argument of
zero to disable motors.
Keeping the Beat—PULSE
A safety watchdog expects that, once connected, it receives at least one command packet from the client
program every WatchDog seconds, as defined in the controller's built-in parameters. (default is 2
seconds). Otherwise, it assumes the client-server connection is broken and stops the robot. Use the
PULSE command (0) to prevent the watchdog process from disstopping the robot anif no commands are
otherwise being sent.
Some clients—ARIA-based ones, for instance—use the good practice of sending a PULSE client command
#0 (250, 251, 3, 0, 0, 0) just after OPEN. And if your client application will be otherwise distracted for
some time, have it periodically issue the PULSE command to let your robot server know that your client
is indeed alive and well. It has no other effect.
If the robot shuts down due to lack of communication with the client, it will revive upon receipt of a
client command and automatically accelerate to the last-specified speed and heading.
Closing the connection—CLOSE
To close the client-server connection, which automatically disables the motors and other server functions,
simply issue the CLOSE command #2. Most of the controller's operating parameters return to their
configured default values upon disconnection with the client.
ARIA automatically uses OPEN and CLOSE at start and end of session, and will send a PULSE command
on every SIP cycle if there are no other pending commands to send.
2.7 CONFIG Packet and CONFIG command
Send the CONFIG command #18 without an argument to have MARC send back a CONFIG packet type
32 (0x20) containing the robot's current operational parameters. Use the CONFIG packet to examine
many of your robot's default settings and their working values, where appropriate, as changed by other
client commands, such as SetV and RotKV.
The information in this packet is automatically used by ARIA internally, and is also made available
through interface classes, such as ArRobot and ArRobotConfigPacketReader.
Page 128 of 134

Advertisement

Table of Contents
loading

Table of Contents