[ros-users] [Discourse.ros.org] [Next Generation ROS] --isol…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Mikael Arguedas via ros-users
Date:  
To: ros-users
CC: Mikael Arguedas
Subject: [ros-users] [Discourse.ros.org] [Next Generation ROS] --isolated in Docker image


I used `--isolated` (as well as other flags) in the Docker images mostly because that's the ament invocation I use for development.

All the `--isolated` flag does is tell `ament_tools` to create an "isolated" install folder rather than a merged one, this means that each package will have it's own subfolder in the install directory.

Without `--isolated`:
```
install
bin
include
lib
local_setup.bash
local_setup.sh
local_setup.zsh
opt
_order_packages.py
setup.bash
setup.sh
setup.zsh
share
src
```

With `--isolated`:
```
install
 actionlib_msgs
    include
    lib
    local_setup.bash
    local_setup.sh
    local_setup.zsh
    _order_packages.py
    setup.bash
    setup.sh
    setup.zsh
    share
...
 visualization_msgs
     include
     lib
     local_setup.bash
     local_setup.sh
     local_setup.zsh
     _order_packages.py
     setup.bash
     setup.sh
     setup.zsh
     share
```


The main advantage of this approach is that each package will have a different path for its includes, libraries etc (`X_INCLUDE_DIRS`, `X_LIBRARIES`...). This allows to make sure the dependencies are properly declared in CMake without relying on the fact that some files from projects that haven't been `find_package`'d are present in the install directory.

The drawback is that setting up the environment (`source (local_)setup.bash`) takes longer as a multitude of directories need to be added to environment variables (PATH, PYTHONPATH, LD_LIBRARY_PATH...).
On Windows with the `cmd` command line interpreter, environment variables are limited to 2048 characters making this approach unusable.

Other flags used in the docker images that differ from the ros2 installation instructions:
- `--parallel`: allows to build concurrently packages whose dependencies are satisfied. We don't advertise it as we faced some race conditions at install time when not using it in cmbination with `--isolated`
- `--symlink-install`: create symlinks in the install folder instead of copying the files. That allows faster install step as well as removing the need to rerun ament when modifying files that dont require compilation (e.g python scripts) in the source space. This is also not an option on windows as symlinking files requires administrator permissions.
- `--cmake-args -DSECURITY=ON --`: compiles Fast-RTPS with DDS-Security enabled

Hope this helps





---
[Visit Topic](https://discourse.ros.org/t/isolated-in-docker-image/3504/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>