0. Introduction
I decided to write this tutorial because I find some issues when I firstly installed ROS on my TinkerBoard, so maybe this page can help someone else to use this tool. This tutorial works with TinkerOS 1.4 and TinkerOS 1.8 (you can find it on the TinkerOS official page).
In this tutorial I assume that you alreay know how to connect to your TinkerBoard, either connecting it to a external screen or using a SSH connection and open a terminal.
1. Downloading and installing
In order to compile ROS for your device you’ll need to download some tool so type:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install dirmngr #needed if using TinkerOS 1.8
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
This will add the ROS repository to your repositories list. Now you have to update the repos and install the packages:
sudo apt-get update
sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
Once you installed everything, you have to initialize ROS. So:
sudo rosdep init
rosdep update
Now you have to create an enviroment where you’ll compile ROS and download and compile the external parts:
mkdir -p ~/ros_catkin_ws
cd ~/ros_catkin_ws
rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall
wstool init src kinetic-ros_comm-wet.rosinstall
mkdir -p ~/ros_catkin_ws/external_src
cd ~/ros_catkin_ws/external_src
wget http://sourceforge.net/projects/assimp/files/assimp-3.1/assimp-3.1.1_no_test_models.zip/download -O assimp-3.1.1_no_test_models.zip
unzip assimp-3.1.1_no_test_models.zip
cd assimp-3.1.1
cmake .
make -j4 -w
sudo make install
The last part is the installation itself. You have to type:
cd ~/ros_catkin_ws
rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r # if using TinkeOS 1.4
rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --skip-keys='sbcl' # if using TinkeOS 1.8
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
In order to run ROS without sourcing the “setup.bash” file, just add one line at the end of the ~/.bashrc file by typing this:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
That’s it!
2. Notes
I had some errors while installing packages with “apt-get install”. The terminal said:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LC_PAPER = "it_IT.UTF-8",
LC_ADDRESS = "it_IT.UTF-8",
LC_MONETARY = "it_IT.UTF-8",
LC_NUMERIC = "it_IT.UTF-8",
LC_TELEPHONE = "it_IT.UTF-8",
LC_IDENTIFICATION = "it_IT.UTF-8",
LC_MEASUREMENT = "it_IT.UTF-8",
LC_TIME = "it_IT.UTF-8",
LC_NAME = "it_IT.UTF-8",
LANG = "C.UTF-8"
To solve it, just send:
sudo dpkg-reconfigure locales
sudo locale-gen en_US en_US.UTF-8
echo "export LC_ALL="en_US.UTF-8"" >> ~/.bashrc
January 14, 2018 at 1:16 am
Awesome, thanks for putting this together!
January 14, 2018 at 11:20 am
You’re welcome! If you have some questions or topics, write here and I’ll answer as soon as possible
February 14, 2018 at 5:53 pm
This failed for me at step 2, getting the pgp key. It complained that it didn’t have dirmngr, needed to grab the key.
The solution was easy: Install dirmngr.
sudo apt-get install dirmngr
February 14, 2018 at 6:14 pm
Thank you for the comment. It didn’t happen to me, but it could be useful for other users š
February 14, 2018 at 6:31 pm
Presumably just a fluke in which packages get built into TinkerOS this week.
February 14, 2018 at 6:40 pm
Also, the second to last step failed for me. (Oh dependency trees, why you gotta always be in flux?)
This is the step that didn’t like my fresh TinkerOS install:
rosdep install -y –from-paths src –ignore-src –rosdistro kinetic -r
…but according to some folks on the ROS forums, you don’t need the sbcl stuff anyway, and can safely compile without it by running:
rosdep install -y –from-paths src –ignore-src –rosdistro kinetic -r –skip-keys=’sbcl’
…which seems to have worked.
May 9, 2018 at 2:19 am
I just want to tell you that I’m newbie to blogging and site-building and actually loved this web site. More than likely Iām want to bookmark your blog post . You surely have awesome articles. Many thanks for revealing your web-site.
July 18, 2018 at 9:50 pm
Installation like has passed, but packages are not installed
root@tinkerboard:~/ros_catkin_ws# sudo apt-get install ros-kinetic-usb-cam
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package ros-kinetic-usb-cam
If you compile the usb-cam package from the sources, then you will get errors.
sudo apt-get install ros-kinetic-…. Other packages also do not find
July 19, 2018 at 1:21 am
If you type roscore in the terminal is ros starting? If so, the package is installed correctly. Since you compiled it instead of using the apt package manager, in order to install more ros packages you have to clone the git repo of the package you need in ~/ros_catkin_ws/src and then run catkin_make.
If you need further help, feel free to ask here.
July 21, 2018 at 8:23 pm
ROSCORE is started. When I download the package through a git, how do I understand what other packages I need to download and where to download the packages on which it depends?
August 3, 2018 at 3:09 pm
The way I usually do is just to keep adding the needed packages until the compilation gives me no error
August 3, 2018 at 5:54 pm
It is necessary to make, that ROS could itself to load dependent packages
November 9, 2018 at 8:57 am
good this tutorial works