An open API service indexing awesome lists of open source software.

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

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! ๐Ÿš€