ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
436 stars 283 forks source link

[WiP] Package whitelist resp. blacklist #294

Open norro opened 3 years ago

norro commented 3 years ago

This PR introduces package whitelist resp. blacklist, see https://github.com/ros2/ros1_bridge/issues/284.

If a file ${CMAKE_SOURCE_DIR}/../../../BridgePackageInclude.List" is found and non-empty (one ROS package name per line), only those ROS packages are mapped by the bridge. Otherwise, if a file ${CMAKE_SOURCE_DIR}/../../../BridgePackageIgnore.List" is found and non-empty (one ROS package name per line), those ROS packages are ignored by the bridge.

This PR is very much work-in-progress with feedback appreciated, especially regarding the following points:

I consider message blacklist/whitelist as a next (and additional) step, after implementing this package blacklist/whitelist.

norro commented 3 years ago

@clalancette I would very much appreciate your feedback.

sloretz commented 3 years ago

Is the goal a feature that ignores ROS packages at compile time? If so, I would recommend a user interface of a CMake variable specified on the command line. When using colcon this would look like

colcon build --cmake-args -DROS1_BRIDGE_IGNORE_PKGS=std_msgs;std_srvs --packages-select ros1_bridge
norro commented 3 years ago

@sloretz Yes, that's right. I like your idea of using cmake variables and will adapt the PR accordingly soon.

Thanks for your feedback!