Skip to content

Commit

Permalink
refactor: Update and unify docker compose across all workspaces and a…
Browse files Browse the repository at this point in the history
…dd tests
  • Loading branch information
j3soon committed Aug 21, 2024
1 parent d9b7da9 commit c4e62b6
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 15 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Pulling the pre-built Docker images can bypass the time-consuming building proce
| [j3soon/ros2-template-ws](https://hub.docker.com/r/j3soon/ros2-template-ws/tags) | [`./template_ws`](./template_ws) | ✔️ || |
| [j3soon/ros2-orbslam3-ws](https://hub.docker.com/r/j3soon/ros2-orbslam3-ws/tags) | [`./orbslam3_ws`](./orbslam3_ws) | ✔️ || |
| [j3soon/ros2-rtabmap-ws](https://hub.docker.com/r/j3soon/ros2-rtabmap-ws/tags) | [`./rtabmap_ws`](./rtabmap_ws) | ✔️ || |
| [j3soon/ros2-ros1-bridge-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | ✔️ || Linting Skipped |
| [j3soon/ros2-ros1-bridge-build-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-build-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | ✔️ || Linting Skipped |
| [j3soon/ros2-ros1-bridge-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | ✔️ || Skip linting |
| [j3soon/ros2-ros1-bridge-build-ws](https://hub.docker.com/r/j3soon/ros2-ros1-bridge-build-ws/tags) | [`./ros1_bridge_ws`](./ros1_bridge_ws) | ✔️ || Skip linting |
| [j3soon/ros2-cartographer-ws](https://hub.docker.com/r/j3soon/ros2-cartographer-ws/tags) | [`./cartographer_ws`](./cartographer_ws) | ✔️ || |
| [j3soon/ros2-husky-ws](https://hub.docker.com/r/j3soon/ros2-husky-ws/tags) | [`./husky_ws`](./husky_ws) | ✔️ | ✔️ | |
| [j3soon/ros2-kobuki-ws](https://hub.docker.com/r/j3soon/ros2-kobuki-ws/tags) | [`./kobuki_ws`](./kobuki_ws) | ✔️ | ✔️ | |
| [j3soon/ros2-vlp-ws](https://hub.docker.com/r/j3soon/ros2-vlp-ws/tags) | [`./vlp_ws`](./vlp_ws) | ✔️ | ✔️ | |
| [j3soon/ros2-husky-ws](https://hub.docker.com/r/j3soon/ros2-husky-ws/tags) | [`./husky_ws`](./husky_ws) | ✔️ | ✔️ | Support real husky |
| [j3soon/ros2-kobuki-ws](https://hub.docker.com/r/j3soon/ros2-kobuki-ws/tags) | [`./kobuki_ws`](./kobuki_ws) | ✔️ | ✔️ | Support real kobuki |
| [j3soon/ros2-vlp-ws](https://hub.docker.com/r/j3soon/ros2-vlp-ws/tags) | [`./vlp_ws`](./vlp_ws) | ✔️ | ✔️ | Support real vlp |

## Contributors

Expand Down
4 changes: 3 additions & 1 deletion cartographer_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ services:
- /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
- /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
- /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
# - /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
Expand Down
4 changes: 3 additions & 1 deletion husky_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ services:
# - /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
# - /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
# - /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
- /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
Expand Down
5 changes: 3 additions & 2 deletions kobuki_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ services:
# - /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
# - /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
# - /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
- /dev:/dev
# Kobuki is usually mounted at `/dev/ttyUSB0`
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
# Note that this volume is shared among all workspaces.
Expand Down
4 changes: 3 additions & 1 deletion orbslam3_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ services:
- /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
- /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
- /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
# - /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
Expand Down
4 changes: 3 additions & 1 deletion rtabmap_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ services:
- /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
- /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
- /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
# - /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
Expand Down
5 changes: 3 additions & 2 deletions tests/diff_base/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ services:
PLACEHOLDER- /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
PLACEHOLDER- /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# Mount shared memory for ROS2 communication.
PLACEHOLDER- /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
PLACEHOLDER- /dev:/dev
MULTILINE_PLACEHOLDER
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
# Note that this volume is shared among all workspaces.
Expand Down
4 changes: 4 additions & 0 deletions tests/lint_comp_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def error(msg, i):
j += 1
k = 0
while k < len(stack) and diff[j+k].startswith('+ '):
if "- MULTILINE_PLACEHOLDER" in diff[i+k]:
raise error("MULTILINE_PLACEHOLDER is not supported in this case yet", i)
regexp = "^" + re.escape(diff[i+k][2:]).replace('PLACEHOLDER', '.*') + "$"
if not re.match(regexp, diff[j+k][2:]):
error("Expected line deletion and addition to differ only in the placeholder", i)
Expand All @@ -57,6 +59,8 @@ def error(msg, i):
j += 1
k = 0
while k < len(stack) and diff[j+k].startswith('- '):
if "- MULTILINE_PLACEHOLDER" in diff[j+k]:
raise error("MULTILINE_PLACEHOLDER is not supported in this case yet", i)
regexp = "^" + re.escape(diff[j+k][2:]).replace('PLACEHOLDER', '.*') + "$"
if not re.match(regexp, diff[i+k][2:]):
error("Expected line deletion and addition to differ only in the placeholder", i)
Expand Down
4 changes: 2 additions & 2 deletions vlp_ws/docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ services:
- /dev/dri:/dev/dri
# Mount sound card to prevent Gazebo warning.
- /dev/snd:/dev/snd
# TODO: Uncomment the line below and comment out the two entries above to enable USB support.
# - /dev:/dev
# Mount shared memory for ROS2 communication.
- /dev/shm:/dev/shm
# TODO: Uncomment the line below and comment out the three entries above to enable USB support.
# - /dev:/dev
# Mount Gazebo models directory to reuse models downloaded during first launch.
# Reference: https://answers.ros.org/question/365658
# Note that this volume is shared among all workspaces.
Expand Down

0 comments on commit c4e62b6

Please sign in to comment.