-
Notifications
You must be signed in to change notification settings - Fork 0
Installation Instructions
This is to install a fresh Ubuntu 14.04 LTS and ROS Indigo.
Follow the instructions on www.ubuntu.org to install a fresh Ubuntu. After installation, a few tricks are required to get the system going.
Create a new modeline:
sudo cvt 1360 768 60
Then copy the output starting with "1360x768_60.00" and use it as follows:
sudo xrandr --newmode "1360x768_60.00" 84.57 [...]
Check the name of the video device (probably HDMI2):
sudo xrandr -q
And finally add the new resolution by creating the file "/usr/share/X11/xorg.conf.d/10-monitor.conf" with the following content:
Section "Monitor"
Identifier "HDMI2"
Modeline "1360x768_60.00" 84.75 [...]
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "HDMI2"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1360x768_60.00"
EndSubSection
EndSection
Reboot, and now you can select this resolution using the control panel.
Install Skype from www.skype.com.
sudo apt-get update
sudo apt-get install openssh-server chrony emacs python-setuptools xautomation
sudo easy_install pip
sudu pip install netifaces python-wifi psutil cherrypy ws4py skype4py pysensors
sudo apt-get install nut
Add the following to /etc/nut/ups.conf:
[openups]
driver = usbhid-ups
port = auto
desc = "OpenUPS"
And comment out the line "maxretry = 3".
Try if it works:
sudo upsdrvctl start
Then, edit /etc/nut/nut.conf such that the last line reads
MODE=standalone
Finally, run
sudo service nut start
or reboot if that fails. Afterwards, see if everything works by trying
sudo upsc openups@localhost
Additionally, install this python wrapper for NUT.
sudo apt-get install v4l2loopback*
sudo apt-get install module-assistant
sudo m-a prepare
sudo m-a update
sudo m-a a-i v4l2loopback
sudo modprobe v4l2loopback video_nr=10
To auto load the driver on boot add the following to /etc/modules:
v4l2loopback video_nr=10
and, for some unknown reason, also to /etc/rc.local:
modprobe v4l2loopback video_nr=10
Follow the instructions on ROS.org to install ros-indigo-desktop-full.
Also install the following packages:
sudo apt-get install ros-indigo-navigation ros-indigo-slam-gmapping ros-indigo-rosserial-arduino ros-indigo-rosserial ros-indigo-joystick-drivers ros-indigo-hokuyo-node ros-indigo-openni2-* ros-indigo-teleop-twist-keyboard
Then, create a ROS workspace and get the MITRO and RoboClaw code:
mkdir -p ~/ros_ws/src
cd ~/ros_ws/src
catkin_init_workspace
git clone https://github.com/smARTLab-liv/mitro.git
git clone https://github.com/richardw347/roboclaw_driver.git
Add the following to your .bashrc for convenience:
source /opt/ros/indigo/setup.bash
source ~/ros_ws/devel/setup.bash
export PATH=$HOME/bin:$PATH
export ROS_WORKSPACE=$HOME/ros_ws/src
or alternatively copy over the entire prepared .bashrc:
cp ~/ros_ws/src/mitro/mitro/mitro_bringup/scripts/.bashrc ~/.bashrc
Finally, source your new .bashrc and compile the code (might need two runs because the compiler has a hard time figuring out in which order to compile things):
cd ~/ros_ws
. ~/.bashrc
catkin_make
catkin_make
Copy the UDEV rules in mitro_bringup and mitro_multicam to /etc/udev/rules.d/ and restart.
Copy the DAEMON scripts and make them auto-start on boot:
roscd mitro_bringup
sudo cp daemons/* /etc/init.d/
sudo update-rc.d mitro_roscore defaults
sudo update-rc.d mitro_bringup defaults
roscd mitro_multicam
sudo cp daemon/mitro_multicam /etc/init.d
sudo update-rc.d mitro_multicam defaults
roscd mitro_webcontrol
sudo cp daemon/mitro_webcontrol /etc/init.d
sudo update-rc.d mitro_webcontrol defaults
Usage:
sudo service [daemon_name] [start|stop]
Copy the mitro_test script and make sure it is in your path. If you use the provided .bashrc it will be!
roscd mitro_bringup
mkdir ~/bin
cp scripts/bin/mitro_test ~/bin/
In case something changes in the mitro_sonar msg code, new headers need to be generated and recompiled for arduino:
cd [wherever arduino/libraries is]
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py . mitro_sonar
Don't forget to recompile and upload the arduino code using this new library.
Uncomment and change the following line in /etc/bluetooth/main.conf:
DisablePlugins = input
Install the sixad driver and make sure it auto-starts at boot:
sudo sixad --boot-yes
Login using the username smartlab-mitro. Set the video device to /dev/video10, and make sure that Skype automatically starts and logs in on boot. Also change the settings such that video is automatically started for everyone, and accepted from everyone. The first time you run webcontrol using:
roscd mitro_webcontrol
./start.sh
a popup in Skype will ask you to allow Skype4py to interact with Skype, click yes and always. That's it!