Setting up the Pioneer LX Mobile Base and running the demos

The Pioneer LX is an advanced mobile robotics research platform based on the Omron Adept LD industrial mobile robot (previously Adept Lynx).

With my earlier experience with ROSARIA on Pioneer 3DX, getting started was easy. I had no issues setting up ROSARIA as directed by the tutorials and ensuring the ROS node on the embedded computer could communicate with the ROS master on my computer. I was soon controlling the Pioneer LX with the Robot Steering plugin in rqt.

The Robot steering plugin can be located under the Plugins > Robot Tools > Robot Steering. The topic being published on would need to be changed to /RosAria/cmd_vel

Carefully increase the speed or adjust the limits of the slider, as the base is quite fast.

 

Running the demos

As suggested by the manual, I decided to try out the demo programs.

cd /usr/local/Aria/examples
./demo

It automatically started in teleop mode, but did not respond to commands from the joystick I attached. It could turn and reverse in a jerky motion, but not move forward.

Pressing “?” to show the menu made me realize I had missed the info that sped past as the demo was initialized. The robot’s refusal to move was because of objects in its field of view. By setting it to the unguarded teleop mode (pressing “u”) and reducing the speed to the barest minimum, I was able to get it running from the joystick.

Menu:

You can switch to other modes with these keys:
teleop mode: 't' or 'T'
unguarded teleop mode: 'u' or 'U'
wander mode: 'w' or 'W'
laser mode: 'l' or 'L'
bumps mode: 'b' or 'B'
sonar mode: 's' or 'S'
position mode: 'p' or 'P'
camera mode: 'c' or 'C'
command mode: 'd' or 'D'
report robot config mode: 'o' or 'O'
detailed status/error flags mode: 'f' or 'F'
io mode: 'i' or 'I'
tcm2 mode: 'm' or 'M'
acts mode: 'a' or 'A'
You are in 'teleop' mode currently.

Teleop mode will drive under your joystick or keyboard control.
It will not allow you to drive into obstacles it can see,
though if you are presistent you may be able to run into something.
For joystick, hold in the trigger button and then move the joystick to drive.
For keyboard control these are the keys and their actions:
up arrow: speed up if forward or no motion, slow down if going backwards
down arrow: slow down if going forwards, speed up if backward or no motion
left arrow: turn left
right arrow: turn right
space bar: stop
e: (re)enable motors

Although the base was working with ROS and the first demo was executed successfully, the ARNL server demo did not work. It ran for a short period and terminated.

