Ask Your Question
2

Deploying a catkin package

asked 2016-02-14 06:13:09 -0600

sai gravatar image

Hi, I would like to deploy a catkin package that is built on machine A onto machine B. The tutorials on using catkin over rosbuild highlight that catkin is advantageous in this regard.

Could someone elucidate how to do this. I see that the executables are in catking_ws/devel/lib/package/executable

  1. Firstly, is it must to have ROS on machine B ? Considering ROS is not present, which files do we need to copy to get the executable to run

  2. Considering that we have ROS on machine B, how can we get the packages built on machine A to work on machine B ? Specifically, which folders to copy and things like that. In this case, how can we have ROS functionalities such as rosrun etc.

Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-02-15 13:31:32 -0600

lucasw gravatar image

updated 2016-02-15 18:25:03 -0600

Regarding 1, if you build your binaries with no dependencies on ros libraries they will run anywhere that does have compatible non-ros libraries that they are dependent on and same architecture like mentioned by @joq.

Unless you have multiple non-ros dependent catkin packages you want catkin to find for you, find_package(catkin...) would be empty, you wouldn't need to put ${catkin_LIBRARIES} in the target_link_libraries, and you would find your other libs with standard cmake find_packages. And of course you couldn't use rosrun to launch the binaries on the other machine, just run the /path/to/binary directly.

For 2, the build farm http://wiki.ros.org/buildfarm is supposed to provide capabilities for custom building (and distribution?). There is likely a lot more learning curve than catkin_make install + copy binaries.

The ROS build farm is also designed to enable deploying a custom build farm. This can be useful to release closed-source packages, build for platforms and architectures not provided by the official ROS build farm, and/or customize any part of the process to specific needs.

I haven't done this (and it would be fantastic to see tutorials or any more information from anyone who has) but I hope the end stage is that machine B would add a local private server to the deb repositories and then be able to apt-get a binary down into /opt/ros.

There was a presentation at roscon 2015: http://roscon.ros.org/2015/presentati... and https://vimeo.com/142150815

edit flag offensive delete link more
6

answered 2016-02-15 12:03:06 -0600

joq gravatar image

I assume that both machines have the same instruction set architecture and run the same OS. Otherwise, it probably won't work.

  1. Most likely, you do need the same ROS distro installed on both machines, A and B.

  2. The simplest approach is using CMake to install your packages in a location that can be the same on each machine.

    • Define a CMAKE_INSTALL_PREFIX for some location like: /opt/your_ros_install.
    • Run sudo make install to allow installing there.
    • Copy the install directory from machine A to machine B, using scp or tar or some other technique.

To run your installed ROS packages on either machine: source /opt/your_ros_install/setup.bash.

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: 2016-02-14 06:13:09 -0600

Seen: 2,358 times

Last updated: Feb 15 '16