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

Simply cloning a repository just gets you a copy of the sources in that repository. If/whenever a package uses functionality provided by external packages (ie: not found in the same repository), it will search for those dependencies using a find_package(..) call in CMakeLists.txt.

If you don't have those dependencies, CMake will present you with the error messages that you copy/pasted. This makes sense: CMake can't install those for you, so you have to make sure you already have them on your system.

Checking for and installing of dependencies is highly automated in ROS (see also why rosdep instead of others?). After having cloned a repository, run:

rosdep install --from-paths /path/to/your/catkin_ws/src --ignore-src

after you've sourced the appropriate setup.bash. That will scan for packages in the source space of your catkin workspace, gather all dependencies, check you have those on your system, and if any are missing, it will install them (using the platforms package manager).

Note: you only need to do this if you are building things from source. Packages installed through package managers (ie: apt-get, rpm, etc) already have their dependencies resolved by the respective package manager. Always prefer to use the binary packages, if you can. Building from source takes time, wastes effort and, as you discovered, requires special care. The whole point of binary distributions is to be able to avoid this. In a typical ROS workflow, I'd only build a package from source if a) you actually want to do some development on the package itself (ie: not just make use of it), or b) it hasn't been released for your particular platform.

Note 2: this is actually a question that has been asked many times before. I'm pretty certain a search (using either the built-in search or Google) turns up many answers ..

Note 3: don't use rosdep to install the package you are interested in itself. That's not what it's for. It only deals with dependencies.

Simply cloning a repository just gets you a copy of the sources in that repository. If/whenever a package uses functionality provided by external packages (ie: not found in the same repository), it will search for those dependencies using a find_package(..) call in CMakeLists.txt.

If you don't have those dependencies, CMake will present you with the error messages that you copy/pasted. This makes sense: CMake can't install those for you, so you have to make sure you already have them on your system.

Checking for and installing of dependencies is highly automated in ROS (see also why rosdep instead of others?). ROS. After having cloned a repository, run:

rosdep install --from-paths /path/to/your/catkin_ws/src --ignore-src

after you've sourced the appropriate setup.bash. That will scan for packages in the source space of your catkin workspace, gather all dependencies, check you have those on your system, and if any are missing, it will install them (using the platforms package manager).platform's package manager, see why rosdep instead of others?).

Note: you only need to do this if you are building things from source. Packages installed through package managers (ie: apt-get, rpm, etc) already have their dependencies resolved by the respective package manager. Always prefer to use the binary packages, if you can. Building from source takes time, wastes effort and, as you discovered, requires special care. The whole point of binary distributions is to be able to avoid this. In a typical ROS workflow, I'd only build a package from source if a) you actually want to do some development on the package itself (ie: not just make use of it), or b) it hasn't been released for your particular platform.

Note 2: this is actually a question that has been asked many times before. I'm pretty certain a search (using either the built-in search or Google) turns up many answers ..

Note 3: don't use rosdep to install the package you are interested in itself. That's not what it's for. It only deals with dependencies.

Simply cloning a repository just gets you a copy of the sources in that repository. If/whenever a package uses functionality provided by external packages (ie: not found in the same repository), it will search for those dependencies using a find_package(..) call in CMakeLists.txt.

If you don't have those dependencies, CMake will present you with the error messages that you copy/pasted. This makes sense: CMake can't install those for you, so you have to make sure you already have them on your system.

Checking for and installing of dependencies is highly automated in ROS. After having cloned a repository, run:

rosdep install --from-paths /path/to/your/catkin_ws/src --ignore-src

after you've sourced the appropriate setup.bash. That will scan for packages in the source space of your catkin workspace, gather all dependencies, check you have those on your system, and if any are missing, it will install them (using the platform's package manager, see why rosdep instead of others?).

Note: you only need to do this if you are building things from source. Packages installed through package managers (ie: apt-get, rpm, etc) already have their dependencies resolved by the respective package manager. Always prefer to use the binary packages, if you can. Building from source takes time, wastes effort and, as you discovered, requires special care. The whole point of binary distributions is to be able to avoid this. In a typical ROS workflow, I'd only build a package from source if a) you actually want to do some development on the package itself (ie: not just make use of it), or b) it hasn't been released for your particular platform.platform (arch) or ROS release.

Note 2: this is actually a question that has been asked many times before. I'm pretty certain a search (using either the built-in search or Google) turns up many answers ..

Note 3: don't use rosdep to install the package you are interested in itself. That's not what it's for. It only deals with dependencies.