username@robot:/usr/local/Arnl/examples$ ./arnlServer
Added arguments from file '/etc/Aria.args'
Connnecting to robot using TCP connection to localhost:8101...
Could not connect to simulator, connecting to robot through serial port /dev/ttyUSB0.
Syncing 0
Syncing 1
Syncing 2
Connected to robot.
Name: Adept Lynx
Type: MTX
Subtype: pioneer-lx-ld
ArConfig: Config version: 2.0
Loaded robot parameters from /usr/local/Arnl/params/pioneer-lx-ld.p
Robot Serial Number: 1
ArRobot: setLatVelMax of 1800 is over the absolute max of 0, capping it
ArRobot: setLatAccel of 500 is over the absolute max of 0, capping it
ArRobot: setLatDecel of 600 is over the absolute max of 0, capping it
ArRobotConnector: Connecting to MTX batteries (if neccesary)...
MTXBattery::getSystemInfo() No response to get system info - resending
Ignoring battery info from the microcontroller
MTXBattery Basic Info - Charge Estimate is 98.7
MTXBattery Basic Info - Current Draw is 1.06
MTXBattery Basic Info - Pack Voltage is 27.541
MTXBattery Basic Info - Status Flags 0x5029
MTXBattery Basic Info - Error Flags 0x00
MTXBattery: Connection successful
ArRobotConnector: Connecting to MTX sonar (if neccesary)...
MTXSonar1::queryFirmwareVersion() Invalid response from sonar to get version (0x1 0x3)
MTXSonar1::queryFirmwareVersion() Invalid response from sonar to get version (0x1 0x0)
Added arguments from file '/etc/Aria.args'
tim3XX_2: Setting absolute max range to 4000
tim3XX_2::setMaxRange: Tried to set the max range to 20000 which is above the absoluteMaxRange on the device of 4000, capping it
ArLaserConnector: Using robot params for connecting to laser 1 (S3Series_1)
ArLaserConnector: Using robot params for connecting to laser 2 (tim3XX_2)
Connecting to laser(s) configured in parameters...
Controller Firmware: INFO: LEGACY Command called, cmd = 62.
MTXBattery: Connected with no errors
Controller Firmware: INFO: LEGACY Command called, cmd = 31.
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1: Monitoring data is available (0x00 0x00)
S3Series_1: Protocol version (0x02 0x01)
S3Series_1: Connected to laser
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::receivePacket() myConn->read error (length)
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::SafetyDecommissionWarning: Laser reports zone 0, last sent 401 mSecAgo
S3Series_1::safetyZone took too long (402 msecs) in thread S3Series_1
tim3XX_2: Will use serial connection /dev/ttyUSB7 at 115200 baud.
tim3XX_2: Opening connection...
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
tim3XX_2: Connecting to laser...
tim3XX_2::timConnect() Sending (STOP) sEN LMDscandata
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::SafetyDecommissionWarning: Laser reports zone 0, last sent 111 mSecAgo
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::SafetyDecommissionWarning: Laser reports zone 0, last sent 127 mSecAgo
S3Series_1::SafetyDecommissionWarning: Robot speed 0 mm/sec (in cycle)
S3Series_1::SafetyDecommissionWarning: Laser reports zone 0, last sent 112 mSecAgo
tim3XX_2::timConnect() Sending (Only one Telegram) sRN LMDscandata
tim3XX_2::timConnect: Waiting for response...
S3Series_1::receivePacket() myConn->read error (protocol version?)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (status flag?)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (data block number)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (telegram number)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (time stamp)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
tim3XX_2::timConnect() Timout waiting for initial packet from TiM - failing connect
tim3XX_2::blockingConnect() Could not connect to laser.
S3Series_1::receivePacket() myConn->read error (data block number)
S3Series_1::safetyZone took too long (239 msecs) in thread S3Series_1
ArLaserConnector::connectLasers: Could not connect tim3XX_2, stopping
Error: Could not connect to laser(s). Exiting.
Disconnecting from robot.
S3Series_1: Disconnecting
MTXSonar1: Disconnecting
MTXBattery: Disconnecting
username@robot:/usr/local/Arnl/examples$

It appeared one of the lasers was not connected.

This was verified by starting the demo and tapping “l” to go into laser mode. Although the S3Series_1 laser worked, the tim3XX_2 laser failed after I tapped 2 to switch to it.

You are in 'laser' mode currently.

Laser mode connects to a laser, or uses a previously established connection.
Laser mode then displays the closest and furthest reading from the laser.
'z' or 'Z':  toggle between far reading and middle reading with reflectivity
1:  S3Series_1
2:  tim3XX_2
Close:      681mm -59.1 deg   Far:     6429mm  25.9 deg         471 readings   S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
Close:      681mm -59.1 deg   Far:     6419mm  25.9 deg         471 readings   S3Series_1::receivePacket() myConn->read error (time stamp)
Close:      681mm -59.1 deg   Far:     6429mm  25.9 deg         470 readings   S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
Close:      690mm -59.5 deg   Far:     6429mm  25.9 deg         469 readings   S3Series_1::receivePacket() myConn->read error (protocol version?)
Close:      671mm -58.8 deg   Far:     6429mm  25.9 deg         470 readings   S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
Close:      681mm -59.1 deg   Far:     6419mm  25.9 deg         469 readings   S3Series_1::receivePacket() myConn->read error (coordination flag and device code)
Close:      681mm -59.1 deg   Far:     6419mm  25.9 deg         470 readings   S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
Close:      681mm -59.1 deg   Far:     6429mm  25.9 deg         469 readings   S3Series_1::receivePacket() myConn->read error (data block number)

....

Switching to laser tim3XX_2

ArModeLaser already connecting to tim3XX_2.
S3Series_1::receivePacket() myConn->read error (length)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (length)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1
S3Series_1::receivePacket() myConn->read error (time stamp)
S3Series_1::safetyZone took too long (240 msecs) in thread S3Series_1

