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

Why "rosdep install" when compiling ros2 from source?

asked 2021-01-24 21:21:05 -0600

upoque gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-01-25 02:28:01 -0600

tfoote gravatar image

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-01-24 21:21:05 -0600

Seen: 458 times

Last updated: Jan 25 '21