0
$\begingroup$

Rosanswers logo

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


Originally posted by lboltzmann on ROS Answers with karma: 38 on 2013-08-05

Post score: 1


Original comments

Comment by Cássio on 2013-08-22:
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

Comment by joq on 2013-08-22:
@Cassio: this should probably be a separate question, but check first to see if it has already been answered.

Comment by Cássio on 2013-08-22:
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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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!


Originally posted by Miguel S. with karma: 1114 on 2013-08-05

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.