ROS Kinetic on Slackware 14.2

And this will actually result in:

  • working Gazebo
  • working rviz, rqt
  • working roscore

Not bad? So, let us go:

(if in doubt OR you have an error on the way – see Slackware 14.1 and the tricks used there)

wget https://github.com/sbopkg/sbopkg/releases/download/0.38.1/sbopkg-0.38.1-noarch-1_wsr.tgz
installpkg sbopkg-0.38.1-noarch-1_wsr.tgz
sbopkg -i "pip ffmpeg x264"

umm… those two are important, really! … for a working youtube 🙂

This time I start with a gazebo:

hg clone https://bitbucket.org/osrf/sdformat
cd sdformat/
mkdir build && cd build && make && make install

Ohh, missing packages. So fetch some:

pip install psutil
sbopkg -i tinyxml
sbopkg -i tinyxml2

Btw. this works perfectly now:

sbopkg -i ogre

And zmq:

git clone https://github.com/zeromq/libzmq
cd libzmq/
mkdir build && cd build && cmake ../ && make && make install

Now get ready for ign-transport:

hg clone https://bitbucket.org/ignitionrobotics/ign-math
cd ign-math/
mkdir build && cd build && cmake ../ && make && make install
cd ../..
hg clone https://bitbucket.org/ignitionrobotics/ign-tools
cd ign-tools/
mkdir build && cd build && cmake ../ && make && make install
cd ../..
hg clone https://bitbucket.org/ignitionrobotics/ign-msgs
cd ign-msgs/
mkdir build && cd build && cmake ../ && make && make install
sbopkg -i protobuf
hg clone https://bitbucket.org/ignitionrobotics/ign-transport
cd ign-transport/
mkdir build && cd build && cmake ../ && make && make install
cd ../..
wget https://archive.org/download/zeromq-3.2.5/zeromq-3.2.5.tar.gz
tar -xzf zeromq-3.2.5.tar.gz
cd zeromq-3.2.5
./configure && make && make install

I was a bit confused, so I re-did:

cd ../libzmq/
cd build
make install

just in case… oh, and:

git clone https://github.com/zeromq/cppzmq
cd cppzmq/
cp *.hpp /usr/local/include/

Now do the sdformat

cd sdformat/
cd build && cmake ../ && make -j4  && make install

Yeah, -j4, I lost my patience (and started watching youtube on a laptop, so I can max out all cores)

Ok, what Gazebo needs? If I remember correctly from 14.1:

sbopkg -i hdf5
wget https://github.com/flexible-collision-library/fcl/archive/0.4.0.tar.gz
tar -xzf 0.4.0.tar.gz 
cd fcl-0.4.0/
mkdir build && cd build/ && cmake ../

Ok, what am I missing?

sbopkg -i libccd
cd ../..
git clone https://github.com/danfis/libccd
cd libccd
mkdir build && cd build && cmake ../ && make -j4 && make install

Ok, let us redo the fcl:

cd ../../fcl-0.4.0/
cd build && cmake ../ && make -j4 && make install

Hmm, simbody time?

git clone https://github.com/simbody/simbody
cd simbody/
mkdir build && cd build && cmake ../

Daaaaaamn

sbopkg -i blas
sbopkg -i lapack

Should be fine now:

cmake ../ && make && make -j4 && make install

What else for gazebo?

sbopkg -i FreeImage
sbopkg -i tbb
wget http://pocoproject.org/releases/poco-1.7.5/poco-1.7.5.tar.gz
tar -xzf poco-1.7.5.tar.gz 
cd poco-1.7.5
./configure && make -j4 && make install

And the final few:

sbopkg -i libtar
sbopkg -i qwt

Now the correct version of transport:

hg clone -b ign-transport1 https://bitbucket.org/ignitionrobotics/ign-transport
cd ign-transport
mkdir build && cd build && cmake ../ && make -j4 && make install

And gazebo itself:

hg clone https://bitbucket.org/osrf/gazebo
cd gazebo
mkdir build && cd build && cmake ../ && make -j4 && make install

should be alright.

You may wanna do an ldconfig somewhere here, I got weird noises from libraries at my first try of building gazebo:

ldconfig

Ok, now for ROS:

git clone https://github.com/google/googletest
cd googletest/
mkdir build && cd build && cmake ../ && make -j4 && make install

On Slack 14.2 you don’t need to do funky stuff to get PyQt5 in place for python2:

wget http://www.slackware.com/~alien/slackbuilds/qt5/pkg64/14.2/qt5-5.6.1_1-x86_64-1alien.txz
installpkg qt5-5.6.1_1-x86_64-1alien.txz 
sbopkg -i PyQt5

(did I do qt5-webkit? I don’t know…)

Pyside and shiboken: (strangely I did pyside1… is it even really needed?!)
git clone https://github.com/pyside/shiboken
cd shiboken/
mkdir build && cd build/ && cmake ../ && make -j4 && make install
cd ../..
git clone https://github.com/pyside/pyside
cd pyside/
mkdir build && cd build && cmake ../ && make -j4 && make install

Now prepare a folder for ros:

(be sure to do as root)
pip install -U rosdep rosinstall_generator wstool rosinstall
rosdep init

