My Pi 3 Install Log (3): ROS Kinetic on Raspbian Jessie (Lite)
(2 hours)
# installing ROS
# installing ROS
* (instruction by sonel) https://forum.poppy-project.org/t/raspberry-pi-3-experiments/2456
* (official kinetic on rpi 2?) http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi
(missing packages?) https://github.com/ros/rosdistro/issues/11020
# follow installation ubuntu
- 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-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
- sudo apt-get update
- sudo apt-get upgrade # will download 87.8 MB of archives
after upgrade, now 972MB used
'free -m' shows 690/925 MB memory used <-- probably buffering
sudo shutdown -r now # or sudo reboot
'free -m' now using 76/925 MB memory only
now starts differently - ROS has 4 configurations to choose from. Should I go for the ros-base installation?
* * *
If desktop-full, lite has no GUI, so try LXDE as in install log 2 http://robotera.blogspot.ca/2016/08/install-log-2-lxde-on-raspbian-jessie.html
* * *
ok now try ros desktop, error cannot locate packages.
apt-get update hits ROS packages correctly but received nothing about ROS??
apt-cache search ros-kinetic returns nothing
fast method not working http://wiki.ros.org/kinetic/Installation/Ubuntu
So slow method install from source! 2.5 hours
# Bootstrap Dependencies
$ sudo apt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake
→ used 1636140/15304884 1k-blocks (used 1.6G)
# init dependencies
sudo rosdep init
rosdep update
rosdep update
→ Query rosdistro index and then added distro
### installation now
# catkin workspace - use wstool to fetch the core packages so to build them.
# install ROS-Comm (no GUI), not Desktop
- $ rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall
$ wstool init src kinetic-ros_comm-wet.rosinstall
# unavailable Dependencies
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
sudo make install
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
sudo make install
# assimp is needed by collada_urdf, a tool to convert Unified Robot Description Format (URDF) documents into COLLAborative Design Activity (COLLADA) documents.
# get remaining dependencies
cd ~/ros_catkin_ws
$ rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --os=debian:jessie
$ rosdep install -y --from-paths src --ignore-src --rosdistro kinetic -r --os=debian:jessie
# add swap space
sudo nano /etc/dphys-swapfile
And change the line
CONF_SWAPSIZE=100
into
CONF_SWAPSIZE=1024
Next you can either restart your PI or just the swap daemon:
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
sudo /etc/init.d/dphys-swapfile start
The second instruction will take bout 30 seconds to run (it creates the swap file) so don't be alarmed if the prompt doesn't return immediately.
Usefree -m to make sure that you have 1024 of swap memory.
# build catkin workspace
$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
# done installation. Now source its environment
$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
* * *
For future reference (not done yet), cut-and-paste the followings from the official page:
Maintaining a Source Checkout
## in the future, periodically update the source by updating first rosinstall file, download the latest sources, and rebuild our workspace.
$ mv -i kinetic-desktop-full-wet.rosinstall kinetic-desktop-full-wet.rosinstall.old
$ rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
$ rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
Then, compare the new rosinstall file to the old version to see which packages will be updated:
$ diff -u kinetic-desktop-full-wet.rosinstall kinetic-desktop-full-wet.rosinstall.old
If you're satified with these changes, incorporate the new rosinstall file into the workspace and update your workspace:
$ wstool merge -t src kinetic-desktop-full-wet.rosinstall
$ wstool update -t src
$ wstool update -t src
Now that the workspace is up to date with the latest sources, rebuild it:
$ ./src/catkin/bin/catkin_make_isolated --install
Once your workspace has been rebuilt, you should source the setup files again:
$ source ~/ros_catkin_ws/install_isolated/setup.bash
Adding Released Packages
You may add additional packages to the installed ros workspace that have been released into the ros ecosystem. First, a new rosinstall file must be created including the new packages (Note, this can also be done at the initial install). For example, if we have installed ros_comm, but want to add ros_control and joystick_drivers, the command would be:
$ cd ~/ros_catkin_ws
$ rosinstall_generator ros_comm ros_control joystick_drivers --rosdistro kinetic --deps --wet-only --tar > kinetic-custom_ros.rosinstall
$ rosinstall_generator ros_comm ros_control joystick_drivers --rosdistro kinetic --deps --wet-only --tar > kinetic-custom_ros.rosinstall
You may keep listing as many ROS packages as you'd like separated by spaces.
Next, update the workspace with wstool:
$ wstool merge -t src kinetic-custom_ros.rosinstall
$ wstool update -t src
$ wstool update -t src
After updating the workspace, you may want to run rosdep to install any new dependencies that are required:
Raspbian Jessie:
$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y -r --os=debian:jessie
Finally, now that the workspace is up to date and dependencies are satisfied, rebuild the workspace:
$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic
Labels: Jessie, Kinetic, Raspberry Pi, Raspbian, ROS
0 Comments:
Post a Comment
<< Home