File Comments & ROS Development Container

- Add comments to files explaining what the file is
- Add ros-dev container for development
This commit is contained in:
Sravan Balaji
2020-03-25 12:12:09 -04:00
parent e4c6c7470b
commit fd2039e610
5 changed files with 47 additions and 14 deletions

View File

@@ -1 +1,3 @@
# .env for docker-compose
IP_ADDRESS=192.168.1.14

View File

@@ -5,13 +5,13 @@ version: '3'
# Define services
services:
# ROS Service
ros:
# Use Dockerfile in ros folder
build: ./ros
# Mount ros folder on host to app folder in container
# ROS Development Service
ros-dev:
# Use Dockerfile in ros-dev folder
build: ./ros-dev
# Mount ros-dev folder on host to app folder in container
volumes:
- ./ros:/app
- ./ros-dev:/app
# Set DISPLAY variable and network mode for GUIs
environment:
- DISPLAY=${IP_ADDRESS}:0.0
@@ -35,13 +35,27 @@ services:
# Run turtlesim script when container is run
command: bash -c "./turtlesim.sh"
# Gazebo Service
gazebo:
# Use Dockerfile in gazebo folder
build: ./gazebo
# Mount gazebo folder on host to app folder in container
# ROS Production Service
ros:
# Use Dockerfile in ros folder
build: ./ros
# Mount ros folder on host to app folder in container
volumes:
- ./gazebo:/app
- ./ros:/app
# Set DISPLAY variable and network mode for GUIs
environment:
- DISPLAY=${IP_ADDRESS}:0.0
network_mode: "host"
# Set working directory in container to app folder
working_dir: /app
# Gazebo Production Service
gazebo:
# Use Dockerfile in gazebo folder
build: ./gazebo
# Mount gazebo folder on host to app folder in container
volumes:
- ./gazebo/.gazebo:/root/.gazebo
# Set DISPLAY variable and network mode for GUIs
environment:
- DISPLAY=${IP_ADDRESS}:0.0

16
src/ros-dev/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# ROS Development Dockerfile
# Use official image for ROS Melodic Morenia
FROM ros:melodic
# Install dependencies for development
RUN sudo apt-get update && apt-get install -y \
# ROS Tutorial Dependencies
ros-melodic-ros-tutorials \
ros-melodic-rqt \
ros-melodic-rqt-common-plugins \
ros-melodic-turtlesim \
# C++ Development: g++ compiler, etc.
build-essential
CMD ["/bin/bash"]

View File

@@ -1,4 +1,4 @@
# ROS Dockerfile
# ROS Turtlesim Dockerfile
# Use official image for ROS Melodic Morenia
FROM ros:melodic

View File

@@ -1,3 +1,4 @@
# turtlesim.sh
#!/bin/bash
roscore &