{"id":28066032,"url":"https://github.com/prakash-aryan/turtlebot3-docker-windows","last_synced_at":"2025-10-08T20:12:23.100Z","repository":{"id":290965149,"uuid":"975581128","full_name":"prakash-aryan/turtlebot3-docker-windows","owner":"prakash-aryan","description":"This repository contains a Dockerized setup for running TurtleBot3 simulation with SLAM and Navigation capabilities using ROS Noetic on Windows. The setup includes Gazebo simulation, SLAM, and autonomous navigation capabilities.","archived":false,"fork":false,"pushed_at":"2025-05-01T15:20:07.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T14:36:10.795Z","etag":null,"topics":["docker","docker-desktop","turtlebot3","wsl","wsl2","xming","xserver"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prakash-aryan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-30T14:48:04.000Z","updated_at":"2025-05-01T15:20:10.000Z","dependencies_parsed_at":"2025-05-01T16:31:26.221Z","dependency_job_id":"3e967f2b-6d58-4c02-b8e2-815ba4e7446f","html_url":"https://github.com/prakash-aryan/turtlebot3-docker-windows","commit_stats":null,"previous_names":["prakash-aryan/turtlebot3-docker-windows"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prakash-aryan/turtlebot3-docker-windows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prakash-aryan%2Fturtlebot3-docker-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prakash-aryan%2Fturtlebot3-docker-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prakash-aryan%2Fturtlebot3-docker-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prakash-aryan%2Fturtlebot3-docker-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prakash-aryan","download_url":"https://codeload.github.com/prakash-aryan/turtlebot3-docker-windows/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prakash-aryan%2Fturtlebot3-docker-windows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000682,"owners_count":26082817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-desktop","turtlebot3","wsl","wsl2","xming","xserver"],"created_at":"2025-05-12T14:35:59.303Z","updated_at":"2025-10-08T20:12:23.079Z","avatar_url":"https://github.com/prakash-aryan.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TurtleBot3 Docker Simulation for Windows\n\nThis repository contains a Dockerized setup for running TurtleBot3 simulation with SLAM and Navigation capabilities using ROS Noetic on Windows. The setup includes Gazebo simulation, SLAM, and autonomous navigation capabilities.\n\n\nhttps://github.com/user-attachments/assets/08ef5b0b-3a20-4acf-a601-7cb4489eec45\n\n## What is Docker?\n\nDocker is an open-source platform that automates the deployment, scaling, and management of applications by using containerization. Unlike traditional virtual machines, Docker containers share the host system's OS kernel, making them more lightweight and efficient.\n\n![Docker in a Data Center](https://github.com/user-attachments/assets/c6657892-4e18-41d3-8742-f483ce433645)\n*Image credit: https://www.iteachrecruiters.com/blog/docker-explained-visually-for-non-technical-folks/*\n\n### How Docker Works\n\nAs illustrated in the image above, Docker provides several key advantages in a data center environment:\n\n1. **Containerization**: Docker packages applications and their dependencies into isolated containers, eliminating the \"it works on my machine\" problem\n2. **Resource Efficiency**: Containers share the OS kernel and use fewer resources than traditional VMs\n3. **Isolation**: Each container runs in isolation, preventing conflicts between applications\n4. **Portability**: Containers run consistently across different environments (development, testing, production)\n\n### Docker Architecture\n\nDocker uses a client-server architecture with these main components:\n\n- **Docker Daemon**: The background service running on the host that manages building, running, and distributing Docker containers\n- **Docker Client**: The primary way to interact with Docker through the command line\n- **Docker Images**: Read-only templates with instructions for creating containers\n- **Docker Containers**: Runnable instances of Docker images\n- **Docker Registry**: Repository for storing and sharing Docker images (like Docker Hub)\n\n### Common Docker Commands\n\nHere are some essential Docker commands:\n\n```bash\n# Display Docker version information\ndocker --version\n\n# Download an image from Docker Hub\ndocker pull [image_name]:[tag]\n\n# List all downloaded images\ndocker images\n\n# Run a container from an image\ndocker run [options] [image_name]\n\n# List running containers\ndocker ps\n\n# List all containers (including stopped)\ndocker ps -a\n\n# Stop a running container\ndocker stop [container_id]\n\n# Remove a container\ndocker rm [container_id]\n\n# Remove an image\ndocker rmi [image_id]\n\n# Build an image from a Dockerfile\ndocker build -t [name]:[tag] [path_to_dockerfile]\n\n# Execute a command in a running container\ndocker exec -it [container_id] [command]\n\n# View container logs\ndocker logs [container_id]\n\n# Create a network for container communication\ndocker network create [network_name]\n```\n\n### Docker Compose\n\nDocker Compose is a tool for defining and running multi-container Docker applications. Key commands:\n\n```bash\n# Start services defined in docker-compose.yml\ndocker-compose up\n\n# Run services in the background\ndocker-compose up -d\n\n# Stop services\ndocker-compose down\n\n# View service logs\ndocker-compose logs\n```\n\n## Prerequisites\n\n0. Install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install)\n1. Install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/)\n2. Install [Xming X Server](https://sourceforge.net/projects/xming/) - This is required for displaying GUI applications from Docker\n\n## Getting Started\n\n1. Clone this repository:\n```powershell\ngit clone https://github.com/prakash-aryan/turtlebot3-docker-windows.git\ncd turtlebot3-docker-windows\n```\n\n2. Pull the Docker image from Docker Hub:\n```powershell\ndocker pull merabro/turtlebot3-sim:latest\n```\n\n## Setting Up Xming\n\n1. Start Xming:\n   - Run Xming from the Start menu\n   - It will appear in your system tray (near clock)\n  \n     ![image](https://github.com/user-attachments/assets/68946471-4e51-4f82-83f9-f7ab51d9eaab)\n\n## Running the Simulation\n\nOpen three PowerShell windows in the repository directory:\n\n### Terminal 1 (Gazebo)\n```powershell\n.\\run_turtlebot.ps1\n```\nOnce inside the container:\n```bash\nroslaunch turtlebot3_gazebo turtlebot3_world.launch\n```\n\n### Terminal 2 (SLAM)\n```powershell\n.\\run_turtlebot.ps1\n```\nOnce inside the container:\n```bash\nroslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping\n```\n\n### Terminal 3 (Teleop)\n```powershell\n.\\run_turtlebot.ps1\n```\nOnce inside the container:\n```bash\nroslaunch turtlebot3_teleop turtlebot3_teleop_key.launch\n```\n\n## Creating and Saving the Map\n\n1. Use teleop to drive the robot around and create the map:\n   - w: Move forward\n   - x: Move backward\n   - a: Turn left\n   - d: Turn right\n   - s: Stop\n   - Space: Emergency stop\n   - q: Quit\n\n2. When satisfied with the map, in the teleop terminal:\n```bash\n# Stop teleop with Ctrl+C, then:\nrosrun map_server map_saver -f /root/maps/my_map\n```\n\n## Running Navigation\n\nAfter creating and saving a map, start navigation in a new terminal:\n```powershell\n.\\run_turtlebot.ps1\n```\nOnce inside the container:\n```bash\nroslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=/root/maps/my_map.yaml\n```\n\nUse the \"2D Nav Goal\" button in RViz to set navigation goals for the robot:\n1. Click on the \"2D Nav Goal\" button in the RViz toolbar\n2. Click and drag on the map to set the goal position and orientation\n3. The robot will plan a path and navigate to the goal\n\n## Docker Benefits in this Project\n\nThis TurtleBot3 Docker setup demonstrates several key advantages of containerization:\n\n1. **Environment Consistency**: All dependencies, ROS packages, and configurations are bundled together\n2. **Cross-Platform Compatibility**: Works seamlessly on Windows via WSL2\n3. **Isolation**: The ROS environment doesn't interfere with your host system\n4. **Ease of Distribution**: Anyone can run the same setup with a simple `docker pull` command\n5. **Resource Efficiency**: Lighter than running a full virtual machine\n6. **GUI Application Support**: Runs graphical applications (Gazebo, RViz) through X11 forwarding\n\n## Repository Structure\n\n```\nturtlebot3-docker-windows/\n├── Dockerfile              # Docker image configuration\n├── start.sh                # Container entrypoint script\n├── run_turtlebot.ps1       # Windows PowerShell run script\n├── maps/                   # Directory for storing maps\n└── README.md               # This file\n```\n\n## Dockerfile Details\n\nOur Dockerfile is built on top of a ROS Noetic base image and includes:\n\n```dockerfile\nFROM osrf/ros:noetic-desktop-full\n\n# Install dependencies\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    ros-noetic-turtlebot3 \\\n    ros-noetic-turtlebot3-simulations \\\n    ros-noetic-slam-gmapping \\\n    ros-noetic-navigation \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Set environment variables\nENV TURTLEBOT3_MODEL=burger\nENV ROS_MASTER_URI=http://localhost:11311\nENV ROS_HOSTNAME=localhost\n\n# Set up workspace\nWORKDIR /root\n\n# Copy entrypoint script\nCOPY start.sh /\nRUN chmod +x /start.sh\n\n# Create maps directory\nRUN mkdir -p /root/maps\n\nENTRYPOINT [\"/start.sh\"]\n```\n\n## Troubleshooting\n\n### Display Issues\n- If Gazebo fails to launch or crashes:\n  - Verify Xming is running with the `-ac` flag\n  - Restart Xming and try again\n  - Make sure your firewall isn't blocking Xming\n\n### ROS Communication Issues\n- If ROS nodes can't communicate:\n  - Verify all containers are using the same network settings\n  - Check Docker Desktop network access\n  - Make sure all terminals are using the same ROS_MASTER_URI\n\n### Docker-Specific Issues\n- If you encounter \"permission denied\" errors:\n  - On Windows, ensure Docker Desktop has proper access to the shared folders\n  - On Linux, you might need to run Docker with sudo or add your user to the docker group\n- If container exits immediately:\n  - Use `docker run` with the `-it` flag to keep the container running\n  - Check the logs with `docker logs [container_id]` to identify issues\n\n### Performance Considerations\n- Gazebo is resource-intensive. For better performance:\n  - Allocate more CPU/RAM to Docker in Docker Desktop settings\n  - Close unnecessary applications while running the simulation\n  - Consider using a Linux host for better performance with Docker\n\n## Further Docker Learning Resources\n\n- [Docker Official Documentation](https://docs.docker.com/)\n- [Docker Hub](https://hub.docker.com/) - Public repository of Docker images\n- [Docker Curriculum](https://docker-curriculum.com/) - Comprehensive Docker tutorial\n- [Play with Docker](https://labs.play-with-docker.com/) - Interactive Docker playground\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakash-aryan%2Fturtlebot3-docker-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprakash-aryan%2Fturtlebot3-docker-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakash-aryan%2Fturtlebot3-docker-windows/lists"}