-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29d62b7
commit e853dfa
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ROS2 test/tutorial - Pull down/Run/Launch two nodes in two separate docker containers. | ||
# Using the built in ros2 package 'demo_nodes_cpp' with the two nodes 'talker' & 'listener' | ||
# | ||
# 1) Launch the nodes | ||
# $ docker compose --file docker-compose_ROS2talker-ROS1listener.yml up | ||
# ... ✔ Container1: ??? | ||
# ... ✔ Container2: ??? | ||
# | ||
# 2) ...press <Ctrl><C> to stop | ||
# | ||
# 3) Remove the two containers AND the Network "amd64-jazzy_default" | ||
# More info: | ||
# - https://docs.ros.org/en/jazzy/How-To-Guides/Run-2-nodes-in-single-or-separate-docker-containers.html | ||
# - https://hub.docker.com/_/ros | ||
# | ||
services: | ||
talker: | ||
image: osrf/ros:noetic-desktop-full | ||
command: roslaunch roscpp_tutorials talker_listener_launch] | ||
network_mode: host | ||
|
||
listener: | ||
image: osrf/ros:jazzy-desktop | ||
environment: | ||
- "ROS_HOSTNAME=listener" | ||
- "ROS_MASTER_URI=http://ros1:11311" | ||
command: ros2 run ros1_bridge dynamic_bridge | ||
depends_on: | ||
- talker | ||
network_mode: host | ||
|
||
bridge: | ||
image: osrf/ros:jazzy-desktop | ||
environment: | ||
- "ROS_HOSTNAME=bridge" | ||
- "ROS_MASTER_URI=http://ros1:11311" | ||
depends_on: | ||
- talker | ||
- listener | ||
network_mode: host | ||
command: ros2 run ros1_bridge dynamic_bridge |