Skip to content

Commit

Permalink
docker base image change
Browse files Browse the repository at this point in the history
  • Loading branch information
imagidan committed Feb 15, 2024
1 parent 7b11711 commit 140a3c9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
8 changes: 6 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/dronolab/simulation:latest
FROM ghcr.io/dronolab/px4-ros2-humble:latest

# Add vscode user with same UID and GID as your host system
# (copied from https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_creating-a-nonroot-user)
Expand Down Expand Up @@ -26,6 +26,10 @@ RUN chown -R $USERNAME:$USERNAME ./
# Copy to preload the ros packages
COPY ./ /workspace/$USERNAME/

# Copy gazebo models and worlds
COPY ./models /PX4-Autopilot/Tools/gz/models
COPY ./worlds /PX4-Autopilot/Tools/gz/worlds

# Change user
USER $USERNAME

Expand All @@ -34,4 +38,4 @@ RUN rosdep update
RUN rosdep install --from-paths src --ignore-src --rosdistro humble -y

# Source the ROS setup file
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
10 changes: 0 additions & 10 deletions .env

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Working in a dev container will allow you to have the same environnement as the
1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop)
2. Install [Visual Studio Code](https://code.visualstudio.com/)
3. Install Xserver (We recommend [VcXsrv](https://sourceforge.net/projects/vcxsrv/))
4. Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in VSCode
4. Install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension in VSCode
5. Clone and open the repository
6. Click on the green button in the bottom left corner of VSCode and select "Remote-Containers: Reopen in Container" or use the command palette to do it.
7. Wait for the container to build
8. Start Xserver with the ```-nowgl``` option (double click on the shortcut to open it if you use VcXsrv)

### Linux installation

Same as the windows installation, step 3 and 8 can be skiped.
Same as the windows installation, step 3 and 8 can be skipped.

Replace the DISPLAY environment variable in the .env file
```bash
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ services:
- ./:/workspace/thunderhawk
- /tmp/.X11-unix:/tmp/.X11-unix
- /tmp/.Xauthority:/tmp/.Xauthority:rw
env_file:
- .env
environment:
- QT_X11_NO_MITSHM=1
- DISPLAY=$DISPLAY
- XAUTHORITY=$XAUTHORITY
- ROS_DOMAIN_ID=96
command: sleep infinity
network_mode: "host"
privileged: true
7 changes: 6 additions & 1 deletion thunderhawk.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ repositories:
ROS2_PX4_Offboard_Example:
type: git
url: https://github.com/ARK-Electronics/ROS2_PX4_Offboard_Example.git
version: master
version: master

ros_gz:
type: git
url: https://github.com/gazebosim/ros_gz.git
version: humble

0 comments on commit 140a3c9

Please sign in to comment.