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

Confusion system/rosdep/rosmake/catkin

asked 2016-09-24 03:42:03 -0500

gnurf gravatar image

I'm trying to use a package for which I suspect instructions are outdated, so I need a solid understanding of the process. However, even after following some ROS tutorials, I'm still confused. I'm on Linux (Mint), so in my view, there are 2 things:

  • files installed via apt, system-wide (can go wherever: /etc, /opt, and more ...) and requiring sudo.
  • files contained inside the folder designed as "catkin worspace", owned by my personal user

I have a hard time understanding:

  • whether when I "sudo apt-get install ros-something", that something is immediately runnable, or needs additional building
  • what "rosdep install" is supposed to do: it does not seem to require root, so where does it write things ?
  • what "rosmake" is supposed to do: idem, does not seem to require root, but does not seem to interact with the catkin workspace either

Any clarifications would be greatly appreciated !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-24 05:26:39 -0500

gvdhoorn gravatar image

updated 2016-09-24 05:31:01 -0500

  • whether when I sudo apt-get install ros-something, that something is immediately runnable, or needs additional building

In general: yes, all binary artefacts in the debian pkgs can be used immediately, no further steps required. The debian pkgs generated by the ROS buildfarm are no different from the other debs that you install via apt-get (or the Software Center, or Synaptic, or ..): they contain programs and libraries.

Other files (urdfs, xacros, msgs) can also be used 'directly', although those are typically used as parts of other programs / applications, so it depends a bit on how you'd define 'directly'.

  • what "rosdep install" is supposed to do: it does not seem to require root, so where does it write things ?

From wiki/rosdep:

rosdep is a command-line tool for installing system dependencies.

So rosdep installs system dependencies: things that ROS packages can depend on, but are not ROS packages themselves (mostly libraries, but also entire external programs or files).

From rosdep -h:

rosdep install <stacks-and-packages>...
  generate a bash script and then execute it.

That is a bit cryptic, but it does provide a hint as to why rosdep itself does not "require root": rosdep only generates a script which contains (on Ubuntu at least) sudo apt-get install .. lines that install the system dependencies mentioned earlier. Obviously, installing things does require super user rights, hence the sudo.

As resolving dependencies in itself does not require super user rights (it's just looking up some things in a database), asking for them is postponed until apt-get actually needs them.

  • what "rosmake" is supposed to do: idem, does not seem to require root, but does not seem to interact with the catkin workspace either

rosmake is a build driver: it starts other programs in a specific order (dictated by pkg dependencies) that results in your packages being build correctly. It does not start gcc (or whatever compiler is used) by itself, but delegates that to (GNU) make. As a typical workspace build does not require super user rights, rosmake does not need them either (rosbuild does not really have an "install" concept, but if it would've had one, installing system-wide would've required additional access rights).

If you need rosmake to change things in locations not writeable by your user, then it of course needs additional rights, which it might get through running it as the super user. But in general this is not recommended, most of the times not needed and thus not really used.

Note that rosmake is part of the old rosbuild build environment, which was replaced by catkin. Both are essentially CMake wrappers, that add some convenience macros/functions to CMake to make it easier to work with ROS packages and collections of packages (ie: workspaces). You can still use it on modern ROS distributions, but there are some restrictions (such as Catkin packages not being able to depend on rosbuild packages). If the old instructions told you to use rosmake, that should still work, but it'd probably ... (more)

edit flag offensive delete link more


Thanks, that clarifies a bit. Now I'm confused about launching a node with parameters. I apt-installed some package containing a binary, and can run the binary with "rosrun pack_name bin_name", but I need to give it particular parameters. I tried adding them to the rosrun command line ...

gnurf gravatar image gnurf  ( 2016-09-24 07:03:55 -0500 )edit

... but it is unclear to me whether I should use param:=value or _param:=value. Also parameters seem to be remembered somewhere across runs, which is not what I want. I also tried using .launch files, but it seems to require "roslaunch" instead of "rosrun", which seems too much

gnurf gravatar image gnurf  ( 2016-09-24 07:03:59 -0500 )edit

(it's like it is starting a new core or something, hiding the output in log files, ... whereas I just want to launch one node).

gnurf gravatar image gnurf  ( 2016-09-24 07:04:09 -0500 )edit

That sounds like something unrelated to your initial questions(s). Please open a new question for that, after having made sure that none of the existing ones already deal with your issue (Google with works well).

gvdhoorn gravatar image gvdhoorn  ( 2016-09-24 07:12:46 -0500 )edit

Question Tools

1 follower


Asked: 2016-09-24 03:42:03 -0500

Seen: 605 times

Last updated: Sep 24 '16