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

Revision history [back]

click to hide/show revision 1
initial version

My understanding is that "stack and packages" are ROS packages that are on your ROS_PACKAGE_PATH. By default RPP just points to your ROS installation so you'd expect to already have all the dependencies of those packages installed. So if there is no package.xml on your RPP with the name you request, commands like rosdep install will return "resource missing"

By opposition "rosdeps" are things that are in your rosdep cache, they can be rosdep keys for system dependencies or ROS package names that are released in a given rosdistro.

When to use rosdep install <package_name> ?

Disclaimer: It's unclear to me what the correct ROS2 way of using it is as ROS2 it's not supposed to rely on RPP but AMENT_PREFIX_PATH instead (https://github.com/ros-infrastructure/rosdep/issues/724)

rosdep install <package_name> comes in handy when you have an entire workspace of cloned repositories but you only want to install the dependencies of some packages.

So if you have a workspace with let's say the rviz2 and the navigation2 repositories but want to install only the dependencies of the package named rviz2, you'll - add your ws directory to the RPP

export ROS_PACKAGE_PATH=/my/ws:$ROS_PACKAGE_PATH

- install rviz2 dependencies

rosdep install rviz2

This will install the dependencies of the package names rviz2 but not the others.

If you run the same command but adding --from-paths /my/ws it will install all the deps of the workspace

My understanding is that "stack and packages" are ROS packages that are on your ROS_PACKAGE_PATH. By default RPP just points to your ROS installation so you'd expect to already have all the dependencies of those packages installed. So if there is no package.xml on your RPP with the name you request, commands like rosdep install will return "resource missing"

By opposition "rosdeps" are things that are in your rosdep cache, they can be rosdep keys for system dependencies or ROS package names that are released in a given rosdistro.

When to use rosdep install <package_name> ?

Disclaimer: It's unclear to me what the correct ROS2 way of using it is as ROS2 it's not supposed to rely on RPP but AMENT_PREFIX_PATH instead (https://github.com/ros-infrastructure/rosdep/issues/724)

rosdep install <package_name> comes in handy when you have an entire workspace of cloned repositories but you only want to install the dependencies of some packages.

So if you have a workspace with let's say the rviz2 and the navigation2 repositories but want to install only the dependencies of the package named rviz2, you'll - add your ws directory to the RPP

export ROS_PACKAGE_PATH=/my/ws:$ROS_PACKAGE_PATH

- install rviz2 dependencies

rosdep install rviz2

This will install the dependencies of the package names rviz2 but not the others.

If you run the same command but adding --from-paths /my/ws it will install all the deps of the workspace

Edit: there are likely other use cases for it but that's the only case I ever had to use rosdep install without --from-paths

My understanding is that "stack and packages" are ROS packages that are on your ROS_PACKAGE_PATH. By default RPP just points to your ROS installation so you'd expect to already have all the dependencies of those packages installed. So if there is no package.xml on your RPP with the name you request, commands like rosdep install will return "resource missing"

By opposition "rosdeps" are things that are in your rosdep cache, they can be rosdep keys for system dependencies or ROS package names that are released in a given rosdistro.

When to use rosdep install <package_name> ?

Disclaimer: It's unclear to me what the correct ROS2 way of using it is as ROS2 it's not supposed to rely on RPP but AMENT_PREFIX_PATH instead (https://github.com/ros-infrastructure/rosdep/issues/724)

rosdep install <package_name> comes in handy when you have an entire workspace of cloned repositories but you only want to install the dependencies of some packages.

So if you have a workspace with let's say the rviz2 and the navigation2 repositories but want to install only the dependencies of the package named rviz2, you'll - add your ws directory to the RPP

export ROS_PACKAGE_PATH=/my/ws:$ROS_PACKAGE_PATH

- install rviz2 dependencies

rosdep install rviz2

This will install the dependencies of the package names rviz2 but not the others.

If you run the same command but adding --from-paths /my/ws it will install all the deps of the workspace

Edit: there are likely other use cases for it but that's the only case I ever had to use rosdep install without --from-paths

Edit 2: an alternative I use often for ROS 2 when I have the full ros2.repos cloned but want to install only the dependencies I need for my build is to ask colcon to give me the list of paths. E.g. the following command allows me to install all the dependencies to build rviz2 and it's' dependencies

rosdep install -y --from-paths `colcon list --packages-up-to rviz2 -p` --ignore-src
colcon build --packages-up-to rviz2