Ask Your Question
1

Sourcing workspace generated by a catkin_make install

asked 2016-03-24 12:50:55 -0500

autonomy gravatar image

updated 2016-03-24 14:27:50 -0500

I'm trying to distribute a binary version of my package. I have the catkin_make install command create the install directory in the right place and copy the required libs. The contents of the install directory are as follows:

include

(contains exported packages with generated header files for messages)

lib

(contains 3rd party dependencies as well as exported packages with executables)

share

(contains exported packages with misc. files such as package.xml)

My problem is that when I copy this directory to a new computer, I can't use ROS to run anything from it. I tried doing the following on the new machine within the distributed install directory:

  • Create a src directory
  • Run catkin_init_workspace
  • Run catkin_make to generate the devel and build directories
  • Source the generated devel/setup.bash script

rosrun my_package my_package_node still doesn't find my package. What can I do to get ROS to see my installed packages the way packages in /opt/ros/indigo work?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-03-24 13:14:31 -0500

William gravatar image

You cannot use the devel folder as a redistributable, as it also references the src folder. Do this instead:

  • create a src directory (and fill it with your code)
  • run catkin_make install (catkin_init_workspace isn't necessary as catkin_make will do it implicitly)
  • copy/archive the install folder and move it to a new computer

And it should work so long as you have any dependencies that were not in the workspace installed.

edit flag offensive delete link more

Comments

That's essentially what I did (catkin_make_install and copied the install directory). But I can't use rosrun/roslaunch with my install folder on the new computer - it doesn't find the packages/launch files.

autonomy gravatar imageautonomy ( 2016-03-24 13:33:07 -0500 )edit
1

It is catkin_make install not catkin_make_install and your question doesn't describe the install folder at all... If you're copying the install folder and it still isn't working then we'll need more information. Did you source the setup file in the install folder after copying it over?

William gravatar imageWilliam ( 2016-03-24 14:46:57 -0500 )edit

Well yeah, it's a typo, there's no such command as catkin_make_install. And what do you mean my question "doesn't describe the install folder" - is it supposed to be different from what I did list? Mine only contains include, lib, and share directories. There is no setup file anywhere.

autonomy gravatar imageautonomy ( 2016-03-24 15:09:41 -0500 )edit

Your question only mentions the devel folder, which is not the same as the install folder.

William gravatar imageWilliam ( 2016-03-24 15:25:50 -0500 )edit

"Source the generated devel/setup.bash script"

William gravatar imageWilliam ( 2016-03-24 15:26:02 -0500 )edit

If your install folder doesn't contain a setup.*sh file then I'd have to guess your workspace doesn't contain a catkin package.

William gravatar imageWilliam ( 2016-03-24 15:28:20 -0500 )edit

Yeah, my install folder does not contain anything but include, lib, and share dirs. I'm attempting to generate the devel dir and setup.bash scripts by running catkin_init_workspace in the install directory on the new machine. So you think my package is not catkinized correctly?

autonomy gravatar imageautonomy ( 2016-03-24 15:45:30 -0500 )edit

If your install space has no setup.bash, then it was never created correctly.

joq gravatar imagejoq ( 2016-03-24 16:16:27 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-03-24 12:50:55 -0500

Seen: 677 times

Last updated: Mar 24 '16