ros2-docs/docs/General ROS 2/Micro ROS/Micro ROS Bridge.md
2024-12-12 15:30:03 -05:00

60 lines
1.5 KiB
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Micro ROS Bridge
## Serial Bridge
=== "docker run"
```bash
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO serial --dev [YOUR BOARD PORT] -v6
```
=== "docker compose"
```yaml title="docker-compose.yaml" linenums="1"
services:
 micro_ros_agent:
   image: microros/micro-ros-agent:humble
   command: serial --dev [YOUR BOARD PORT] -v6
   network_mode: "host"
   privileged: true
   volumes:
     - /dev:/dev
     - /dev/shm:/dev/shm
```
## TCP Bridge
=== "docker run"
```bash
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO tcp4 --port 8888 -v6
```
=== "docker compose"
```yaml title="docker-compose.yaml" linenums="1"
services:
 micro_ros_agent:
   image: microros/micro-ros-agent:humble
   command: tcp4 --port 8888 -v6
   network_mode: "host"
   privileged: true
   volumes:
     - /dev:/dev
     - /dev/shm:/dev/shm
```
## UDP Bridge
=== "docker run"
```bash
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO udp4 --port 8888 -v6
```
=== "docker compose"
```yaml title="docker-compose.yaml" linenums="1"
services:
 micro_ros_agent:
   image: microros/micro-ros-agent:humble
   command: udp4 --port 8888 -v6
   network_mode: "host"
   privileged: true
   volumes:
     - /dev:/dev
     - /dev/shm:/dev/shm
```