ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I solved it myself. Here are my notes as to what I did. Maybe that will help someone in the future:
# Guide to get all moveit dependencies installed on raspbian jessie.
# Install ros as described here: wiki.ros.org/ROSberryPi/Installing%20ROS%20Indigo%20on%20Raspberry%20Pi
# Install moveit as described here: http://moveit.ros.org/install/#collapseFour
# This manual describes how to get the line: "rosdep install --from-paths src --ignore-src --rosdistro indigo -y" to work.
# Increase swap size:
$ sudo sed -i -e "s/CONF_SWAPSIZE=100/CONF_SWAPSIZE=1024/" /etc/dphys-swapfile
$ sudo reboot
$ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
#deb-src http://mirrordirector.raspbian.org/raspbian/ testing main contrib non-free rpi
$ cat /etc/apt/sources.list.d/ros-latest.list
deb http://packages.ros.org/ros/ubuntu jessie main
deb http://packages.ros.org/ros/ubuntu trusty main
deb-src http://packages.ros.org/ros/ubuntu trusty main
deb-src http://archive.ubuntu.com/ubuntu/ trusty main universe multiverse restricted
# Lower priority for ubuntu packages
$ cat /etc/apt/preferences.d/ros-trusty
Package: *
Pin: release o=ROS,a=trusty
Pin-Priority: 50
# Get 0.2 version of urdfdom from ubuntu source repo. Specify exact available version or deactivate deb-src from jessie beforehand
$ apt-get source -b 'urdfdom'
$ sudo dpkg -i liburdfdom0.2-dbg_0.2.10+dfsg-1_armhf.deb liburdfdom-dev_0.2.10+dfsg-1_armhf.deb liburdfdom-model0.2_0.2.10+dfsg-1_armhf.deb liburdfdom-model-state0.2_0.2.10+dfsg-1_armhf.deb liburdfdom-sensor0.2_0.2.10+dfsg-1_armhf.deb liburdfdom-tools_0.2.10+dfsg-1_armhf.deb liburdfdom-world0.2_0.2.10+dfsg-1_armhf.deb
# ros-indigo-pluginlib searches for 'liblog4cxx.so' in '/usr/lib'
# liblog4cxx10-dev is installed
sudo ln -s /usr/lib/arm-linux-gnueabihf/liblog4cxx.so /usr/lib/liblog4cxx.so
# Install all dependencies as ubuntu:trusty (in moveit directory)
$ rosdep install --from-paths src --ignore-src --rosdistro indigo -y --os=ubuntu:trusty
# Now we have installed every package required by moveit, but they are compiled for ubuntu trusty.
# Everything might work for raspbian jessie (debian jessie) too, but to be sure, I compiled every package myself in the next steps.
# Find all installed packages from trusty, that are not in jessie.
$ aptitude search -F '%p' '?narrow(?installed,?narrow(?archive(trusty),?not(?archive(jessie))))' > trusty-packages
# Remove all trusty packages:
$ cat trusty-packages | xargs sudo apt-get remove --purge -y
# Install build dependencies, that are not already mentioned in trusty-packages (and don't start with "ros-"):
$ sudo apt-get install libcppunit-dev libmongo-client-dev
# Install python module for sorting package dep order
$ sudo apt-get install python-toposort
# Small python script to order the packages with their dependencies:
$ cat depsort.py
#!/usr/bin/python2
import sys
from toposort import toposort_flatten
graph={}
for line in sys.stdin:
if len(line.split()) == 2:
a,b = line.split()[0], line.split()[1]
elif len(line.split()) == 1:
a,b = line.split()[0], None
else:
raise Exception, "Invalid input! Line: \"%s\"" % line
if a not in graph:
graph[a] = {b}
else:
graph[a].add(b)
for line in toposort_flatten(graph):
if line != None:
print line
# Generate sorted package list:
$ cat trusty-packages | while read pkg
do
echo $pkg
for i in $(apt-cache showsrc "$pkg" | grep '^Build-Depends:' | grep -oE "ros-[-a-z0-9]*")
do
echo $pkg $i
done
for i in $(apt-cache show "$pkg" | grep '^Depends:' | grep -oE "ros-[-a-z0-9]*")
do
echo $pkg $i
done
done | ./depsort.py > sorted-trusty-packages
# Filter out installed packages (if something goes wrong when building/installing and you like to continue where you left off)
# Because ros-indigo-rviz needs a patch to build, leave it out for now.
$ cat sorted-trusty-packages | while read pkg
do
if [ "$pkg" != "ros-indigo-rviz" ]
then
dpkg -s $pkg 2>&1 | grep -E "^Status:.*installed" >/dev/null || echo $pkg
fi
done > filtered-sorted-trusty-packages
# Build packages and install them:
$ cat filtered-sorted-trusty-packages | while read pkg
do
echo "####Building: $pkg"
apt-get source -b $pkg
echo "####Installing: $pkg"
sudo dpkg -i "$pkg"*"deb"
done 2>&1 | tee -a build.log
# ros-indigo-rviz cannot be build
# get it:
$ apt-get source ros-indigo-rviz
$ cd ros-indigo-rviz-1.11.14
# Apply this patch:
--- ros-indigo-rviz-1.11.14.orig/src/rviz/mesh_loader.cpp
+++ ros-indigo-rviz-1.11.14/src/rviz/mesh_loader.cpp
@@ -67,6 +67,14 @@
#include <assimp/IOSystem.h>
#endif
+# ifdef __arm__ // fix for ARM build
+#include <strings.h>
+bool Assimp::IOSystem::ComparePaths(const char *p1, const char *p2) const
+{
+ return !::strcasecmp(p1, p2);
+}
+# endif
+
namespace fs = boost::filesystem;
namespace rviz
$ dpkg-source --commit
$ dpkg-buildpackage -uc -us
$ sudo dpkg -i ../ros-indigo-rviz_1.11.14-0trusty_armhf.deb
# Navigate to moveit project directory
# Apply this patch: (I have commit f91d87c329b14 of src/moveit_ros/visualization, might not be necessary in your checkout)
--- src/moveit_ros/visualization/CMakeLists.txt
+++ src/moveit_ros/visualization/CMakeLists.txt
@@ -86,4 +86,5 @@ install(FILES python/moveit_ros_visualization/moveit_joy.py DESTINATION ${CATKIN
install(DIRECTORY icons DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
+find_package(rostest REQUIRED)
add_rostest(test/moveit_joy.test)
# Enter moveit directory and compile and install moveit:
$ sudo -s
$ source /opt/ros/indigo/setup.bash
$ catkin_make_isolated --install -DMAKE_BUILD_TYPE=Release --install-space /opt/moveit/indigo -j2