Why "rosdep install" when compiling ros2 from source?
Hi I'm trying to build ros2 from source, following this guide.
There is this step in the installation procedure, where you install rosdep dependencies:
$ sudo rosdep init
$ rosdep update
$ rosdep install --from-paths src --ignore-src --rosdistro foxy -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers"
If I'm correct, the above commands install additional binary packages in /opt/ros/foxy/...
.
Then this results in two different directories ~/ros2_foxy/
, which is the directory containing all the source code, and /opt/ros/foxy/...
.
Why do I need to execute the above commands?
Asked by upoque on 2021-01-24 22:21:05 UTC
Answers
rosdep installs the additional dependencies that are needed for your source code tree.
You may have X Y and Z in your workspace ~/ros2_foxy
, if they declare dependencies on A, B and C in their package.xml rosdep will attempt to install A, B and C on your system so that you are then able to compile X Y and Z in your workspace. It will also satisfy the runtime dependencies so that you can run the executables after you've built them as they may be different dependencies.
Asked by tfoote on 2021-01-25 03:28:01 UTC
Comments