Ask Your Question
0

Deploy ROS package

asked 2016-09-05 09:09:25 -0500

metRo_ gravatar image

Hello,

Right now each developer that wants to test the code he developed need to go to the robot, pull the last changes from git, catkin_make and run the nodes. This process take a lot of time.

We are trying to fix this. Our first approach was to use scp to copy devel folder to the robot however there are paths that doesn't match on the robot.

I read about catkin_make install but the result files on install folder also have absolute paths used on my computer.

How can I achieve this?

Developer computer and robot computer have the same hardware.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-09-05 13:42:39 -0500

ahendrix gravatar image

ROS uses absolute paths to find workspaces; there isn't a way to change that, but there are lots of workaround.

Depending on how your repository is structured and how many robots you have, there are a few ways you can do this:

  • If your codebase has lots of small repositories, have you developers set up an overlay workspace on the robot, and only checkout and build the packages they're actually testing.
  • Give each developer an account on the robot that exactly matches their account on the development machine, so that the paths are the same.
  • You can change the install path for catkin_make install so that it installs to a different path, and then transfer that directory to the same place on the robot; for example install to /opt/local/ros and then copy that directory to the robot. You'll still have absolute paths, but they'll match on the developer's machine and the robot.
  • Build in docker (or some other kind of container) and then transfer that container to the robot.
  • If you have lots of robots and want to test or deploy to all of them, consider setting up an apt repo and running a system like buildbot-ros to produce binary packages

And there lots of variations on these approaches.

edit flag offensive delete link more

Comments

Thank you :)

I have tried catkin_make install to /opt however there are paths to /home/user/catkin :s

metRo_ gravatar image metRo_  ( 2016-09-06 09:24:53 -0500 )edit

catkin_make install shouldn't leave any paths to other parts of the file system, unless there's some kind of problem or bug. I suggest that you try to narrow down the problem to a small example and then ask a new question, and give the specific commands and CMakeLists.txt that reproduces your issue.

ahendrix gravatar image ahendrix  ( 2016-09-07 12:41:42 -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

1 follower

Stats

Asked: 2016-09-05 09:09:25 -0500

Seen: 773 times

Last updated: Sep 05 '16