You are on page 1of 18

SUMMIT MOBILE ROBOT

System Installation and Configuration Manual


Versin 4.0

Robotnik Automation, S.L.L. 1/04/2013 RBTNK-DOC-120209B

RBTNK-DOC-120209B System installation and configuration manual.

INDEX
1. SUMMIT Robot Control (Control PC).........................................................................................3 1.1 System Hardware and Requirements ........................................................................................3 1.2 Operating System Installation ...................................................................................................3 1.3 Network Configuration .............................................................................................................4 1.3.1 Ethernet..............................................................................................................................4 1.3.2 Wireless .............................................................................................................................4 1.4 ROS Installation packages ........................................................................................................5 1.4.1 Common ROS packages installation and configuration....................................................5 1.4.2 Summit Software ...............................................................................................................7 1.4.3 Components Software .......................................................................................................8 1.4.4 Other Non ROS Software Packages (Webcamtools) ......................................................12 1.5 Network remote access configuration ....................................................................................14 1.5.1 SSH access.......................................................................................................................14 1.5.2 NFS access.......................................................................................................................14 1.6 Scripts and Start Configuration ...............................................................................................15 1.6.1 /etc/init/ttyX.conf.............................................................................................................15 1.6.2 .bashrc.........................................................................................................................15

1.6.3 Configure libraries permissions and udev/rules ..............................................................16 2. Remote PC .....................................................................................................................................17 2.1. Installing ROS Software ......................................................................................................17

RBTNK-DOC-120209B System installation and configuration manual.

1. SUMMIT Robot Control (Control PC)


The Summit robot comes with operating system and complete software architecture and tools, fully installed and working. This chapter describes the complete installation of a new system starting from scratch.

1.1 System Hardware and Requirements


The supplied computer is fully described in chapter 4, System Elements and Maintenance Manual.

1.2 Operating System Installation