On contacting an Adept engineer, I was directed to confirm that the connections to the AUX Sensors port on the pioneer’s core was secure. The core can be found under the top plate. I was also instructed to try to turn it on by running mtxPowerStatic -footLaser on from /usr/local/Aria/examples/.

username@robot:/usr/local/Aria/examples$ mtxPowerStatic -footLaser on
Added arguments from file '/etc/Aria.args'
ArMTXIO::ArMTXIO: open /dev/mtx failed.  Disabling class (errno 2) | ErrorFromOSNum: 2 ErrorFromOSString: No such file or directory
mtxPower: Error opening MTX IO device interface. Is driver loaded and device file created?

Running modprobe mtx returned

modprobe: FATAL: Module mtx not found in directory /lib/modules/4.13.0-36-generic

That narrowed the issue down to a driver problem. This may have been caused by the fact that my linux kernel version (check at uname -a) was greater than version 4.8.0 – the version for which the driver was compiled.

Downloading and reinstalling the driver like shown here, in addition to rerunning mtxPowerStatic -footLaser on, solved the problem. Now the ARNL server could start up.

If you are running ROSARIA or rosarnl, then you may have experienced errors like these:

username@robot:~$ rosrun rosaria RosAria _publish_aria_lasers:=True
...
ArLaserConnector::connectLasers: Could not connect tim3XX_2, stopping
[FATAL] [1521320028.980402338]: rosaria: Error connecting to laser(s)...
[FATAL] [1521320028.980524125]: RosAria: ROS node setup failed... 

or

username@robot:~$rosrun rosarnl rosarnl_node
...
[ WARN] [1521319888.310446804]: ARNL: ArLaserConnector::connectLasers: Could not connect tim3XX_2, stopping
[ WARN] [1521319888.310809900]: ARNL: Error: Could not connect to laser(s). Exiting.
[FATAL] [1521319888.311077619]: rosarnl_node: ARNL and ARIA setup failed...
[ WARN] [1521319888.311531651]: ARNL: MTXSonar1::turnOffTransducers() turning OFF transducers
[ WARN] [1521319888.311856556]: ARNL: Disconnecting from robot

In both cases, running mtxPowerStatic -footlaser on should solve that.

If you have already installed the driver, or successfully ran the laser and and these errors show up, first run sudo modprobe mtx to load the driver/module then mtxPowerStatic -footlaser on to power it up. If that works, you may want to confirm if mtx is automatically loaded on startup.

To do that run sudo nano /etc/modules-load.d/modules.conf

It should have mtx in it. If it doesn’t, add mtx to a new line.

Also, instead of downloading the driver, I believe I could have compiled the files located at /usr/local/mtxIODriver-amr-2017-05-25/, as the version numbers were the equal.

With the the server running, I proceeded to run MobileEyes and create a map of the lab, following the ARNL tutorial (Sign-in required. Use your Mobile robots registration info.) [Alternative link (No Sign-in required)].

lidarMap
Using the generated map in MobileEyes

Although you can run MobileEyes remotely, the map would be created on the robot’s embedded computer. So you would have to process the raw .2D scans into a map on it, using the local Mapper3 installation.

After creating your map, you will need to set that as the map on MobileEyes. This can be done at Tools > Robot Configuration > Parameter Priority: Advanced. The maps on the robot could then be chosen as the operating map in MobileEyes.

Libaria-python

With that working I tried running libaria-python on the embedded computer.

Following the readme located at /usr/local/Aria/pythonExamples/Readme.pdf for linux or  C:\Program Files\MobileRobots\Aria\PythonExamples\Readme.pdf for windows, I tried to run the given snippet.

from AriaPy import *
robot = Aria.connectToRobot()

However, it threw an error stating it could not import DiscoverWiBox.

ImportError: No Module named DiscoverWiBox

A search revealed a changelog that indicated that it was missing and had been fixed in Aria 2.9.3. Without risking an unplanned update, I downloaded the script and placed it in the /usr/local/Aria/ directory.

That allowed me to run the commands featured in the scripts in the pythonExamples directory.

I hope this helped get your LX working.
All the best.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s