MMR

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(make video from images)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
 
This page holds information relevant for the Natty Bumpo robot.
 
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)
+
===Natty Bumpo – demo instructions (full version)===
  
2. run ffmpeg with appropriate options
+
* updated august 2009 / jca
 +
* to demonstrate sensor capabilities (no autonomous drive - sorry)
  
A script to do so could be:
+
Using TOSHIBA PC for control (boot with linux).
#! /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
+
  
 +
Login as jca/******
  
----
+
Connect network cable to MMR (yellow crossed net cable)
===Natty Bumpo – demo instructions (short version)===
+
  
====Assumptions:====
+
Set IP adress (as root)
  
Near AU, i.e. Wireless network running (if not: reboot to set default gateway).
+
root$ ifconfig eth0 10.0.2.100
  
(old mmrd version of software - pre 2007)
+
Start a console, and create 4 tabs
 +
(name the tabs: laser, cam, mrc, client)
  
--
+
'''laser''' tab
 +
jca$ ssh demo@smr16    (the usual demo password)
 +
demo$ cd bin
 +
demo$ ulmsserver
 +
'''cam''' tab
 +
jca$ ssh demo@smr16    (the usual demo password)
 +
demo$ cd bin
 +
demo$ ucamserver
 +
'''mrc''' tab
 +
jca$ ssh demo@smr16    (the usual demo password)
 +
demo$ mrc -t1
 +
'''client''' tab
 +
jca$ cd replay/mmrlive
 +
jca$ auclient
 +
This should show camera images and a laser scanner view - in a demonstration mode
  
Using acer PC for control (boot with linux).
+
If the remote control is on and set to "comp" (top-left switch "up), and NØDSTOP is down, then the laser scanner display and coordinate system will follow movement of the MMR (push MMR to demonstrate)
  
Acer PC is connected with twisted network cable to Natty. Natty has IP 10.0.2.116,
+
* try (in the client tab)
Acer is assumed to have IP 10.0.2.1. (IP is set on acer in /etc/rc.d/rc.inet1.conf:
+
  >> disp help
  IPADDR[0]=”10.0.2.1”
+
for display options
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
+
===make video from images===
cd bin
+
./mmrd -i /mnt/ram  # drive planner opens port 24922
+
  
--
+
1. Convert to filenames with sequential numbers and a supported image format (e.g. png)
  
''On acer: for mission control and monitoring''
+
2. run ffmpeg with appropriate options to convert it to a video (final framerate can not be below 25 fps, so same image can be repeated a number of times.
  
Find the graphical control application (based on openCV):
+
A script to do so could be:
  ./uclient   # is in /usr/local/smr/bin on "nyquist" and "jensen"
+
  #! /bin/bash
 +
let COUNTER=1000000
 +
for f in $( ls *ann_2.bmp ); do
 +
  echo convert $f path$COUNTER.png
 +
  convert $f path$COUNTER.png
 +
   #let PREV=$COUNTER
 +
  let COUNTER+=1
 +
  # extra repeat of same image
 +
  for n in {1..2}
 +
    do
 +
    convert $f path$COUNTER.png
 +
    let COUNTER+=1
 +
    done
 +
  done
 +
for k in {1..50}; do
 +
  convert $f path$COUNTER.png
 +
  #let PREV=$COUNTER
 +
  let COUNTER+=1
 +
  done
 +
# convert to mp4 format
 +
# -r 25 frames per second
 +
# -y betyder overskriv destination
 +
ffmpeg -y -r 25 -i path1%06d.png landing.mp4
 +
ls -l *.mp4
 +
----
  
Connect to smr16 (session3) port 24922
+
===FAQ===
 
+
>> 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.''
+
====Tilt of laser scanner does not work.====
  
 
The tilt controller can enter a no-operation mode where it needs a reset to resume operation.
 
The tilt controller can enter a no-operation mode where it needs a reset to resume operation.

Latest revision as of 14:34, 29 November 2016

This page holds information relevant for the Natty Bumpo robot.


Contents

[edit] Natty Bumpo – demo instructions (full version)

  • updated august 2009 / jca
  • to demonstrate sensor capabilities (no autonomous drive - sorry)

Using TOSHIBA PC for control (boot with linux).

Login as jca/******

Connect network cable to MMR (yellow crossed net cable)

Set IP adress (as root)

root$ ifconfig eth0 10.0.2.100

Start a console, and create 4 tabs (name the tabs: laser, cam, mrc, client)

laser tab

jca$ ssh demo@smr16    (the usual demo password)
demo$ cd bin
demo$ ulmsserver

cam tab

jca$ ssh demo@smr16    (the usual demo password)
demo$ cd bin
demo$ ucamserver

mrc tab

jca$ ssh demo@smr16    (the usual demo password)
demo$ mrc -t1

client tab

jca$ cd replay/mmrlive
jca$ auclient

This should show camera images and a laser scanner view - in a demonstration mode

If the remote control is on and set to "comp" (top-left switch "up), and NØDSTOP is down, then the laser scanner display and coordinate system will follow movement of the MMR (push MMR to demonstrate)

  • try (in the client tab)
>> disp help

for display options




[edit] make video from images

1. Convert to filenames with sequential numbers and a supported image format (e.g. png)

2. run ffmpeg with appropriate options to convert it to a video (final framerate can not be below 25 fps, so same image can be repeated a number of times.

A script to do so could be:

#! /bin/bash
let COUNTER=1000000
for f in $( ls *ann_2.bmp ); do 
 echo convert $f path$COUNTER.png
 convert $f path$COUNTER.png
 #let PREV=$COUNTER
 let COUNTER+=1
 # extra repeat of same image
 for n in {1..2}
   do
   convert $f path$COUNTER.png
   let COUNTER+=1
   done
 done
for k in {1..50}; do
 convert $f path$COUNTER.png
 #let PREV=$COUNTER
 let COUNTER+=1
 done
# convert to mp4 format
# -r 25 frames per second
# -y betyder overskriv destination
ffmpeg -y -r 25 -i path1%06d.png landing.mp4
ls -l *.mp4

[edit] FAQ

[edit] 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).


Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox