Ask Your Question
0

How to build a package from source?

asked 2015-06-08 19:26:06 -0600

rubenvm gravatar image

updated 2015-06-08 19:29:09 -0600

Hi! I've recently installed the ROS indigo desktop version in my raspberry PI 2, running the last version of Raspbian (following the tutorial http://wiki.ros.org/ROSberryPi/Instal... ). I've installed all properly. Now I'm trying to install new packages from source in the ROS file system, but I don't understand exactly what I have to do to get it. The package I'm trying to install is ros3djs ( http://wiki.ros.org/ros3djs ). The steps I've followed are the next:

1- $ cd ~/ros_catkin_ws/src

2- $ git clone https://github.com/RobotWebTools/ros3djs.git

Once I have the package downloaded in the src folder, I don't know exactly what I should do. In the installation of ROS tutorial comes the next command to invoke catkin_make_isolated:

$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo

but it makes all the workspace to be compiled again and it takes a lot of time, so what I should do? I want to compile only the new packages I add. Being on the ros_catkin_ws folder, I've tried the next:

3- $ catkin_make --pkg ros3djs

But I get the next message:

Packages "ros3djs" not found in the workspace

I've also tried the catkin_make_isolated:

3- $ catkin_make_isolated --pkg ros3djs

Packages not found in the workspace: ros3djs

I don't understand very well the structure ROS have to add new packages. Could someone give me any suggestion? Thank you very much!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-06-08 19:41:23 -0600

Tom Moore gravatar image

updated 2015-06-09 09:12:57 -0600

Try this:

$ cd ~/ros_catkin_ws/src
$ git clone https://github.com/RobotWebTools/ros3djs.git
$ cd ~/ros_catkin_ws
$ catkin_make -DCMAKE_BUILD_TYPE=Release
$ source ~/ros_catkin_ws/devel/setup.bash

Note that I don't know anything about the package in question, but that should work.

EDIT: Just looked at the GitHub repo. The package you are trying to use is not a catkin package. See this page:

http://wiki.ros.org/ROS/Tutorials/catkin/CreatingPackage

Every catkin package needs, at minimum, a CMakeLists.txt file and a package.xml file. This repo appears to have neither.

For build instructions, see the repo's README.md file.

edit flag offensive delete link more

Comments

Yes, you are right, I have installed that following the instructions given. But the main problem is that I have 188 packages aproximately within the src folder, so when I want to add a single package the catkin_make command make it to compile everything, which takes a lot of time in raspberry.Thanks

rubenvm gravatar imagerubenvm ( 2015-06-09 09:29:33 -0600 )edit

You should create different workspaces depending on what you need or install the files you use (in opt for example) and overlay workspaces with your projects. Workspace Overlaying

Progtologist gravatar imageProgtologist ( 2015-06-09 15:37:35 -0600 )edit

Thank you very much! It is just what I was looking for! Thank you all for your help

rubenvm gravatar imagerubenvm ( 2015-06-10 04:03:25 -0600 )edit
0

answered 2015-06-09 02:57:04 -0600

rubenvm gravatar image

updated 2015-06-09 11:11:18 -0600

I've tried the command which comes in the tutorial for raspberry pi:

$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo

But as I said before, It starts to compile the whole workspace (almost 200 packages). The raspberry pi is working well, but when it has got over 1 hour compiling, it crashes, I think it is due to the magnitude of the compiling process. So it is the reason I'm looking for the way to compile only the package I add. It's the message I get when it crashes.

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3421.941692] Internal error: Oops: 817 [#1] PREEMPT SMP ARM

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.021250] Process kswapd0 (pid: 35, stack limit = 0xb9ad2238)

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.027178] Stack: (0xb9ad3d40 to 0xb9ad4000)

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.031542] 3d40: 8004bb4c 805257e8 00000001 b9ad3d80 b9ad3d84 b9ad2000 00000001 b9bd56b0

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.039711] 3d60: accb021f 0000031c b9bd5740 00000016 00000000 00000000 0000006a 941a19bc

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.047880] 3d80: accb021f 0000031c a91d7be0 b6a221a0 b9ad3dac 00000000 000036a0 00000080

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.056067] 3da0: b9bd5000 b9bd5690 000000a5 807b2b94 b9ad3dec b9ad3dc0 801fc1d4 801fbcdc

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.064243] 3dc0: 000036a0 00000000 00000000 b9bd5690 00000080 b9ad3efc 00000080 000000a5

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.072411] 3de0: b9ad3e6c b9ad3df0 800fc2e8 801fc0f4 00000001 b980cb40 00000004 8080f784

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.080580] 3e00: b9ad3e2c b9ad3e10 8003a2ec 800cb4d0 b9804490 b9804498 000002ec 000002af

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.088751] 3e20: 00000000 b9ad3e30 00000149 00033f31 00000000 0000007a 000036a0 00000000

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.096918] 3e40: b9ad3e9c b9ad3efc 00000000 00000149 00033f31 807e9410 00000000 b9bd5690

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.105086] 3e60: b9ad3e9c b9ad3e70 800fcbb8 800fc14c 00000001 8080f480 00000000 00000000

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.113256] 3e80: 00000000 00000000 00000000 b9ad3ef4 b9ad3f5c b9ad3ea0 80100388 800fcaf8

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.121424] 3ea0: 805214ac 8004684c 55555555 00000047 807b2b9c 807b2ba0 b994d640 8080fd44

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.129592] 3ec0: 00000000 8080fd48 00033f31 00000000 b9ad3f0c 00000000 b9ad2020 00000001

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.137760] 3ee0: b9ad2000 00000000 00000000 8080f480 55555555 00000000 00000000 000000d0

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.145927] 3f00: 00000080 00000001 00000000 00000c00 000000d0 00000000 00000000 00000000

Message from syslogd@raspberrypi at Jun 9 17:39:34 ... kernel:[ 3422.154112] 3f20: 00000003 00000007 ...

(more)
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

Stats

Asked: 2015-06-08 19:26:06 -0600

Seen: 2,194 times

Last updated: Jun 09 '15