Skip to content

feat: Add e2e docker compose test environment - #56

Open
cardboardcode wants to merge 6 commits into
open-rmf:mainfrom
cardboardcode:cardboardcode/feat/e2e_test_env
Open

feat: Add e2e docker compose test environment#56
cardboardcode wants to merge 6 commits into
open-rmf:mainfrom
cardboardcode:cardboardcode/feat/e2e_test_env

Conversation

@cardboardcode

@cardboardcode cardboardcode commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

New Feature Implementation 🌟

Implemented feature

Added docker compose.yaml (with override for headless), accompanied with modification to Dockerfile.base in order to provide an easy-to-set-up test environment that includes the demonstration of Nav2 Integration.

This addresses #50.

Implementation description

  • Added docker-compose.yml and docker-compose.headless.override.yml in directory, docker.
  • Modified Dockerfile.base with optimised build time and inclusion of localised codebase so in-container commands in docker-compose.yml can be executed without error.

Instructions 📘

Follow the steps below to see how it looks like in action:

git clone https://github.com/open-rmf/next_gen_prototype.git --branch [cardboardcode:cardboardcode/feat/e2e_test_env](https://github.com/cardboardcode/next_gen_prototype/tree/cardboardcode/feat/e2e_test_env) --single-branch --depth 1 && cd next_gen_prototype
BUILDKIT_PROGRESS=plain docker compose -f docker/docker-compose.yml build

Warning

This build process typically takes about 20 minutes, depending on your internet speed. So grab a coffee and take a break while it builds. ☕

xhost +local:docker && docker compose -f docker/docker-compose.yml up -d --force-recreate

Tip

To run headless, use the following command below instead:

docker compose -f docker/docker-compose.yml -f docker/docker-compose.headless.override.yml up -d --force-recreate

To stop the deployment, use the command below:

docker compose -f docker/docker-compose.yml down --remove-orphans

Verify

Upon running the monolithic version, you should see 2 RViz window appear.

Send the following commands to verify that next_gen_prototype processes Nav2 Destination Goals accordingly:

docker exec -it next_gen_prototype bash -c "source /nav2_traffic_ws/install/setup.bash && \
    ros2 action send_goal robot1/navigate_to_pose nav2_msgs/action/NavigateToPose \"{
      pose: {
        header: {
          stamp: {sec: 0, nanosec: 0},
          frame_id: 'map'
        },
        pose: {
          position: {x: 9.0, y: 6.0, z: 0.0},
          orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}
        }
      }
    }\"
"
docker exec -it next_gen_prototype bash -c "source /nav2_traffic_ws/install/setup.bash && \
    ros2 action send_goal robot0/navigate_to_pose nav2_msgs/action/NavigateToPose \"{
      pose: {
        header: {
          stamp: {sec: 0, nanosec: 0},
          frame_id: 'map'
        },
        pose: {
          position: {x: 9.0, y: 3.0, z: 0.0},
          orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}
        }
      }
    }\"
"

After running both commands above, both robot0 and robot1 should start moving towards their destination, as visualized in their respective RViz windows, similar to what is shown in the .gif animation below:

https://github.com/open-rmf/next_gen_prototype/blob/main/nav2_integration/docs/images/nav2_traffic_demo.gif

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR. ⚠️
  • I did not use GenAI

Generated-by: Gemini Pro

…test environments.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
…Dockerfile in docker compose to guarantee sync with localised codebase.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
@cardboardcode cardboardcode self-assigned this Sep 3, 2026
@mxgrey mxgrey added this to PMC Board Sep 3, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board Sep 3, 2026

@arjo129 arjo129 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the initial push. I've got some small recommendations. Overall this is a step in the right direction.

command:
- bash
- -c
- "source /nav2_traffic_ws/install/setup.bash && ros2 launch sp_demo_nav2_bringup cloned_multi_tb3_simulation_launch.py robots:='robot1={x: 3.0, y: 5.0, yaw: 0.0};' use_rviz:=False" No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knit: new line at end of file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rectified in commit 4092d38.

Comment thread docker/docker-compose.yml Outdated

container_name: next_gen_prototype
restart: no
network_mode: host

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think itd be good if we exercised per-container networking.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 884caa1.

Comment thread docker/docker-compose.yml Outdated
network_mode: host

environment:
RMW_IMPLEMENTATION: rmw_cyclonedds_cpp

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I test against cyclone-dds I think it'd be better if we defaulted to zenoh. The goal of this set of docker files should be to give people a rough idea of how to configure their own local network.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in commit 884caa1.

Left in commented out rmw_zenoh_cpp to indicate that the e2e docker compose can default to Zenoh.

As a default, using Dockerfile.base, docker_compose.yml has been verified using rmw_fastrtps_cpp, both to keep the docker image minimal.

Users would be encouraged to install rmw_zenoh_cpp on their own to utilize as default RMW via docker_compose.yml.

Comment thread docker/Dockerfile.base
COPY . /tmp/next_gen_prototype

# Install ROS 2 dependencies via rosdep for both underlay and prototype branch
RUN apt-get update && \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This apt-get update is needed as containers can grow old and then the apt mirrors list can grow out of date.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rectified in commit 0c6bbd6.

Comment thread docker/Dockerfile.base Outdated
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather we install these in another container. The base container should contain the bare minimum and default to the default RMW.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rectified in commit a91555f.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
…N line.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
…se image minimal.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
…d default FastDDS-based execution of nav2 integration demo that allows per-container nav2 robot simulation.

Signed-off-by: Gary Bey <beyhy94@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

3 participants