ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

What to do after cross-compiling source with catkin?

asked 2013-08-05 06:13:32 -0600

lboltzmann gravatar image

updated 2014-01-28 17:17:33 -0600

ngrennan gravatar image

Hi all,

I've completed a cross-compilation of the ROS source using catkin. Everything seems to be good to go, but now I'm confused about the next step. I have a build, devel and install directory as a result of the build process. Does the install directory contents go on the target? It appears that the bash and python scripts are set to target the same directory that the catkiin workspace was using for the build process. I'm just not positive of the next step.

The basic question is "what is the next step to move the cross-compilation to the target system?"

Is there documentation or a tutorial that covers this?

Thanks,

Marcus

edit retag flag offensive close merge delete

Comments

Hello, Marcus I'm attempting to cross-compile ROS groovy to my target (arm9 - www.opencontroller.com/modules.html). But I've had some problems to compile python and log4cxx. Can you explain how you do that? I've read a lot of tutorials, but some errors appeared. Now, just about ROS's cross-compilation, can you do some simple tutorial, mainly how to use the rostoolchain and CMakelist? Thanks so much. Cássio

Cássio gravatar image Cássio  ( 2013-08-22 06:59:52 -0600 )edit

@Cassio: this should probably be a separate question, but check first to see if it has already been answered.

joq gravatar image joq  ( 2013-08-22 07:07:31 -0600 )edit

Hi joq, I've already checked and had I haven't find any tutorial about cross compilation step by step to cross compile ROS groovy with catkin. thanks

Cássio gravatar image Cássio  ( 2013-08-22 07:18:01 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2013-08-05 23:07:53 -0600

Miguel S. gravatar image

updated 2013-08-05 23:10:34 -0600

You are very close. In principle, you just need to move the install directory to your target machine and assuming everything was properly compiled (and you have installed the dependencies in your target machine) then everything would work.

The problem is that the installation will inevitably have some harcoded paths, so you need to make sure that the install directory in your compile machine is the same as in your target machine.

The easy was to do this is to install to somewhere in opt, (eg. /opt/ros_xc), opt is great for this sort of thing as most linux distros expect to have optional software there.

To change the default installation directory just go to your catkin workspace and issue:

rm -rf build devel install # Make sure we start with a clean install
catkin_make -DCMAKE_INSTALL_PREFIX=/opt/ros_xc # /opt/ros_xc can be chaged to something else
cd build/
make install # You may need sudo in front of this command

Note I've avoided the standard ros installation directory, if you want to install to /opt/ros/distro/ and you have ROS already installed in your compiling machine you'll need to setup a chroot.

You may also have problems with permissions once you move to the target machine, if so just make sure everything is owned by root:

chown -R root:root /opt/ros_xc # May need sudo in front, directory may change.

Good luck!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-05 06:13:32 -0600

Seen: 1,218 times

Last updated: Aug 05 '13