MMR
This page holds information relevant for the Natty Bumpo robot.
make video from images
1. Convert to filenames with sequential numbers and a supported image formap (e.g. png)
2. run ffmpeg with appropriate options
A script to do so could be:
#! /bin/bash let COUNTER=1000000 for f in $( ls *.bmp ); do
echo convert $f path$COUNTER.png
convert $f path$COUNTER.png let PREV=$COUNTER let COUNTER+=1
done
# convert to mpeg format # -r 25 frames per second # -b 5000000 bitrate på 5Mbit/sec # -y betyder overskriv destination ffmpeg -y -r 25 -b 5000000 -i path1%06d.png path.mpeg ls -l path.mpeg
Natty Bumpo – demo instructions (short version)
Assumptions:
Near AU, i.e. Wireless network running (if not: reboot to set default gateway).
(old mmrd version of software - pre 2007)
--
Using acer PC for control (boot with linux).
Acer PC is connected with twisted network cable to Natty. Natty has IP 10.0.2.116, Acer is assumed to have IP 10.0.2.1. (IP is set on acer in /etc/rc.d/rc.inet1.conf:
IPADDR[0]=”10.0.2.1” USE_DHCP[0]=”no” NETMASK[0]=”255.255.255.0”.
LMSserver and gpsserver must be running – check with ps -A. If not then start manually from a ssh session (no parameters required). SMRDEMO, UCAMSERVER and MMRD should be started manually, e.g.:
ssh demo@smr16 # and password cd /rhome/demo/bin ./smrdemo -t1 # smrdemo opens port 31001
ssh demo@smr16 cd bin ./ucamserver -t "path gmk" --imagepath="/mnt/ram" # camera server opens port 24920
And the navigation server currently called mmrd
ssh demo@smr16 cd bin ./mmrd -i /mnt/ram # drive planner opens port 24922
--
On acer: for mission control and monitoring
Find the graphical control application (based on openCV):
./uclient # is in /usr/local/smr/bin on "nyquist" and "jensen"
Connect to smr16 (session3) port 24922
>> connect smr16 24922 >> connected ...
To watch status image (getting laser scan and other info every 1 sec).
>> push cmd=”get all” # major variable values >> push cmd=”obstget” # obstacles >> push cmd=”planget status” # gets current command line (etc) >> push cmd=”scanget andall” # gets the laser scan and result of path finding (etc)
Run a mission e.g. Down the hall (25 meter on the left side):
>> planset goto=”fwd left 25”
Set (max) speed (to 0.9 m/s) – current speed is shown on status image (top-left):
>> set speed=0.9
Run a script, (look in /rhome/demo/bin/*.mmr) place MMR in hall and try
>> planset load="doors.mmr"
It will drive along left side of hallway (~25m) and stop at all open doors to the right, and return.
For other commands try
>> help >> shelp
If vision path finding is to be used, then the following parameter must be set:
>> set visPathUse=true
The vision polygon can be seen by a further push command:
>> push cmd="get visPoly"
FAQ
Tilt of laser scanner does not work.
The tilt controller can enter a no-operation mode where it needs a reset to resume operation. Reset can be done through the 'smrd' interface or by hardware action:
Hardware reset of laser scanner tilt controller:
Open plastic box behind the laser scanner (4 screws). The PCB closest to the laser scanner is the tilt controller board. The 2-wire (thick gray and orange wires) is the 24 volt supply, unplug this and reinsert. The tilt function should then find the lower extreme and reset to horizontal position.
If the tilt has passed one of the end-switches, the above reset might fail. In this case disconnect the two wires to the motor (red and black (red closest to scanner)) - screwed to the end of the controller board - and connect an external power supply (+/- 2 to 5 volt) to turn the tilt to a normal angle, then try the reset procedure again.
NB! Do not try to turn the laser scanner by hand - it will damage the axle.
Module will not load -- symbol not found
If the server is not compiled with the same library as the module, there may be "symbol not found" errors. The solution is to recompile their server with the same library as the modules (or vise versa).
Robot documentation
Documentation by Malte and Anders is on kalman:/vhome/ ... ?
hardware
1.2 GHz Via C2 processor with 512 MByte RAM.
Serial IO
The following devices are used:
/dev/ttyUSB0 // Laser scanner using USB/serial device /dev/ttyS4 // symbolic link for old laser scanner server /dev/ttyUSB1 // gps receiver /dev/ttyACM0 // Small laser scanner (URG) /dev/ttyS1 // used by smrd for RS485 interface
With kernel version 2.6.17, these are not the devices created by UDEV, they are now all in /dev/tts/*.
The com1 and com2 ports are swapped relative to ordinary SMRs, to correct for this the devices in the mmr are cross-linked in /etc/rc.d/rc.local as follows:
rm /dev/ttyS0 rm /dev/ttyS1 ln -s /dev/tts/1 /dev/ttyS0 ln -s /dev/tts/0 /dev/ttyS1
Further the devices /dev/tts/USB0 and /dev/tts/USB1 may be swapped after a reboot, to solve for this issue the devices are mapped to /dev/ttyUSB0 for gps and /dev/ttyUSB1 for SICK This is done in /etc/rc.d/rc.local using:
if udevinfo -a -p /class/tty/ttyUSB0 | grep 'DRIVER=="pl2303"'; then echo USB0 is GPS, USB1 is SICK # direct ttyUSB0 to tts/USB0 as it is the gps connection ln -s /dev/tts/USB0 /dev/ttyUSB0 # direct ttyS4 to tts/USB1 as it is the SICK laserscanner ln -s /dev/tts/USB1 /dev/ttyS4 ln -s /dev/tts/USB1 /dev/ttyUSB1 else echo USB0 is SICK, USB1 is GPS # direct ttyUSB0 to tts/USB1 as it is the gps connection ln -s /dev/tts/USB1 /dev/ttyUSB0 # direct ttyS4 and ttyUSB1 to tts/USB0 as it is the SICK laserscanner ln -s /dev/tts/USB0 /dev/ttyS4 ln -s /dev/tts/USB0 /dev/ttyUSB1 fi
RAM disk
A RAM disk is mounted at
/mnt/ram
with write access for all. Remember all content are lost after a reboot. The RAM-disk takes RAM as needed up to a maximum of 300 MByte.
The ram disk size is defined in with the other disk definitions
/etc/fstab
with the line
tmpfs /mnt/ram tmpfs size=300m 0 0
The ram-disk is intended for temporary data (logging), that can be used in areas, where no network connection is available or as a fast logging device. These data can then later be copied to a more permanent place - if needed.
Flash disk
An user area is created on the flash disk for more permanent files at
/rhome
Please make a home directory using your initials or project number. e.g. like:
/rhome/ex39
There is limited space on the flash disk - p.t. approx 150 MByte. (Check disk space with the 'df' command).