Ask Your Question

Getting stuck on ROS for Raspbian Jessie

asked 2017-07-10 23:13:49 -0500

Alsing gravatar image

I am following this tutorial on installing ROS Kinetic on Raspbian Jessie and I got stuck Building the Catkin Workspace.

/etc/dphys-swapfile has been configure to


/sda2 is a 1TB external Hard Disk. It does not have a file "swap.file" though. How should I create it?

free -h

now gives me

                  total       used       free     shared    buffers     cached
Mem:          859M       778M        81M        48M        84M       381M
-/+ buffers/cache:       312M       547M
Swap:         1.0G         0B       1.0G

Running sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j2

causes me to get stuck and terminal shows

[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o
edit retag flag offensive close merge delete


It can take hours to compile OpenCV and PCL. I recommend that you just let it run. Eventually it will finish or run out of memory and crash.

ahendrix gravatar image ahendrix  ( 2017-07-10 23:48:08 -0500 )edit

Hey! Thanks for the prompt reply! Did I do the swap correctly? I did not explicitly create a "swap.file" in sda2. What happens if memory runs out?

Alsing gravatar image Alsing  ( 2017-07-11 00:13:03 -0500 )edit

I'm not sure how dphys-swapfile is supposed to work, but your output from free -h clearly shows 1GB of available swap space, so it's probably working.

ahendrix gravatar image ahendrix  ( 2017-07-11 00:24:34 -0500 )edit

@Alsing: if you have the opportunity, I would really look into cross-compilation combined with distributed compilation. For the latter you could look into distcc. If you have any hosts available, building things like OpenCV and PCL will be much faster than just using the rpi alone.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-11 04:07:46 -0500 )edit

@gvdhoorn Thanks for that suggestion! I might spend the same time figuring out the configuration. @ahendrix gives a very good solution if only I wasn't stuck with an Eigen3 issue. I'll have to figure out that one for now.

Alsing gravatar image Alsing  ( 2017-07-11 04:14:48 -0500 )edit

@ahendrix What happens if it hangs? Should I reboot it or let it be?

Alsing gravatar image Alsing  ( 2017-07-18 03:06:28 -0500 )edit

"hangs" is tricky. It may be working, it just may not show any obvious signs that it's working. I would open another terminal and use top or htop to monitor CPU activity to see if any process is using the CPU heavily, or if many small compile processes are running.

ahendrix gravatar image ahendrix  ( 2017-07-18 03:51:24 -0500 )edit

It would be completely unresponsive, no mouse or keyboard responses. Display wise, I'm stuck on the activity bar showing 99%. Then again, it could be the display not updating, but I really wouldn't know and can't test.

Alsing gravatar image Alsing  ( 2017-07-18 03:58:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-18 03:53:12 -0500

ahendrix gravatar image

As long as you see compile activity, I would let it run. If it seems like it's stuck on a particular process or file, take note of the exact process and file name and check back in a few hours (or overnight) to see if it's still compiling the same file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-07-10 23:13:49 -0500

Seen: 877 times

Last updated: Jul 10 '17