The error message you're encountering, "permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock," indicates that the user running the `docker` command does not have the necessary permissions to interact with the Docker daemon.
To resolve this issue, you have a few options:
1. **Run Docker Commands as Root (not recommended for security reasons):** The simplest way to resolve the issue is to run Docker commands with `sudo`. However, this is not recommended for security reasons because it grants elevated privileges to the Docker command, which could potentially lead to security vulnerabilities.
```bash
sudo docker run --network=host -it ghcr.io/open-rmf/rmf_deployment_template/rmf-simulation:latest bash -c "ros2 launch rmf_demos_gz office.launch.xml headless:=1 server_uri:=ws://localhost:8000/_internal"
```
2. **Add User to Docker Group (recommended):** The better practice is to add your user to the `docker` group, which allows you to run Docker commands without needing `sudo`. Here's how you can do it:
a. Check if the `docker` group exists:
```bash
grep docker /etc/group
```
b. If the group doesn't exist, you can create it:
```bash
sudo groupadd docker
```
c. Add your user to the `docker` group:
```bash
sudo usermod -aG docker $USER
```
d. You may need to log out and log back in or restart your system for the group changes to take effect.
3. **Use `docker-compose`:** If you are managing multiple containers as part of a project, consider using `docker-compose`. It allows you to define and run multi-container Docker applications from a configuration file, and you can avoid some of the permission issues associated with running Docker containers directly.
Once you've taken one of the above actions, you should be able to run Docker commands without encountering the "permission denied" error.
The commands you've provided seem to be instructions for running a set of Docker containers for a local RMF (Robotics Middleware Framework) deployment. This is a convenient way to set up and test RMF components without the need for setting up a full Kubernetes cluster. Here's a breakdown of the steps:
1. **Run RMF Simulation:**
```bash
docker run --network=host -it ghcr.io/open-rmf/rmf_deployment_template/rmf-simulation:latest bash -c "ros2 launch rmf_demos_gz office.launch.xml headless:=1 server_uri:=ws://localhost:8000/_internal"
```
This command runs the RMF simulation container with ROS2, launching the `office.launch.xml` demo. It configures the simulation to run headless and connect to the specified WebSocket server URI.
2. **Run RMF API Server:**
```bash
docker run --network=host -it ghcr.io/open-rmf/rmf_deployment_template/rmf-web-rmf-server:latest
```
This command runs the RMF API server container, which is responsible for handling API requests related to RMF.
3. **Run RMF Web Dashboard:**
```bash
docker run -p 3000:80 -it ghcr.io/open-rmf/rmf_deployment_template/rmf-web-dashboard-local:latest
```
This command runs the RMF Web Dashboard container, mapping port 3000 on your local machine to port 80 in the container. This allows you to access the dashboard at `http://localhost:3000/dashboard` in your web browser.
After running these commands, you should have a local RMF deployment with the simulation environment and the web dashboard accessible on your local machine.
Make sure you have Docker installed and properly configured on your system for these commands to work as intended. Additionally, ensure that the Docker images (`ghcr.io/open-rmf/rmf_deployment_template/rmf-simulation:latest`, `ghcr.io/open-rmf/rmf_deployment_template/rmf-web-rmf-server:latest`, and `ghcr.io/open-rmf/rmf_deployment_template/rmf-web-dashboard-local:latest`) are available and up to date in the GitHub Container Registry (ghcr.io).
Finally, follow the provided URL (`http://localhost:3000/dashboard`) to access the RMF Web Dashboard and test the dispatch of tasks as mentioned.
http://localhost:3000/dashboard
# rmf
1 - install docker
2 - docker run --network=host -it ghcr.io/open-rmf/rmf_deployment_template/rmf-simulation:latest bash -c "ros2 launch rmf_demos_gz office.launch.xml headless:=1 server_uri:=ws://localhost:8000/_internal"
3 - docker run --network=host -it ghcr.io/open-rmf/rmf_deployment_template/rmf-web-rmf-server:latest
4 - docker run -p 3000:80 -it ghcr.io/open-rmf/rmf_deployment_template/rmf-web-dashboard-local:latest
5 - http://localhost:3000/dashboard
rmf docker