Now I will try not to get greedy too soon, let me try to install basic ROS-comm only version:

rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall
wstool init -j1 src kinetic-ros_comm-wet.rosinstall
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

and in case you get stuck for example at roscore:

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --from-pkg roscore

Prepare for the test:

mkdir ros-test1
cd ros-test1
source ~/ros_random/ros_comm/devel_isolated/setup.bash
catkin_init_workspace

No defusedxml? Whoah?

pip install defusedxml
pip install netifaces

Trying out:

bash-4.3$ roscore
... logging to /home/anil/.ros/log/882c6006-7bea-11e6-b2c2-20cf303cf4e3/roslaunch-inverse-11065.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is

seems good? Ok, communication is up and running, gazebo works, so time to try the ROS desktop edition.


Ros desktop (recommended), in short: start with obvious requirements:

sbopkg -i qhull
wget http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-1.8.4-src.zip
unzip flann-1.8.4-src.zip
cd flann-1.8.4-src
mkdir build && cd build && cmake ../ && make && make install
sbopkg -i VTK
it clone https://github.com/PointCloudLibrary/pcl
cd pcl
mkdir build && cd build && cmake ../ && make -j4 && make install

And try:

rosinstall_generator desktop --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-wet.rosinstall
wstool init -j1 src kinetic-desktop-wet.rosinstall
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

and in case you get stuck for example at roscore:

./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --from-pkg roscore

Ha! Got it! Got stuck AND made it through in a correct way!

when building qt_gui_cpp you get an error:

/usr/share/sip/PyQt5/QtCore/qregularexpression.sip:26:32: fatal error: qregularexpression.h: No such file or directory
compilation terminated.

It is caused by calling qmake instead of qmake-qt5 in … guess what! src/python_qt_binding
Yeah, didn’t see that one coming!
Inside the src/python_qt_binding/cmake/sip_configure.py there is:

env['QT_SELECT'] = '5'
qtconfig = subprocess.check_output(
    ['qmake', '-query'], env=env, universal_newlines=True)

a hard call to qmake with no version checking? that’s a scary fucked up code…
Substitue qmake with qmake-qt5 for now (duct tape fix)

qtconfig = subprocess.check_output(
    ['qmake-qt5', '-query'], env=env, universal_newlines=True)

You now have to redo a couple of packages that rely on python_qt_binding (grep -r -l “python_qt_binding” src/):

python_qt_binding
qt_gui
qt_gui_cpp
qt_dotgraph
qt_gui_py_common
joint_state_publisher
rqt_gui
rviz
...

and so on, most of them haven’t been started yet, the rest – delete them from build_isolated and go again from the start to be sure.
Oh, and I checked – that’s the only file that calls qmake directly, the rest configures properly.


Btw. don’t forget about:

sbopkg -i opencollada
sbopkg -i collada-dom

Just in case, if you get:

src/robot_model/collada_parser/src/collada_parser.cpp:45:17: fatal error: dae.h: No such file or directory

you added opencollada and collada-dom after compile error from collada-parser? Delete build_isolated/collada_parser and do it again – will work this time.


pip install numpy

(crickets)


rviz/yaml_config_reader.cpp:36:27: fatal error: yaml-cpp/node.h: No such file or directory

Hmm, he doesn’t shout it too clearly, but I don’t have this one:

sbopkg -i yaml-cpp

and delete build_isolated/rviz before retrying


Oh, I’m done? Time to be brave:
running rviz or rqt:

This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.

so?

hmm:

locate libqxcb.s
cd /usr/lib64/qt5/plugins/platforms
ldd libqxcb.so

oh:

        libxkbcommon-x11.so.0 => not found
        libxkbcommon.so.0 => not found

so let me correct the mistake:

sbopkg -i xkbcommon

and to be sure:

ldd libqxcb.so | grep "not found"

seems ok now, back to testing:

FULL TEST:

1st console:

mkdir ros-test-desktop1
cd ros-test-desktop1
source ~/ros_random/ros_desktop/devel_isolated/setup.bash
catkin_init_workspace
roscore

OUTPUT:

... logging to /home/anil/.ros/log/b5bceaea-7c9e-11e6-9641-20cf303cf4e3/roslaunch-inverse-14848.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is

2nd console:

cd ros-test-desktop1
source ~/ros_random/ros_desktop/devel_isolated/setup.bash
rviz

OUTPUT:

[ INFO] [1474093245.233130188]: rviz version 1.12.1
[ INFO] [1474093245.233739559]: compiled against Qt version 5.6.1
[ INFO] [1474093245.233759902]: compiled against OGRE version 1.9.0 (Ghadamon)
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ INFO] [1474093246.550553427]: Stereo is NOT SUPPORTED
[ INFO] [1474093246.550776178]: OpenGl version: 4.5 (GLSL 4.5).
libpng warning: iCCP: known incorrect sRGB profile

and a beautiful window with GUI! rqt works too, gazebo shows up properly… that was a busy 5-day run and lots of coffee!

Have fun repeating it, if you are brave enough 🙂

One comment

  1. Thanks! I got tripped up on the qregularexpression.h part on Fedora and managed to get past it with this.

Comments are closed.