If you are new to ROS, refer to ROS Start Guide first to get started.
These instructions were tested with version Flight_3.1.2. The latest version of the software can be downloaded from here and installed by following the instructions found here
NOTE: By default the HOME environment variable is not set. Set this up doing the following:
adb shell
chmod +rw /home/linaro
echo "export HOME=/home/linaro/" >> /home/linaro/.bashrc
If you use SSH, the home environment variable should be set correct after the above step. If you use ADB, do the following for each session:
adb shell
source /home/linaro/.bashrc
This installation step requires the Snapdragon FlightTM board to be in station mode with internet connection. See instructions here to set the board in station mode and connect it to your WiFi network.
NOTE Due to an unmet package dependency for fastcv-internal on target, the installation of any deb package using apt-get will fail. To resolve this, do the following:
adb shell
apt-get install -f
This will prompt you to uninstall the fastcv-internal package. Type "Y" to uninstall and continue.
The following steps are mirrored from here. Refer to the link for detailed information about each step.
- Set your locale
adb shell
sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX
- Setup your sources.list
adb shell
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
- Setup your keys
adb shell
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
- Installation
adb shell
sudo apt-get update
sudo apt-get install ros-indigo-ros-base
NOTE: If the installation fails with this message:
Errors were encountered while processing:
/var/cache/apt/archives/fontconfig-config_2.11.0-0ubuntu4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
try running the following command:
sudo apt-get -f -o Dpkg::Options::="--force-overwrite" install
NOTE: If the installation fails with this message:
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/i/icu/icu-devtools_52.1-3_armhf.deb 502 cannotconnect [IP: 91.189.88.150 80]
try running the following command:
apt-get update --fix-missing
apt-get install ros-indigo-ros-base
- Environment Setup
adb shell
echo "source /opt/ros/indigo/setup.bash" >> /home/linaro/.bashrc
It is recommended to install the following additional ROS packages.
adb shell
apt-get install ros-indigo-tf2-ros
Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
adb shell
sudo rosdep init
rosdep update
After installing ROS, the OpenCL library gets installed by ROS as well which causes a conflict with camera pipeline. To fix this, do the following:
adb shell
dpkg -r libhwloc-plugins
dpkg -r ocl-icd-libopencl1:armhf
NOTE: OpenCL can be safely removed as there is a version that is installed on the target at /usr/lib.
These instructions are mirroed from here. Refer to the page for additional/detailed information.
- Source the ROS environment, if not already done.
adb shell
source /home/linaro/.bashrc
- Create ROS workspace
mkdir -p /home/linaro/ros_ws/src
cd /home/linaro/ros_ws/src
catkin_init_workspace
NOTE: The name of the workspace can be anything. For this demonstration, "ros_ws" is used as the name of the workspace.
Even though the workspace is empty ( there are no packages in the 'src' folder, just a single CMakeLists.txt link ), you can still build the workspace
cd /home/linaro/ros_ws
catkin_make
"catkin_make" is necessary as it creates the /home/linaro/ros_ws/devel directory. This is where the generated libaries and the executables will be generated. It also generates a new bash setup script which includes the appropriate environment variables for using the "ros_ws" workspace. It is recommended to add this script to the /home/linaro/.bashrc so that the paths are setup correctly.
adb shell
echo "source /home/linaro/ros_ws/devel/setup.sh" >> /home/linaro/.bashrc
That's it you are ready to start developing with ROS.
If you plan on using Snapdragon FlightTM in softap mode, it is recommended to set the environment variable ROS_IP in the .bashrc file:
echo "export ROS_IP=192.168.1.1" >> /home/linaro/.bashrc