Ubuntu 14.04 (trusty ARMHF)
sudo sh-c ' echo ' Deb Http://packages.ros.org/ros/ubuntu trusty main ">/etc/apt/sources.list.d/ros-latest.list '
Set up your keys
sudo apt-key adv--keyserver hkp://ha.pool.sks-keyservers.net--recv-key 0xb01fa116
installation
First, make sure your the Debian package index is up-to-date:
sudo apt-get update
There is many different libraries and tools in ros-not all compile fully on ARM. You can also install ROS packages individually.
ros-base: (Bare Bones) ROS package, build, and communication libraries. No GUI Tools.
sudo apt-get install Ros-indigo-ros-base
Add Individual Packages You can install a specific ROS package (replace underscores with dashes of the package name):
sudo apt-get install Ros-indigo-package
e.g.
sudo apt-get install ros-indigo-navigation
To find available packages, use:
Apt-cache Search Ros-indigo
Make sure the Raspbian OS is updated
[HTML] view Plaincopy
1. sudo apt-get update
2. Sudo apt-get upgrade
2.2 Installing Bootstrap dependencies
[HTML] view Plaincopy
1. sudo apt-get install Python-setuptools
2. Sudo easy_install pip
3. sudo pip install-u rosdep rosinstall_generator wstool rosinstall
2.3 Initializing ROSDEP
[HTML] view Plaincopy
1. sudo rosdep init
2. ROSDEP Update
3. Compiling Ros
3.1 Creating workspace to compile Ros
[HTML] view Plaincopy
1. mkdir ~/ros_catkin_ws
2. CD ~/ros_catkin_ws
Next download Ros Code, ROS provides two code packages
1) Ros-comm: This is officially recommended, but contains only basic ROS communication functions, no navigation, TF, action, Rviz and other GUI tools
2) Desktop: complete Ros function, suitable for all robot applications. We chose to install this.
The following command downloads and produces a compiled package list, which can take time
[HTML] view Plaincopy
1. Rosinstall_generator Desktop--rosdistro Indigo--deps--wet-only--exclude roslisp--tar > indigo-desktop -wet.rosinstall
2. Wstool init-j8 src Indigo-desktop-wet.rosinstall
If the download is interrupted in the middle, the following command will then download:
[HTML] view Plaincopy
1. Wstool update-j 4-t src
3.2 Resolving dependencies
Libconsole-bridge-dev, Liburdfdom-headers-dev, Liburdfdom-dev, Liblz4-dev, and Collada-dom-dev These five bags are not in Raspbian, Need to manually compile the download
Create a new catalog download these 5 packages
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >mkdir ~/ros_catkin_ws/external_src
2. Sudo apt-get install checkinstall cmake</span>
Install Libconsole-bridge-dev:
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >CD ~/ros_catkin_ws/external_src
2. Sudo apt-get install Libboost-system-dev Libboost-thread-dev
3. Git clone https://github.com/ros/console_bridge.git
4. CD Console_bridge
5. CMake.
6. sudo checkinstall make install</span>
When Checkinstall asks if you want to change the installation options, select [2] and change the name from "Console-bridge" to "Libconsole-bridge-dev"
the next two issues select ' n ' consecutively, otherwise compile an error
Installing Liblz4-dev
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >$ cd ~/ros_catkin_ws/external_src
2. $ wget Http://archive.raspbian.org/raspbian/pool/main/l/lz4/liblz4-1_0.0~r122-2_armhf.deb
3. $ wget Http://archive.raspbian.org/raspbian/pool/main/l/lz4/liblz4-dev_0.0~r122-2_armhf.deb
4. $ sudo dpkg-i liblz4-1_0.0~r122-2_armhf.deb liblz4-dev_0.0~r122-2_armhf.deb</span>
Installing Liburdfdom-headers-dev
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >$ cd ~/ros_catkin_ws/external_src
2. $ git clone https://github.com/ros/urdfdom_headers.git
3. $ CD Urdfdom_headers
4. $ cmake.
5. $ sudo checkinstall make install</span>
When Checkinstall asks if you want to change the installation options, select [2] and change the name from "Urdfdom-headers" to "Liburdfdom-headers-dev"
the next two issues select ' n ' consecutively, otherwise compile an error
Installing Liburdfdom-dev
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >$ cd ~/ros_catkin_ws/external_src
2. $ sudo apt-get install Libboost-test-dev Libtinyxml-dev
3. $ git clone https://github.com/ros/urdfdom.git
4. $ CD Urdfdom
5. $ cmake.
6. $ sudo checkinstall make install</span>
When Checkinstall asks if you want to change the installation options, select [2] and change the name from "Urdfdom" to "Liburdfdom-dev"
the next two issues select ' n ' consecutively, otherwise compile an error
Installing Collada-dom-dev
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >$ cd ~/ros_catkin_ws/external_src
2. $ sudo apt-get install Libboost-filesystem-dev Libxml2-dev
3. $ wget http://downloads.sourceforge.net/project/collada-dom/Collada%20DOM/Collada%20DOM%202.4/collada-dom-2.4.0.tgz
4. $ TAR-XZF collada-dom-2.4.0.tgz (if the normal user decompression problem, then the root user to extract)
5. $ CD collada-dom-2.4.0
6. $ cmake.
7. $ sudo checkinstall make install</span>
When Checkinstall asks if you want to change the installation options, select [2] and change the name from "Collada-dom" to "Collada-dom-dev"
the next two issues select ' n ' consecutively, otherwise compile an error
3.3 Resolving dependencies through ROSDEP
[HTML] view Plaincopy
1. <span style= "FONT-SIZE:18PX;" >$ cd ~/ros_catkin_ws
2. $ rosdep Install--from-paths src--ignore-src--rosdistro indigo-y-R--os=debian:wheezy</span>
The above command will facilitate all package and recursive installation dependencies
3.4 Start compiling Ros
$ sudo./src/catkin/bin/catkin_make_isolated--install-dcmake_build_type=release--install-space/opt/ros/indigo
Common errors:
The compilation process compiles more than 180 package and installs it in the/opt/ros/indigo directory, often reporting ' collada_parser ', ' collada_urdf ', ' Rviz ', ' Visualization_ Tutorials ', ' rqt_robot_plugins/rqt_rviz ' these packets are faulty and the installation is interrupted. The solution is to remove the packages from the directory ~/ROS_CATKIN_WS/SRC directory and recompile the entire Ros. Finally, a separate workspace is created and the packages are placed in the SRC directory. Then execute the following command:
Sudo./src/catkin/bin/catkin_make_isolated--install-dcmake_build_type=release--install-space/opt/ros/indigo
If you still get an error, you need to re-install the five packages in step 3.2, and each time you install one recompile, the successfully compiled package can be deleted until the final compilation succeeds.
If still an error, based on the details of the error, some of the source code files that lead to the compilation error exclude the compilation list (generally, modify the CMakesfiles.txt file in the package directory, will cause the compilation error source code file comment out).
Raspberry Pi Learning Note--uart use Raspberry Pi--uart use Click to open link This article will detail the serial port (UART) configuration and use of the Raspberry Pi, and combine the application of the Raspberry Pi serial port with an example from the Modbus RTU. before you begin, explain the following points