Skip to content

Commit

Permalink
Readme, last fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Mar 5, 2024
1 parent 8fde4da commit 035bb7b
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 32 deletions.
1 change: 0 additions & 1 deletion Dockerfile.hardware
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ RUN apt-get update && \

# Setup envs from eeprom
RUN sed -i "/# <additional-user-commands>/i set -e -a && source /run/husarion/panther_config.env" /*_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
2 changes: 0 additions & 2 deletions Dockerfile.simulation
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ RUN apt-get update && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/ros_entrypoint.sh"]
53 changes: 25 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,57 @@ Docker images dedicated to Husarion Panther ROS system and simulation.

## Docker Images

Docker images are automatically deployed to Docker Hub. Image tag includes information about the ROS distribution, the version of the [panther_ros](https://github.com/husarion/panther_ros/tree/ros2-devel) repository, and the date of release. Additionally stable image versions are tagged with `stable` and recommended for production use.
Docker images are automatically deployed to Docker Hub. Image tag includes information about the ROS distribution, the version of the [panther_ros](https://github.com/husarion/panther_ros/tree/ros2-devel) repository, and the date of release. Additionally stable image versions are tagged with `stable` and recommended for production use.
Below, you can find a list of available Docker images. To access the latest tag, simply follow provided links:

- [husarion/panther](https://hub.docker.com/r/husarion/panther) - ROS packages for Panther robot,
- [husarion/panther-gazebo](https://hub.docker.com/r/husarion/panther-gazebo) - Simulation for Panther robot in Gazebo-classic.

## Updating Panther Software

> **Note**
> Latest Panther Docker images are compatible with Built-in Computer OS version 2.0.0 and newer. If your operating system is older, please ensure you update it before proceeding. **[COMING SOON]** Follow [operating system reinstallation](ros2-os-instalation-link) for more info.
> [!Note] Latest Panther Docker images are compatible with Built-in Computer OS version 2.0.0 and newer. If your operating system is older, please ensure you update it before proceeding. **[COMING SOON]** Follow [operating system reinstallation](ros2-os-instalation-link) for more info.
Connect to Panther's Built-in Computer:

```bash
ssh husarion@10.15.20.2
```

Edit Docker compose file:
## Quick Start

Depending on your needs, you can run Docker to quickly launch the physical robot or run a simulation. To do this, clone this repository to your robot or computer.

```bash
nano compose.yaml
git clone -b ros2 https://github.com/husarion/panther-docker.git
cd panther-docker/demo
```

Update Docker image tag:
### 🤖 Robot

```yaml
panther_ros:
image: husarion/panther:<newest-stable-tag> # example tag: humble-2.0.0-20231208-stable
```
1. Activate Panther

Restart Docker containers:
```bash
docker compose up
```

```bash
docker compose up -d --force-recreate
```
2. Launch Visualization on PC

## Running Simulation
```bash
xhost local:root
docker compose -f compose.rviz.yaml up
```

To give Docker access to your screen run:
> [!NOTE]
> To use the latest version of the image, run the `docker compose pull` command and rerun above commands.
```bash
xhost local:docker
```
### 💻 Gazebo Simulation

Depending on your hardware configuration your `compose.yaml` file may differ. For Intel and AMD users you will need the following configuration: [compose.simulation.yaml](./demo/simulation/compose.simulation.yaml).
To launch the simulation, from the directory containing Docker compose file run:
To give Docker access to your screen run:

```bash
docker compose -f compose.simulation.yaml up
xhost local:docker
docker compose -f compose.gazebo.yaml up
```

Nvidia users have to install NVIDIA Container Toolkit. Installation steps can be found [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). With NVIDIA Container Toolkit installed following Docker compose file will be needed: [compose.simulation-gpu.yaml](./demo/simulation/compose.simulation-gpu.yaml).
To launch the simulation, from the directory containing Docker compose file run:

```bash
docker compose -f compose.simulation-gpu.yaml up
```
> [!NOTE]
> If you have an NVIDIA GPU, it is worth changing the compos configuration from cpu-config to gpu-config. For this purpose, it is necessary to install [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). With NVIDIA Container Toolkit installed following Docker compose file will be needed: [compose.simulation-gpu.yaml](./demo/simulation/compose.simulation-gpu.yaml).
1 change: 1 addition & 0 deletions demo/.env.cpu
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DISPLAY=${DISPLAY:?You need to define display env}
LIBGL_ALWAYS_SOFTWARE=1 # comment if you want to use CPU for rendering
QT_X11_NO_MITSHM=1
4 changes: 3 additions & 1 deletion demo/compose.simulation.yaml → demo/compose.gazebo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ x-common-config:
&common-config
network_mode: host
ipc: host
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # TODO: Fix Default FastDDS

x-cpu-config:
&cpu-config
Expand All @@ -14,7 +16,7 @@ x-gpu-config:

services:
panther:
image: husarion/panther-gazebo:humble
image: husarion/panther-gazebo:humble-ros2-update
# build:
# context: ..
# dockerfile: Dockerfile.simulation
Expand Down
2 changes: 2 additions & 0 deletions demo/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ x-common-config:
network_mode: host
ipc: host
restart: always
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp # TODO: Fix Default FastDDS

x-cpu-config:
&cpu-config
Expand Down

0 comments on commit 035bb7b

Please sign in to comment.