I told you how to install the OS Ubilinux on the Intel Edison board in the last post. I need this system for using the ROS (Robotic Operation System). I also need some functions which doesn’t included to the standard comm version:
- communication between Edison and Arduino Mega through serial port (UART)
- receiving frames from USB-camera and transmitting them with OpenCV support
- getting gamepad commands (XBox or DualShock)
- creating custom message types
The OpenCV installing.
First of all we need install the GIT:
1 |
sudo apt-get -y install git |
Also we install webcam compression support:
1 |
sudo apt-get install v4l-utils libv4l-dev |
And then we compile the OpenCV:
1 2 3 4 5 6 7 8 9 10 |
mkdir ~/opencv git clone https://github.com/Itseez/opencv.git cd ~/opencv mkdir ~/opencv/build cd ~/opencv/build cmake -D CMAKE_BUILD_TYPE=RELEASE -D ENABLE_PRECOMPILED_HEADERS=OFF -D WITH_LIBV4L=ON -D WITH_V4L=ON -D CMAKE_INSTALL_PREFIX=/usr/local .. make j-2 sudo make install sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' sudo ldconfig |
Also, I have deleted the git folder of the OpenCV because its big size.
Установка ROS.
The ROS installation.
We need to install ROS repositories:
1 2 |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu wheezy main" > /etc/apt/sources.list.d/ros-latest.list' wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add - |
Update the repositories:
1 2 |
sudo apt-get -y update sudo apt-get -y upgrade |
Install needed bootstrap dependencies:
1 2 |
sudo apt-get install python-pip python-setuptools python-yaml python-argparse python-distribute python-docutils python-dateutil python-six libeigen3-dev libcppunit-dev python-sip-dev python-serial sudo pip install rosdep rosinstall_generator wstool rosinstall |
Initialize rosdep:
1 2 |
sudo rosdep init rosdep update |
Isntalling.
Create catkin Workspace
1 2 |
mkdir ~/ros_catkin_ws cd ~/ros_catkin_ws |
Now, get ROS using wstool. Don’t forget to add ros_control and joystick_drivers for the gamepad support, cv_bridge and image_transport for the webcam support and image transmitting:
1 |
rosinstall_generator ros_comm cv_bridge image_transport ros_control joystick_drivers --rosdistro jade --deps --wet-only --exclude roslisp --tar > jade-ros_comm-wet.rosinstall |
Initialize the wstool:
1 |
wstool init src jade-ros_comm-wet.rosinstall |
Install the cmake and update the sources.list:
1 2 3 4 5 |
mkdir ~/ros_catkin_ws/external_src sudo apt-get -y install checkinstall cmake sudo sh -c 'echo "deb-src http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi" >> /etc/apt/sources.list' sudo sh -c 'echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list' sudo apt-get -y update |
If you have some errors then go to SU and input:
1 2 |
gpg --keyserver keys.gnupg.net --recv-key 9165938D90FDDD2E gpg -a --export 9165938D90FDDD2E | apt-key add - |
The console bridge installation:
1 2 3 4 |
cd ~/ros_catkin_ws/external_src sudo apt-get -y build-dep console-bridge apt-get -y source -b console-bridge sudo dpkg -i libconsole-bridge0.2v5_*.deb libconsole-bridge-dev_*.deb |
The liblz4b-dev installation
1 |
sudo apt-get -y install liblz4-dev |
liburdfdom-headers-dev
1 2 3 |
cd ~/ros_catkin_ws/external_src sudo apt-get -y source -b liburdfdom-headers-dev sudo dpkg -i liburdfdom-headers-dev_*.deb |
liburdfdom-dev
1 2 3 4 5 |
sudo apt-get install libboost-dev libboost-system-dev libboost-thread-dev python-mock cd ~/ros_catkin_ws/external_src sudo apt-get -y install libboost-test-dev libtinyxml-dev sudo apt-get -y source -b liburdfdom-dev sudo dpkg -i liburdfdom*.deb |
The ROSDEP installation:
1 2 |
cd ~/ros_catkin_ws rosdep install --from-paths src --ignore-src --rosdistro jade -y -r --os=debian:wheezy |
Add a full list of standard messages. It is necessary for the Arduino ros_lib:
1 2 3 |
cd ~/ros_catkin_ws/src rm -r common_msgs git clone https://github.com/ros/common_msgs.git |
Input this and wait (about an hour)
1 |
cd ~/ros_catkin_ws/src |
1 2 |
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /home/ros/jade sudo ln -sf /home/ros /opt/ |
Update .profile and .bashrc
1 2 |
echo "source /home/ros/jade/setup.bash" >> ~/.profile source ~/.profile |
1 2 |
echo "source ~/ros_catkin_ws/devel_isolated/setup.bash" >> ~/.bashrc source ~/.bashrc |
1 |
cd ~/ros_catkin_ws |
That’s all. The ROS ready to run.