Skip to content

Commit

Permalink
Add basic Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LoyVanBeek committed Nov 27, 2024
1 parent 77c803d commit 50034cc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@

# neato_ros2
ROS2 interface to Neato vacuum robots

# Docker
```bash
docker build -f docker/Dockerfile . -t neato

docker run -it --net=host --ipc=host --privileged \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="${XAUTHORITY}:/root/.Xauthority" \
neato bash -c "ros2 launch neato_bringup neato.launch.py"
```
4 changes: 3 additions & 1 deletion Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash \
&& colcon build --symlink-install --event-handlers console_cohesion+\
&& rm -rf /var/lib/apt/lists/*"

# Continue with https://roboticseabass.com/2023/07/09/updated-guide-docker-and-ros2/
# Set up entrypoint
COPY ./docker/entrypoint.sh /
ENTRYPOINT [ "/entrypoint.sh" ]
11 changes: 11 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/bash
# Entrypoint for ROS Docker containers

# Source ROS 2
source /opt/ros/${ROS_DISTRO}/setup.bash

# Source the overlay workspace, if built
source /root/ros2_ws/install/setup.bash

# Execute the command passed into this entrypoint
exec "$@"

0 comments on commit 50034cc

Please sign in to comment.