Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ RUN apt update && apt upgrade -y \
&& pip install rosbags \
&& pip install PyQT5 \
&& apt install ros-$ROS_DISTRO-xacro -y \
&& apt install ros-$ROS_DISTRO-foxglove-bridge -y \
&& apt clean

RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> /home/"$USERNAME"/.bashrc
EXPOSE 8765
ENV SHELL /bin/bash
USER $USERNAME
CMD ["/bin/bash"]
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"--net=host",
"--ipc=host",
"--pid=host",
"-e", "DISPLAY=${env:DISPLAY}",
"-p", "8765:8765"
"-e", "DISPLAY=${env:DISPLAY}"
],
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The sensors and vehicle model are configured using config files. Examples are pr

The default vehicle model provided is rather simple and just meant to be a starting point. You are encouraged to integrate your own vehicle model by implementing the `IVehicleModel` class.

More info in the [docs folder](./doc/usage_tutorial.md).
For info on how to run the docker container and how to develop code around it, check the [docs folder](./doc/docker_usage.md).

# Contributing
Contributions in any form (reports, feedback, requests, submissions) are welcome. Preferably create an Issue or Pull request for that.
Expand Down
27 changes: 27 additions & 0 deletions doc/docker_usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# How to use

## Docker Compose

The simulator is inside a docker container, which by running it, the simulator will also be launched. To do this, run the following command on your terminal:

```bash
docker compose up
```

## Code Development - Dev Container

In case you want to do some work inside the container, by using the Dev Containers extension in VSCode the process becomes very simple, since there is a .devcontainer which contains the configuration for a development container for that purpose.

In order to run this, first you need to install some extensions. You can get them through here [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack).
Then you need to create some cache folders. This can be done by running the following commands:

```bash
mkdir cache
mkdir cache/iron-ros-base-jammy
mkdir cache/iron-ros-base-jammy/build
mkdir cache/iron-ros-base-jammy/install
mkdir cache/iron-ros-base-jammy/log
```
Finally do Ctrl + Shift + P and choose the option:

- Dev Containers: Rebuild and Reopen in container
31 changes: 0 additions & 31 deletions doc/usage_tutorial.md

This file was deleted.

7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
pacsim:
container_name: pacsim-container
image: pacsim-pacsim
build:
context: .
dockerfile: .devcontainer/Dockerfile
Expand Down Expand Up @@ -31,10 +32,10 @@ services:
- type: bind
source: "./cache/iron-ros-base-jammy/log"
target: "/home/ws/log"
ports:
- "8765:8765"
network_mode: host
ipc: host
pid: host
command: >
bash -c "cd /home/ws/ && ./entrypoint.sh"
bash -c "cd /home/ws/ && ./entrypoint.sh"