Peoplebot Touchscreen Version 1
From MobileRobots Research and Academic Customer Support
The original Peoplebot touchscreen consists of a VGA controller which drives an LCD screen, and an Elographics touchpad controller, which connects to the serial port. The typical setup uses /dev/ttyS1 in linux, or Com4 in Windows. On a PeopleBot robot there is a toggle-style power switch for the touchscreen located in the bottom-right corner of the robot's control panel. There is also a green LED indicator on the front of the display that will flash if the touch controller is operating correctly. Note that the video connecter that is located inside the robot's upright works as well, though the LCD display should be powered off when using an external display.
The Elographics Version 1 touchscreen was replaced by the Advantech Version 2 touchscreen in ???. It can be distinguished from the new touchscreen in that it is mounted in a black plastic enclosure with green power LED on front, three toggle switches on back, and an exhaust fan on back.
- Introduced
- ???
- Discontinued
- ???
- Replaced by
- Peoplebot Touchscreen Version 2
- Supporting Software
- See below
Contents |
Controls
There are three toggle switches on the back of the touchscreen display. They adjust brightness, contrast, and position of the image. The switch that is farther from the other two is the Mode switch, the middle switch is switch A, and the other is referred to as switch B. The can be used as follows:
Mode Switch Middle: Swith A = Contrast, Switch B = Brightness; Mode Switch Down: Switch A = horizontal offset, Switch B = vertical offset.
The default factory configuration for the touch-controller is setup for an emulation mode of E281A-4002 (Common in Elographics touchscreens). This works fine in Windows but not in Linux, where a modification is needed for communication to happen properly. If the touch-screen was pre-installed by ActivMedia, then we have properly configured the jumper for the operating system of the computer. If you wish to change operating systems, or are installing the screen yourself, then you may need to change the controller configuration. This is done by removing jumper J11 on block SF1 to use in Linux or adding the J11 jumper for use in Windows. Removing the jumper puts the controller in pass-through mode. It is also possible to use the touchscreen in passthrough mode in Windows. To do so, run the updd driver utility and select "Elo, Smartset 23xx/25xx Intellitouch, Serial" as the controller type.
Windows
There is a supporting Windows driver for the TouchScreen. The original package is called updd.zip, and should be stored in C:\ActivMedia\ or C:\Mobile Robots\.
Run the included setup.exe program, and when prompted choose to use the E281A-4002 Intellitouch controller, then reboot the computer. Calibration can be done with the tool C:\Program Files\UPDD\tbcalib.exe.
Linux
RedHat linux comes with a pre-installed driver for touch controllers, called elographics_drv.o. This driver is mostly compatible with the controller in the AMR touchscreen, however it has a few problems and causes the touch-controller to lockup occasionally. To work around this, we have modified the driver slightly to eliminate some incompatibilities. The modified driver is stored in /usr/X11/lib/modules/input/elograhics_drv.o.
Configuring XF86
Here's how to configure XF86 version 4 (not x.org -- though it may be similar).
There are two XF86Config-4 files stored in /etc/X11. One is XF86Config-4.touch, and the other XF86Config-4.crt. They are for the touchscreen, or a standard monitor, respectively. Copy whichever one is needed to /etc/X11/XF86Config-4.
We have added these settings to the /etc/X11/XF86Config-4.touch file to make the touchscreen work:
Section "InputDevice" Identifier "touchscreen1" Driver "elographics" Option "Device" "/dev/ttyS1" Option "AlwaysCore" Option "ScreenNo" "0" Option "MinimumXPosition" "500" Option "MaximumXPosition" "3500" Option "MinimumYPosition" "500" Option "MaximumYPosition" "3500" Option "UntouchDelay" "3" Option "ReportDelay" "1" EndSection
Section "Monitor" Identifier "LCD Display" VendorName "CDynamics" ModelName "SH-23" HorizSync 28 - 35 VertRefresh 50 - 70 ModeLine "640x480" 25.20 640 684 780 800 480 490 492 525 -hsync -vsync EndSection
Added this to the "ServerLayout" section:
InputDevice "touchscreen1" "SendCoreEvents"
And changed the "Screen" section to be:
Section "Screen"
Identifier "Screen0" Device "ATI Rage Mobility" Monitor "LCD Display" DefaultDepth 16 Subsection "Display" Depth 16 Modes "640x480" EndSubSection
EndSection
(Your screen section may use a different 'Device' description depending on the motherboard revision)
Positioning the image on the display
When the system is booting, the image is normally displayed with 80 characters across, and 25 lines high. The LCD display is larger than that, and so the console mode can be set to run at 80 characters and 30 lines. This can be done with the kernel boot paramter "vga=4". This is already set in /boot/grub/grub.conf with the addition of "vga=4" to the following line:
kernel /vmlinuz-2.4.18-5 ro nousb root=/dev/hda7 vga=4
In Xwindows the image can be aligned with the LCD display with the utility xvidtune. This lets you position it left, right, up, down, and it's size. To use it, simply run 'xvidtune' at a shell prompt. Click the buttons to position the image, and click apply to see the changes. Once satisfied with the changes, click show, and the XF86Config modeline info will be displayed at the prompt. It will appear something like:
"640x480" 25.20 640 684 780 800 480 490 492 525 -hsync -vsync
This information can be entered in the /etc/X11/XF86Config-4 file so that it is always used when the system goes into X mode. We have already emtered this info into /etc/X11XF86Config-4.touch, so you can simple edit the line. If you're creating a new file, add this to the "Monitor" section:
ModeLine "640x480" 25.20 640 684 780 800 480 490 492 525 -hsync -vsync
Then, in the "Screen" section, choose the to use the mode "640x480".
Calibrating the touchscreen
There is a utility called touchcal that is installed in /usr/local/touchcal. The original version only works at the console, and not when X is running. We have modified it slightly to just return the values of the pointer, so that the user can manually adjust the /etc/X11/XF86Config-4 file. It can be run from X, as long as you boot into text mode (runlevel 3), then type startx to get to X. It will not work if the system was booted in X-mode (runlevel 5).
To use it run the following:
cd /usr/local/touchcal ./runTouchcal #(this script runs "touchcal e /dev/ttyS1")
This will display the (x,y) coordinates of the touchpresses. The configuration file need the minimum and maximum X and Y values. Find the minimum and maximum X and Y positions. Then put these into the XF86Config-4 file in place of the sample values above of 500 and 3500.
Configuring the robot to start into X mode:
(For RedHat 7, this may be different in newer distributions.)
There are two different basic methods of starting a GUI environment in Linux:
1) Start linux in runlevel 5, which provides the user with a graphical login screen. When the user logs in it goes directly to the window manager. When the user logs out it returns to the graphical login screen, and there is never just a plain text console mode.
To enable this, edit /etc/inittab. Find the lines:
# Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) #
id:3:initdefault:
Change the 3 in the last line to 5, which means that 5 would then be the default runlevel to start in.
id:5:initdefault:
2) The second way is to start X without requiring a login, and have it automatically start a program, most likely a GUI program that is designed to interface with the robot. This can be done by enabling runlevel 4 to be the default, as described in the section 1) just above this line.
When starting in runlevel 4, the system will run all the scripts in /etc/rc.d/rc4.d. The last script to run will be the highest numbered, and then the last in alphabetical order, which is usually S99local. There is an installed example of how to run a GUI, using these files:
/etc/X11/xinit/xinit.xkiosk:
xinit.xkiosk is an X11 init script that starts X and then runs one xterm shell. As soon as the shell is exited, X will exit. At this point the system is still in runlevel 4, but without a GUI. There is a line commented out in xinit.xkiosk that shows how to do a while loop, so that if the program is ever exited, it will automatically start a new one, and do so forever until the runlevel is changed.
/etc/rc.d/init.d/xkiosk:
xkiosk is the script that is called to startx and run a program. It will start X using the Xinit file xinit.xkiosk.
To cause the system to run xkiosk when switching to runlevel 4:
chkconfig --level 4 xkiosk on
And this to disable it:
chkconfig --level 4 xkiosk off
Or manually add/remove this symbolic link /etc/rc.d/rc4.d/S99xkiosk -> ../init.d/xkiosk
