Skip to content

Conversation

@bburda
Copy link
Contributor

@bburda bburda commented Jan 31, 2026

Description

  • Add cpu/nvidia profiles to prevent simultaneous service startup
  • Add stop-demo.sh script for clean shutdown with --volumes/--images options
  • Add --update flag to pull latest images before running
  • Add --attached flag for foreground mode (daemon mode is now default)
  • Update README with daemon mode instructions and new scripts
  • Add instructions for viewing logs and interacting with ROS 2 in containers

Fixes port 8080 conflict when running with --nvidia flag where both turtlebot3-demo and turtlebot3-demo-nvidia services tried to bind to the same port. Now --profile cpu (default) or --profile nvidia must be explicitly specified, ensuring mutual exclusivity.

Changes:

  • docker-compose.yml: Add profiles=['cpu'] to default service
  • run-demo.sh: Default to --profile cpu, add daemon mode with -d flag
  • stop-demo.sh: New script for stopping containers with cleanup options
  • README.md: Update Quick Start, add daemon mode docs, add stop script

Related Issue

closes #18

Checklist

  • Tested locally
  • README updated (if needed)

- Add cpu/nvidia profiles to prevent simultaneous service startup
- Add stop-demo.sh script for clean shutdown with --volumes/--images options
- Add --update flag to pull latest images before running
- Add --attached flag for foreground mode (daemon mode is now default)
- Update README with daemon mode instructions and new scripts
- Add instructions for viewing logs and interacting with ROS 2 in containers

Fixes port 8080 conflict when running with --nvidia flag where both
turtlebot3-demo and turtlebot3-demo-nvidia services tried to bind to
the same port. Now --profile cpu (default) or --profile nvidia must be
explicitly specified, ensuring mutual exclusivity.

Changes:
- docker-compose.yml: Add profiles=['cpu'] to default service
- run-demo.sh: Default to --profile cpu, add daemon mode with -d flag
- stop-demo.sh: New script for stopping containers with cleanup options
- README.md: Update Quick Start, add daemon mode docs, add stop script
@bburda bburda requested a review from mfaferek93 January 31, 2026 14:16
@bburda bburda self-assigned this Jan 31, 2026
Copilot AI review requested due to automatic review settings January 31, 2026 14:16
@bburda bburda added the bug Something isn't working label Jan 31, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the TurtleBot3 integration demo to fix a Docker Compose profile issue that caused port 8080 conflicts between CPU and NVIDIA variants, and improves container lifecycle management and documentation.

Changes:

  • Assigns a cpu profile to the default turtlebot3-demo service and defaults the launcher script to --profile cpu, ensuring mutual exclusivity with the NVIDIA profile and eliminating the port conflict.
  • Extends run-demo.sh with --update and --attached flags, and makes detached (daemon) mode the default, including clearer post-launch guidance for logs and ROS 2 interaction.
  • Adds a stop-demo.sh helper for stopping containers (with optional volume and image cleanup) and updates the README to reflect daemon-mode usage, profiling, and the new stop script.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
demos/turtlebot3_integration/docker-compose.yml Adds profiles: ["cpu"] to the default TurtleBot3 service and clarifies how to use CPU vs NVIDIA profiles, resolving the 8080 port collision.
demos/turtlebot3_integration/run-demo.sh Introduces --profile cpu as the default, adds --update and --attached flags, supports daemon vs foreground modes, and prints explicit commands for viewing logs and accessing ROS 2 in containers.
demos/turtlebot3_integration/stop-demo.sh New script that runs docker compose/docker-compose down with optional volume (-v) and image (--rmi all) cleanup and restores X11 permissions.
demos/turtlebot3_integration/README.md Updates Quick Start and NVIDIA sections to use profiles (cpu/nvidia), documents daemon-mode behavior, log viewing, ROS 2 CLI usage in containers, and the new stop-demo.sh script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bburda bburda merged commit e231a5f into main Jan 31, 2026
8 checks passed
@bburda bburda deleted the fix/turtlebot_demo/nvidia-profile branch January 31, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] turtlebot3 with nvidia profile has port collision with cpu version

3 participants