https://github.com/codenkoffee/ros2-humble-docker-development-environment
https://github.com/codenkoffee/ros2-humble-docker-development-environment
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codenkoffee/ros2-humble-docker-development-environment
- Owner: CodeNKoffee
- Created: 2025-02-02T17:58:50.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-03T04:30:19.000Z (12 months ago)
- Last Synced: 2025-09-23T22:02:19.927Z (4 months ago)
- Language: Dockerfile
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ROS2 Humble on macOS - Super Easy Guide! ๐
Hey there! This guide will help you set up ROS2 Humble on your Mac using Docker. Don't worry if some terms sound new - we'll go through everything step by step!
## What You Need First ๐ฏ
1. A Mac computer (either Intel or M1/M2)
2. Internet connection
3. Some free space on your computer (at least 10GB)
## Step 1: Installing Docker Desktop ๐ณ
1. Download Docker Desktop:
- Go to [Docker Desktop for Mac](https://www.docker.com/products/docker-desktop/)
- Click the big blue Download button
- Choose Mac with Apple Chip (M1/M2) or Mac with Intel Chip based on your computer
2. Install Docker Desktop:
- Find the downloaded file in your Downloads folder
- Double click it
- Drag the Docker icon to Applications folder
- Open Docker from your Applications folder
- Click through any permission requests (enter your password if asked)
- Wait until you see "Docker Desktop is running" with a green light
## Step 2: Getting Our ROS2 Files ๐
1. Open Terminal:
- Press Command(โ) + Space
- Type "Terminal"
- Press Enter
2. Get the files:
```bash
# Make a folder for your robot stuff
cd ~/Documents
mkdir robot_projects
cd robot_projects
# Get our ROS2 files
git clone https://github.com/CodeNKoffee/ROS2-humble-docker-development-environment.git ros2_project
cd ros2_project
```
## Step 3: Building Our Robot Container ๐ค
Still in Terminal, type these commands:
```bash
# Build our custom ROS2 container
docker compose build
# This might take a few minutes - perfect time for a snack! ๐ช
```
## Step 4: Starting ROS2 ๐ฎ
```bash
# Start the container
docker compose up -d
# Enter the container (this is like entering your robot's brain!)
docker compose exec ros2_dev bash
```
## Step 5: Testing Everything Works ๐งช
Now you're inside the container (you'll see a different-looking prompt). Let's test it:
```bash
# Test 1: Basic ROS2 command
ros2 topic list
# Test 2: Run a talker node
ros2 run demo_nodes_cpp talker
```
Open a new Terminal window and type:
```bash
# Enter the container again
docker compose exec ros2_dev bash
# Run a listener node
ros2 run demo_nodes_cpp listener
```
If you see messages being passed between talker and listener - Congratulations! ๐ Everything is working!
## Common Problems and Solutions ๐ง
### If Docker Won't Start
- Make sure Docker Desktop is running (look for the whale icon at the top of your screen)
- Try restarting Docker Desktop
### If Container Won't Start
```bash
# Try these commands:
docker compose down
docker compose up -d
```
### If You Can't Enter the Container
```bash
# Make sure it's running:
docker compose ps
# If nothing shows up:
docker compose up -d
```
## Useful Commands to Remember ๐
```bash
# Start everything
docker compose up -d
# Enter the container
docker compose exec ros2_dev bash
# Stop everything
docker compose down
# Rebuild if you change something
docker compose build
```
## Need Help? ๐
- Check if Docker Desktop is running
- Make sure you're in the right folder (use `pwd` to check)
- Try turning it off and on again (seriously, it often works!)
- Ask for help in our community!
## Want to Learn More? ๐
- [ROS2 Tutorials](https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Understanding-ROS2-Nodes/Understanding-ROS2-Nodes.html)
- [Docker Basics](https://docs.docker.com/get-started/)
- [Our Project Wiki](your-wiki-url)
Remember: Everyone was a beginner once! Don't be afraid to ask questions and experiment. Happy robotics! ๐ค
## Quick Commands Reference Card ๐
Cut out this section and keep it handy!
```bash
# Start everything
docker compose up -d
# Enter ROS2
docker compose exec ros2_dev bash
# Stop everything
docker compose down
# Check if it's running
docker compose ps
# Rebuild everything
docker compose build
```
Good luck with your robot adventures! ๐