Note that each Summit robot comes with operating system and complete software architecture and tools, fully installed and working. This chapter describes the complete installation of a new system starting from scratch. For a correct installation of the software you must follow the steps describe below: Install the Ubuntu-12.04 distribution following the steps of the software. Necessary extra packages for the robot (accessible with the Synaptic Package Manager: -linux-rt (complete Real Time Linux Kernel) -startupmanager -g++ -v4l-conf (video4linux) -libltdl-dev // shared libraries support -libgsl0-dev -libncurses5dev -libcv-dev (opencv) -guvcview // for sphere_ptz -libplayerjpeg2 // for JPEG compression (some camera drivers e.g. uvc use this compression by default) -libplayerjpeg2-dev // id. -libgtk2.0-dev (gdk-pixbuf-2.0) // for mapfile -glutg3-dev -libxmu-dev -libraw1394-dev // for stereo head - videre -libdc1394-22-dev // for stereo head - videre -openssh-server // for remote development and access -libxml2-dev -linux-source-2.6.32 -cmake-curses-gui -vim

RBTNK-DOC-120209B System installation and configuration manual.

-libhighgui-dev (opencv) -libcvaux4 (opencv) -libcvaux-dev (opencv) -libcomedi-dev -libusb-1.0-dev (subversion) (git-core)

// for usbdux

The following packages are optional: -libboost-dev -libboost-thread-dev -libboost-signals-dev -doxygen -doxygen-gui

1.3 Network Configuration 1.3.1 Ethernet


Configure the network device connected to the wifi router. It was configured with the fixed IP 192.168.0.200 The configuration is done from the Ubuntu Gnome Desktop. Summit - Static IP address 192.168.0.200 Subnet Mask 255.255.255.0 Gateway address: 192.168.0.1

1.3.2 Wireless
The wifi router configuration by default is the following: User/password: admin/password admin/Summit1234 Mode Router ESSID SUMMIT Security Disabled Wireless Connection Method : DHCP (192.168.0.2-192.168.0.50) 802.11 Mode: 11b+g+n Channel auto Router IP Address : 192.168.0.1 Wifi Pass: Summit1234

RBTNK-DOC-120209B System installation and configuration manual.

1.4 ROS Installation packages


After OS installation, the robot framework has to be installed. Each Summit robot comes with operating system and complete software architecture and tools fully installed and working. This chapter describes the installation of the ROS Fuerte framework starting from scratch.

1.4.1 Common ROS packages installation and configuration


NOTE: If you are installing ROS in Ubuntu 12.04 (Precise) - be sure to install first the following packages: -yaml-cpp -libassimp-dev -libpopt-dev (por libpcan) -mingetty (for autostart) -procinfo (for lsdev) -minicom (for testing or manual configuration of serial devices) -libasound2 alsa-utils alsa-oss (for sound device support) To install ROS please download and follow the instructions described in: http://ros.org/wiki/fuerte#Installation After that some additional stacks have to be installed. This can be done from the command line or in most cases from the Ubuntu Software Center. The additional packages needed are: ros-fuerte-pr2-common ros-fuerte-pr2-mechanism ros-fuerte-pr2-simulator (for gazebo_plugins, libgazebo_ros_controller_manager) ros-fuerte-pr2-applications (for pr2_teleop) ros-fuerte-sbpl ros-fuerte-joystick-drivers (for joy, used by summit_xl_joystick, summit_xl_pad) ros-fuerte-laser-drivers (for hokuyo / sick laser rangers) ros-fuerte-image-pipeline (for image_view, local visualization of video streams)

-Install the navigation experimental stack:


>cd; cd svn_extern > svn co https://kforge.ros.org/navigation/experimental > cd /opt/ros/fuerte/stacks > sudo ln -sf /home/Summit/svn_extern/experimental navigation_experimental > roscd ; cd navigation_experimental > rosmake

RBTNK-DOC-120209B System installation and configuration manual.

After installing ROS in the robot, be sure to add the following lines to the summit user .bashrc file: #### ROS FUERTE #### source /opt/ros/fuerte/setup.bash ROS_PACKAGE_PATH=~/Sources:$ROS_PACKAGE_PATH export ROS_WORKSPACE=/opt/ros/fuerte/stacks export ROS_MASTER_URI=http://192.168.0.200:11311 export ROS_HOSTNAME=192.168.0.200 export ROS_IP=$ROS_HOSTNAME Add the following lines to the root user .bashrc file: #### ROS FUERTE #### source /opt/ros/fuerte/setup.bash ROS_PACKAGE_PATH=~/local_packages:$ROS_PACKAGE_PATH export ROS_WORKSPACE=/opt/ros/fuerte/stacks

-Install the packages and tools to operate and test the Basler Camera: Only if this camera is installed in the robot. Camera installation and test: first connect the camera to eth (GigE or Standard Eth). The camera configuration if by default DHCP, the network should be configured for it.
>cd /opt/ >tar xzvf pylon-2.3.3-1337-32.tar.gz >cd pylon >tar xzv pylon-bininst-32.tar.gz >cd /opt/pylon/pylon/bin >./PylonViewerApp

Depending on the libQt version, the following changes may be needed


* change /usr/lib/libQtNetwork.so.4 link -> /opt/pylon/pylon/bin/libQtNetwork.so.4.3.2 * change /usr/lib/libQtXml.so.4 link -> /opt/pylon/pylon/bin/libQtXml.so.4.3.2

The camera image format has to be modified (by default YUV422 packed) to BG 8 to operate with the current driver. From the PylonViewerApp, select the camera Basler sca1390-17gc.In the Image Format Controls menu select Bayer BG 8. The camera configuration can be loaded with Menu->Camera->Load Features scA1390 17gc_21173872.pfs (serial number) The configured parameters are:
-Basler sca1390-17gc / Image Format Controls / Bayer BG 8 -Acquisition Control : Exposure Auto : Continuous

To make this store the parameters permanently:


-Configuration Sets : -Configuration Set Selector : User Set 1 -Default Startup Set : User Set 1 -User Set Save : Execute

RBTNK-DOC-120209B System installation and configuration manual.

Installation of the ROS packages


-install camera_aravis -> git clone http://github.com/strawlab/camera_aravis -install intltool from Ubuntu Software Center -install aravis (tested with version 0.1.10) Releases: http://ftp.gnome.org/pub/GNOME/sources/aravis Git repository: http://git.gnome.org/cgit/aravis ./configure; make; sudo make install

Edit the .bashrc of the summit user home directory and add the following lines:
export ARAVIS_INCLUDE_PATH=/home/summit/svn_extern/aravis-0.1.10/src

Link the new package in the ROS stack directory:


>cd /opt/ros/electric/stacks >sudo ln sf /home/summit/svn_extern/camera_aravis camera_aravis >roscd camera_aravis; cmake .; rosmake

The provided camera_aravis package has a single change in camnode.cpp : msg.encoding = "bayer_bggr8";

1.4.2 Summit Software


-Install the packages and tools to operate and test the Summit robot: Copy svn folder to the user local directory: /home/summit/Sources/trunk/summit_robot Robot control software /home/summit/Sources/trunk/summit_sim Robot simulation software Create the appropriate link in the ros/stacks directory:
>roscd >cd ../stacks >sudo ln sf /home/summit/Sources/trunk/summit_robot summit_robot >sudo ln sf /home/summit/Sources/trunk/summit_sim summit_sim

Compile all the packages: >roscd summit_pad >cmake . >rosmake >roscd summit_controller >cmake . >rosmake >

RBTNK-DOC-120209B System installation and configuration manual.

1.4.3 Components Software


The summit_robot folder contains a script (download_components.sh) to download the corresponding components. The summit_robot folder will contain a set of components that can be installed in the robot. All the installed components need to be compiled following the instructions of the previous chapter. usb_cam sphere_camera axis_camera basler_camera fotonic_3dcamera novatel_oemv mediatek_gps robotnik_arduimu robotnik_msgs maxsonar_ultrasound microstrain_3dmgx2_imu modbus_io Some components provide also additional software tools and libraries or require specific configuration processes. Additional software tools installation and configuration steps for those components are described next. Other supported components: Microsoft Kinect PS3 / Logitech / Thrustmaster gamepads -Install the packages and tools to operate and test the Axis PTZ Camera: -Connect the camera to eth network (by default DHCP) -Access the camera http server and configure user: root pwd: summit default IP address - fixed 192.168.0.201 check anonymous access allowed -Test camera: $> roslaunch axis_camera axis_ptz.launch -CGI commands can be tested from any browser: http://192.168.0.201/axis-cgi/com/ptz.cgi?info=1&camera=1 http://192.168.0.201/axis-cgi/com/ptz.cgi?tilt=100&camera=1 Additional detailed command information can be found in: http://www.axis.com/techsup/cam_servers/dev/cam_http_api_2_copy_with_overlay _areazoom.htm#api_blocks_ptz_control 8

RBTNK-DOC-120209B System installation and configuration manual.

-View image from remote computer. Type or create a script with: $> export ROS_MASTER_URI=http://summit:11311 $> roscd axis_camera $> roslaunch axis_camera image_view.launch -Test camera PTZ motion and parameter change. Open a remote terminal: $> ssh summit@summit move camera and send change of parameters: $> rostopic pub /axis/cmd axis_camera/Axis '{ brightness: 5000, pan: 100, tilt: 10, zoom: 0, autofocus: True }' -Install the packages and tools to operate and test the Basler Camera: Camera installation and test: first connect the camera to eth (GigE or Standard Eth). The camera configuration if by default DHCP, the network should be configured for it.
>cd /opt/ >tar xzvf pylon-2.3.3-1337-32.tar.gz >cd pylon >tar xzv pylon-bininst-32.tar.gz >cd /opt/pylon/pylon/bin >./PylonViewerApp

Depending on the libQt version, the following changes may be needed:


* change /usr/lib/libQtNetwork.so.4 link -> /opt/pylon/pylon/bin/libQtNetwork.so.4.3.2 * change /usr/lib/libQtXml.so.4 link -> /opt/pylon/pylon/bin/libQtXml.so.4.3.2

The camera image format has to be modified (by default YUV422 packed) to BG 8 to operate with the current driver. From the PylonViewerApp, select the camera Basler sca1390-17gc.In the Image Format Controls menu select Bayer BG 8. The camera configuration can be loaded with Menu->Camera->Load Features scA1390 17gc_21173872.pfs (serial number). The configured parameters are:
-Basler sca1390-17gc / Image Format Controls / Bayer BG 8 -Acquisition Control : Exposure Auto : Continuous

To make this store the parameters permanently: -Configuration Sets : -Configuration Set Selector : User Set 1 -Default Startup Set : User Set 1 -User Set Save : Execute Installation of the ROS packages
-install camera_aravis -> git clone http://github.com/strawlab/camera_aravis -install intltool from Ubuntu Software Center -install aravis (tested with version 0.1.10) Releases: http://ftp.gnome.org/pub/GNOME/sources/aravis Git repository: http://git.gnome.org/cgit/aravis ./configure; make; sudo make install

Edit the .bashrc of the summit user home directory and add the following lines: 9

RBTNK-DOC-120209B System installation and configuration manual. export ARAVIS_INCLUDE_PATH=/home/summit/svn_extern/aravis-0.1.10/src

Link the new package in the ROS stack directory:


>cd /opt/ros/electric/stacks >sudo ln -sf /home/summit/svn_extern/camera_aravis camera_aravis >roscd camera_aravis; cmake .; rosmake

The provided camera_aravis package has a single change in camnode.cpp : msg.encoding = "bayer_bggr8";

-Install the packages and tools to operate and test the Microsoft Kinect sensor: At the moment, the driver used is on the official ROS repository. Please, read the instructions in the following link http://www.ros.org/wiki/openni_kinect . Configuration: Create some new rules on /etc/udev/rules.d in order to detect the device and assign the correct permissions: 40-kinect.rules: SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE:="0666" SUBSYSTEM=="usb_device", MODE:="0666" As well as the SphereCam, we need to change the permissions related to the video device: 52-video.rules: KERNEL=="video1", OWNER="user", GROUP="video", MODE="0666" -Install the packages and tools to operate and test the Hokuyo Laser Ranger sensor: At the moment, the driver used is on the official ROS repository. Please, read the instructions in the following link http://ros.org/wiki/hokuyo_node -Install the packages and tools to operate and test the Novatel OEMV RTK-DGPS sensor: We need to create the following devices ttyUSB0, ttyUSB1 y ttyUSB2. >sudo mknod /dev/ttyUSB0 c 188 0 >sudo mknod /dev/ttyUSB1 c 188 1 >sudo mknod /dev/ttyUSB2 c 188 2 >modprobe usbserial vendor=0x09d7 product=0x0100 >(lsmod | grep usbserial) >minicom c To automatically load the driver at system startup and create links to /dev/gps0 /dev/gps1 /dev/gps2 for ttyUSB0 ttyUSB1 ttyUSB2 respectively upon insertion of the USB cable into the machine: (/etc/udev/rules.d/):(see http://support.novatel.com/entries/311990-oem4oemv-usb-driver-for-linux ) z90_novatel.rules:
SUBSYSTEM=="usb", SYSFS{idProduct}=="0100", SYSFS{idVendor}=="09d7", PROGRAM="/sbin/modprobe usbserial vendor=0x09d7 product=0x0100" BUS=="usb", SYSFS{idProduct}=="0100", SYSFS{idVendor}=="09d7", SYSFS{product}=="NovAtel GPS Receiver", SYSFS{manufacturer}=="NovAtel

10

RBTNK-DOC-120209B System installation and configuration manual. Inc.", SYMLINK+="gps%n"

-Install the packages and tools to operate and test the PS3 gamepad: Requirements: -Bluetooth device -ROS official driver : There is an official driver for the ps3joy. Follow the instructions in order to install and configure the device http://www.ros.org/wiki/ps3joy . Robotnik uses an alternative driver rather than the official. -Install the qtsixad package - Follow the guide: http://ubuntuforums.org/showthread.php?t=1190061 Use the command sixpair, to associate the Joystick PS3 (previously connected to the PC via USB) with the Bluetooth device. By means of the command sixad [start | stop] we'll start/stop the process in charge of the communication between the gamepad and the Bluetooth. Examples: Connect the USB Bluetooth receiver >sixpair >No controller found on USB busses. Connect the PS3 Joystick to the robot CPU usb port: >sixpair >Current Bluetooth master: 00:00:00:00:00:00 >Unable to retrieve local bd_addr from `hcitool dev`. >Please enable Bluetooth or specify an address manually. Enable Bluetooth >sudo hciconfig hci0 up >hciconfig >hci0: Type: USB > BD Address: 00:09:DD:50:49:63 ACL MTU: 384:8 SCO MTU: 64:8 > UP RUNNING > RX bytes:340 acl:0 sco:0 events:11 errors:0 > TX bytes:38 acl:0 sco:0 commands:11 errors:0 Link devices: >sixpair >Current Bluetooth master: 00:00:00:00:00:00 >Setting master bd_addr to 00:09:dd:50:49:63 The system is configured to start the following .bash script at startup:
# ROOT #### Boot #### echo "ROBOTNIK SUMMIT" Terminal=`tty` case $Terminal in "/dev/tty1") sleep 2; rosrun ps3joy sixpair; rosrun ps3joy ps3joy_node.py;; esac

11

RBTNK-DOC-120209B System installation and configuration manual.

This script allows to pair the joystick during the robot startup in case the pairing has been lost (this may happen due to pushing the gamepad PS button for more than 10 seconds or gamepad battery discharge, etc.).

1.4.4 Other Non ROS Software Packages (Webcamtools)


The sphere cam driver Works by taking the image from a camerauvc driver and the pan tilt zoom interface from a new sphereptz driver. Check that guvcview has already been installed (otherwise sudo apt-get install guvcview) Starting the application will show errors in pan,tilt, zoom controls: guvcview -d /dev/video0 -v driver:uvcvideo Adding control for Pan (relative) UVCIOC_CTRL_ADD - Error: Operation not permitted Adding control for Tilt (relative) UVCIOC_CTRL_ADD - Error: Operation not permitted Adding control for Pan Reset UVCIOC_CTRL_ADD - Error: Operation not permitted This error will be fixed installing the following application and configuring properly. Install webcamtools: cd /svn svn co http://svn.quickcamteam.net/svn/qct/webcam-tools/trunk/ webcam-tools (if not done previously, install libxml2-dev) mkdir build cd build uvcvideo.h not found Ensure that kernel sources have been properly installed: cd /usr/src/ sudo bunzip2 linux-source-2.6.32.tar.bz2 tar xvf linux-source.2.6.32.tar sudo updatedb export CMAKE_INCLUDE_PATH=/usr/src/linux-source2.6.32/drivers/media/video/uvc ccmake ../ (warning : Your V4L2 does not have V4L2_CTRL_TYPE_STRING support. Compiling without raw control support.) 12

RBTNK-DOC-120209B System installation and configuration manual.

make; sudo make install sudo ldconfig sudo uvcdynctrl -d /dev/video1 -i /etc/udev/data/046d/logitech.xml -c Alter that guvcview should run with all the (pan, tilt, zoom) controls working and allow to move the camera: guvcview -d /dev/video0 -v

Figure 3 Webcamtools Windows

13

RBTNK-DOC-120209B System installation and configuration manual.

1.5 Network remote access configuration 1.5.1 SSH access


The easiest way to modify the source code of the robot driver in a remote way is through ssh. If the remote machine is running an Ubuntu distribution, from Gnome Desktop main menu select: Places->Connect to Server. Service type: ssh Server : 192.168.0.200 Port: 22 Folder: /home/summit User: summit Password: summit Check: Add Bookmark Bookmark name: summit

1.5.2 NFS access


To access the remote folder through NFS (network file system).follow the steps: Necessary packages: nfs-common nfs-kernel-server portmap In the configuration folder /etc/exports add the directory to share: /summit 192.168.0.0/24 (rw) In the configuration folder /etc/hosts.allow, add the IP direction of the remote stations that will connect to the robot. ALL: 192.168.0.0/255.255.255.0

14

RBTNK-DOC-120209B System installation and configuration manual.

1.6 Scripts and Start Configuration


For the Start-up and the execution of the robot control programs, you need to configure and add some scripts.

1.6.1 /etc/init/ttyX.conf
Edit /etc/init/tty1.conf and change line exec /sbin/getty -8 38400 tty1 : #exec /sbin/getty -8 38400 tty1 exec /sbin/mingetty --autologin root tty1 Edit /etc/init/tty2.conf and change line exec /sbin/getty -8 38400 tty2: #exec /sbin/getty -8 38400 tty2 exec /sbin/mingetty --autologin summit tty2 Edit /etc/init/tty3.conf and change line exec /sbin/getty -8 38400 tty3: #exec /sbin/getty -8 38400 tty3 exec /sbin/mingetty --autologin summit tty3

1.6.2 .bashrc
This is a start script, which every user has in its root directory. You edit this file for the user you used in the before script ttyX. So, for example, if you have a user summit, you need to edit the file /home/summit/.bashrc. You need to add the following code at the end of the file: #### BOOT #### echo "ROBOTNIK SUMMIT" Terminal=`tty` case $Terminal in "/dev/tty2") roscore;; "/dev/tty3") sleep 20; roslaunch summit_xl_complete summit_xl_complete.launch;; # "/dev/pts/0") cd svn; # ... esac For the user summit. For the user root, you need to edit the file /home/root/.bashrc. #### BOOT #### echo "ROBOTNIK SUMMIT" Terminal=`tty` case $Terminal in "/dev/tty1") sleep 25; rosrun ps3joy sixpair; rosrun ps3joy ps3joy_node.py;; esac 15

RBTNK-DOC-120209B System installation and configuration manual.

Note that the sleep value has to be adjusted carefully. If the server starts before the dynamic devices have been recognized, the server will exit with fault and the user will need to connect to the robot to start the server manually.

1.6.3 Configure libraries permissions and udev/rules


Configure startup permissions of dynamic devices: cd /etc/udev/rules.d/ create files: 40-kinect.rules SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE:="0666" SUBSYSTEM=="usb_device", MODE:="0666" 50-raw1394.rules KERNEL=="raw1394", OWNER="summit", GROUP="summit", MODE="0666" 51-video1394.rules KERNEL=="video1394", OWNER="summit", GROUP="summit", MODE="0666" 52-video.rules KERNEL=="video0", OWNER="summit", GROUP="summit", MODE="0666"

16

RBTNK-DOC-120209B System installation and configuration manual.

2. Remote PC
The robot can be remotely operated with a Linux/Windows PC. The minimal requirement is having a ssh client. The remote machine should have ROS installed.

2.1.

Installing ROS Software

Install a ros-fuerte version in the remote machine (follow instructions in www.ros.org). Configure the network following the steps in http://www.ros.org/wiki/ROS/NetworkSetup In the Summit robot, check that the following addresses are defined in the /etc/hosts file: /etc/hosts 127.0.0.1 localhost 192.168.0.200 summit Check that the summit PC name (in this case summit) is in the /etc/hosts file of the remote computer. In some configurations this requirement is a must, as some services do not work only with the IP address. trurl@trurl:~$ more /etc/hosts 127.0.0.1 localhost 127.0.1.1 trurl 192.168.0.200 summit Connect the remote PC to the Summit wireless network SSID Summit. In the Summit PC launch the robot component launch files. The communication should work with ROS_MASTER_URI=http://localhost:11311 or ROS_MASTER_URI=http://V3:11311. >roscd summit_complete >roslaunch summit_complete summit_complete.launch Check that both machines can do ping to themselves and between them. Check that all the ports are open, e.g. test with netcat (only ports > 1024, otherwise root privileges are needed). summit@summit> netcat -l 1234 trurl@trurl:~$ netcat V3 In the remote machine Terminal write: >export ROS_MASTER_URI=http://V3:11311 >rostopic list

17

RBTNK-DOC-120209B System installation and configuration manual.

You should receive a list of all the active topics, e.g: trurl@trurl:/opt/ros/electric/stacks/summit_robot$ rostopic list /diagnostics /hokuyo_node_front/parameter_descriptions /hokuyo_node_front/parameter_updates /joy /logitech_usb_webcam/camera_info /logitech_usb_webcam/image_raw /odom /ptz_state /robotsound /rosout /rosout_agg /scan /summit_controller_dspic/cmd_vel /tf If the communication is correct you should also be able to retrieve the data from the topics: trurl@trurl:/opt/ros/electric/stacks/summit_robot$ rostopic echo /ptz_state pan: 0.0 tilt: 0.0 zoom: -1.0 The conventional tools can also be used from the remote machine, e.g. image_view or rviz. rosrun image_view image_view image:=/logitech_usb_webcam/image_raw rosrun rviz rviz

18

You might also like