Ask Your Question
0

Explanation of catkin_make install?

asked 2019-08-26 18:07:59 -0500

PapaG gravatar image

updated 2019-08-26 21:49:47 -0500

Hi everyone,

I am trying to create a binary representation of my workspace so that I can transfer just binaries rather than the source. I am able to generate an install directory of my workspace. when I move that install directory to some location other than where it was built, it can't 'find' anything? eg: copyting from ~/ws/ to ~/ then running source ~/install/setup.bash. How do I specify its new location? I believe the error is in the line

: ${_CATKIN_SETUP_DIR:=/home/<user>/ws/install}

of setup.sh or perhaps executable permissions since I have copied them to a new location? Am I suppose to run something else to setup permissions?

EDIT

I have found the problem is in relation to copying the directory from a usb. Is it possible to retain the files characteristics when copying from a USB? I think the problem is pertinent to file permissions.

Thanks, Grant

edit retag flag offensive close merge delete

Comments

edited to reflect my new question.

PapaG gravatar imagePapaG ( 2019-08-26 20:58:01 -0500 )edit

try 'rospack profile' first to let system index your packages..

tianb03 gravatar imagetianb03 ( 2019-08-26 21:24:36 -0500 )edit

@tianb03 what should I be looking for from this command?

PapaG gravatar imagePapaG ( 2019-08-26 21:36:09 -0500 )edit

I do think the issue is with permissions, none of the binaries in the new location have executable permissions

PapaG gravatar imagePapaG ( 2019-08-26 21:39:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-26 22:22:28 -0500

ahendrix gravatar image

ROS and catkin packages need to know the installation path when they are built, so the catkin installation process requires that you specify the installation directory when you run catkin_make install. If you don't specify an installation directory, it defaults to the install directory within your workspace.

You can change the destination directory with -DCMAKE_INSTALL_PREFIX:

$ catkin_make -DCMAKE_INSTALL_PREFIX=/opt/ros/<distro> install

You may want to choose an installation directory like /opt/PapaG that doesn't overlap with the system ROS installation, and then instruct you users to install the files in that directory.

The catkin_make wiki page provides more details and examples of how you can use catkin_make and its install command.

edit flag offensive delete link more

Comments

The issue is due to permissions, I solved it by zipping the entire install folder (zipping just its contents didn't work. Does the actually folder hold some config that is pertinent to the function? zipping it from the workspace, then unzipping it on a new workspace works, doing the same with only the contents of catkin_ws/install does not work?

PapaG gravatar imagePapaG ( 2019-08-27 23:12:06 -0500 )edit

You are correct about permissions; the file permissions need to be preserved when moving the install directory from one computer to another. You can do this with tar, zip, rsync in archive mode, and probably a bunch of other linux tools.

I'm not aware of anything the src, devel, or build folders that is required to run code from the install folder. It would help to see the actual commands that you're using and the error that you're getting.

ahendrix gravatar imageahendrix ( 2019-08-28 00:11:04 -0500 )edit

I was archiving (.tar.gz) all files inside catkin_ws/install/ then unzipping them (using tar) into a newly created folder. all files held their permissions however when I sourced the environment it would not launch anything for me. That being, all files from catkin_ws/install/ now existed inside ~/new/install/.

I instead archived the /install folder inside a .tar.gz from /catkin_ws/. When I unzipped this file into a new directory so that it now represented ~/new/install/, sourcing the environment and roslaunching all works.

PapaG gravatar imagePapaG ( 2019-08-28 00:22:59 -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

3 followers

Stats

Asked: 2019-08-26 18:07:59 -0500

Seen: 28 times

Last updated: Aug 26