IRobot B21r

From irlab
Jump to: navigation, search

The B21r is the big red dustbin on wheels/expensive tripod. Partially outdated information on it can be found here. Also, there are manuals for the B21 in the filing cabinet.

We sometimes refer to the B21 as Mr Chips.



The B21 contains two PCs that were recently upgraded by support. More information on the upgrade is here.

When working on the command line on the B21 PCs, you might need to set a proxy variable to access the internet:

Under tcsh

setenv http_proxy ""

Under bash

export http_proxy=""


To install ROS, Nick followed these instructions:

As only staff have access to the root password, you'll need to ask (via the robot-club mailing list) if you need additional packages installed. He also had to rerun the rosinstall step a load of times before it completed successfully without network timeouts. Remember to set http_proxy to "" so the command line tools can access the web via the proxy.

Wireless Mode

By default both PCs on the B21r connect to the robot lab wireless network (ccarobot) when they boot. Once connected they are accessible as irobot0-wlan and irobot1-wlan. If you use the ethernet instead of wireless you can remove the -wlan postfixes.

Standalone Mode

The PCs on the robot will not boot unless the robot lab wireless network is accessible. If you wish to run the robot away from the this network, you will need to configure the robot correctly before leaving the lab. To do this, edit the file /etc/grub.conf on both machines to make sure that the default booted kernel is the one named "CentOS Standalone". In the current setup this means changing the line "default=0" to "default=2". This has the effect of booting the machine into runlevel 4, which has been configured for non-networked behaviour.

As our user accounts on the robot are managed via network services, you cannot use your usual account when the robot is in standalone mode. Instead you must use the "demouser" account.



The B21 is started up in multiple stages. First off you need to turn on the fuses to the "Base" and "Enclosure". These are located behind the base door to the right of the door containing the charger. Once these are on you can power up the robot by pressing in the black rotary switch on the back right of the raised platform on top of the robot. After a few seconds the RFlex screen on the top of the enclosure should illuminate. Finally, to turn on the PCs, press the black push switches on the back of the raised platform next to the serial ports. You don't need to turn both PCs on if you only require one of them.


First off, power down the PCs. To do this press the push switch for the corresponding PC. This will cleanly halt the machine and power it off. Next, power off the robot using the RFlex screen. Use the rotary switch (which you pressed to turn the thing on) to select the "PWR" box (or "Host Console", they go to the same place), then select the "Kill PWR" box (ignoring the "Shutdown PCs" box). Finally, switch off the fuses on the robot base.


There are a number of devices connected to irobot0 over serial links. There is a serial card with 8 ports ([Rocket Port Universal 8-port RJ11 PCI card|]) (it becomes visible when you open the 2 front doors of the top of the robot. To open doors, lift them gently before pulling towards you). The port towards the centre of the robot is /dev/ttyR7 and the port furthest away from the centre is /dev/ttyR0. Make sure the device descriptors in the configuration files match the actual wiring.


The cameras are currently attached to irobot1 and can be accessed at /dev/video0 and /dev/video1. To be able to read images from them, make sure you have read permissions on these devices. After you've first booted the robot you may find that both cameras only show you blue screens. To fix this, log on to irobot1, and run the following command for each device:

 xawtv -remote -c <video device>

This will give you a view of what the cameras are seeing. Right-click on the blue window (titled "??? (on irobot1)") to get a menu. On this menu set "TV norm" to "NTSC" and "Video source" to "Composite1". You should now see a view of the robot lab or wherever you are. If you only see black then you've probably still got the lens cap on.


When logged into the robot, type the following into the terminal:

echo <what you want to say> > /dev/ttyR0

For example, typing the following will say "My name is Mr.Chips"

echo my name is mr.chips > /dev/ttyR0

Calibrating PTU

Before you can use the pan-tilt unit (PTU) you need to calibrate it. This should happen at startup, but for some reason it doesn't appear to be doing it at the moment. To calibrate it, launch minicom with the ptu preset:

minicom -o ptu

Then type 'r' 'e' and hit return. This should send the PTU into a frenzy of activity. It's helpful if you can guide the camera cables around any obstructions to prevent them getting caught and tangled. After calibration has completed type 'ctrl a q' to quit.


Player 3 is installed on irobot0 under /usr as part of the school-support package. This supports the rflex controller (for movement, sonar, bumpers and many other things), the laser scanner and the pan-tilt unit (ptu). To run player for the whole robot use the following command:

[nah@irobot0 ~]$  player /storage/robot-lab/shared/config/player/b21/b21r.cfg

You should copy this file to your local directory if you want to make changes, and also for ease of use.


To view data from player in a graphical form, you need to run playerv. This will only work if you have X window forwarding enabled, which is done by using the -X switch when running ssh:

ssh -X irobot0-wlan
Personal tools