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
26 changes: 13 additions & 13 deletions .docker/lyrical.amd64.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Install ROS 2 Lyrical, Gazebo Jetty, ArduSub, and MAVROS from this checkout.
COPY extras /tmp/dave-extras
RUN DAVE_EXTRAS_DIR=/tmp/dave-extras \
bash /tmp/dave-extras/ros-lyrical-gz-jetty-install.sh
COPY extras /tmp/posim-extras
RUN POSIM_EXTRAS_DIR=/tmp/posim-extras \
bash /tmp/posim-extras/ros-lyrical-gz-jetty-install.sh
ENV LD_LIBRARY_PATH=/opt/waves/lib
ENV GZ_SIM_SYSTEM_PLUGIN_PATH=/opt/waves/lib:/opt/ardusub_ws/ardupilot_gazebo/build
ENV GZ_SIM_RESOURCE_PATH=/opt/asv_wave_sim/gz-waves-models/models:/opt/asv_wave_sim/gz-waves-models/world_models:/opt/ardusub_ws/ardupilot_gazebo/models:/opt/ardusub_ws/ardupilot_gazebo/worlds
Expand All @@ -37,29 +37,29 @@ RUN curl -L "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64

# Build the exact POSIM revision supplied as the Docker build context. Import the
# companion repositories, but never replace the checked-out POSIM source.
ENV DAVE_WS=/opt/dave_ws
WORKDIR $DAVE_WS/src
COPY . dave
ENV POSIM_WS=/opt/posim_ws
WORKDIR $POSIM_WS/src
COPY . posim
RUN vcs import --shallow --skip-existing \
--input dave/extras/repos/posim.lyrical.repos
--input posim/extras/repos/posim.lyrical.repos

RUN apt-get update && \
rosdep update --rosdistro "$ROS_DISTRO" && \
rosdep install --rosdistro "$ROS_DISTRO" -iy --from-paths . && \
rm -rf /var/lib/apt/lists/*

WORKDIR $DAVE_WS
WORKDIR $POSIM_WS
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" && \
colcon build --merge-install --executor sequential --symlink-install

RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /root/.bashrc && \
echo "source $DAVE_WS/install/setup.bash" >> /root/.bashrc && \
echo "source $POSIM_WS/install/setup.bash" >> /root/.bashrc && \
echo "export PS1='\[\e[1;36m\]\u@POSIM_docker\[\e[0m\]\[\e[1;34m\](\$(hostname | cut -c1-12))\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ '" >> /root/.bashrc

RUN touch /root/.dave_entrypoint && \
printf '\033[1;36mPOSIM - Platform for Ocean Simulation\033[0m\n' >> /root/.dave_entrypoint && \
printf '\033[1;33mROS 2 Lyrical · Gazebo Jetty · ArduSub · MAVROS\033[0m\n\n' >> /root/.dave_entrypoint && \
echo 'cat /root/.dave_entrypoint' >> /root/.bashrc
RUN touch /root/.posim_entrypoint && \
printf '\033[1;36mPOSIM - Platform for Ocean Simulation\033[0m\n' >> /root/.posim_entrypoint && \
printf '\033[1;33mROS 2 Lyrical · Gazebo Jetty · ArduSub · MAVROS\033[0m\n\n' >> /root/.posim_entrypoint && \
echo 'cat /root/.posim_entrypoint' >> /root/.bashrc

WORKDIR /root

Expand Down
26 changes: 13 additions & 13 deletions .docker/lyrical.arm64v8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ RUN export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-inf
ros-${ROS_DISTRO}-image-view \
python3-rosdep python3-vcstool python3-colcon-common-extensions

# --- DAVE workspace ---
# --- POSIM workspace ---
# Build the exact checked-out revision supplied as the Docker build context.
ENV DAVE_UNDERLAY=/home/$USER/dave_ws
WORKDIR $DAVE_UNDERLAY/src
COPY . dave
RUN chown -R $USER:$USER $DAVE_UNDERLAY/src/dave
ENV POSIM_UNDERLAY=/home/$USER/posim_ws
WORKDIR $POSIM_UNDERLAY/src
COPY . posim
RUN chown -R $USER:$USER $POSIM_UNDERLAY/src/posim

# Keep the companion repositories from the inherited DAVE workspace, while
# preserving the exact POSIM checkout copied above.
RUN vcs import --shallow --skip-existing \
--input dave/extras/repos/posim.lyrical.repos && \
chown -R $USER:$USER $DAVE_UNDERLAY
--input posim/extras/repos/posim.lyrical.repos && \
chown -R $USER:$USER $POSIM_UNDERLAY

RUN apt-get update && \
(rosdep init 2>/dev/null || true) && \
Expand All @@ -131,7 +131,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

USER $USER
WORKDIR $DAVE_UNDERLAY
WORKDIR $POSIM_UNDERLAY
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" && \
colcon build --merge-install --executor sequential --symlink-install

Expand Down Expand Up @@ -180,7 +180,7 @@ RUN git clone --depth 1 https://github.com/ArduPilot/ardupilot_gazebo.git \

# Waves are built during the normal POSIM image build. The upstream checkout
# and GPL notices stay separate from POSIM under /opt/asv_wave_sim.
RUN bash $DAVE_UNDERLAY/src/dave/extras/install-waves.sh
RUN bash $POSIM_UNDERLAY/src/posim/extras/install-waves.sh
ENV LD_LIBRARY_PATH=/opt/waves/lib
ENV GZ_SIM_SYSTEM_PLUGIN_PATH=/opt/waves/lib:/home/$USER/ardupilot_gazebo/build
ENV GZ_SIM_RESOURCE_PATH=/opt/asv_wave_sim/gz-waves-models/models:/opt/asv_wave_sim/gz-waves-models/world_models:/home/$USER/ardupilot_gazebo/models:/home/$USER/ardupilot_gazebo/worlds
Expand Down Expand Up @@ -217,7 +217,7 @@ RUN curl -L "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64

USER root
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USER/.bashrc && \
echo "source $DAVE_UNDERLAY/install/setup.bash" >> /home/$USER/.bashrc && \
echo "source $POSIM_UNDERLAY/install/setup.bash" >> /home/$USER/.bashrc && \
echo "export PATH=/home/$USER/.local/bin:/usr/local/bin:\$PATH" >> /home/$USER/.bashrc && \
echo "export GZ_SIM_SYSTEM_PLUGIN_PATH=/home/$USER/ardupilot_gazebo/build:\${GZ_SIM_SYSTEM_PLUGIN_PATH:-}" >> /home/$USER/.bashrc && \
echo "export GZ_SIM_RESOURCE_PATH=/home/$USER/ardupilot_gazebo/models:/home/$USER/ardupilot_gazebo/worlds:\${GZ_SIM_RESOURCE_PATH:-}" >> /home/$USER/.bashrc && \
Expand All @@ -228,9 +228,9 @@ RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USER/.bashrc && \
echo "export PS1='\[\e[1;36m\]\u@POSIM_docker\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ '" >> /home/$USER/.bashrc

# --- Run (no systemd inside this container) ---
COPY extras/docker-arm64-entrypoint.sh /usr/local/bin/dave-rdp-entrypoint
RUN chmod 0755 /usr/local/bin/dave-rdp-entrypoint
CMD ["/usr/local/bin/dave-rdp-entrypoint"]
COPY extras/docker-arm64-entrypoint.sh /usr/local/bin/posim-rdp-entrypoint
RUN chmod 0755 /usr/local/bin/posim-rdp-entrypoint
CMD ["/usr/local/bin/posim-rdp-entrypoint"]

LABEL org.opencontainers.image.title="POSIM" \
org.opencontainers.image.description="Platform for Ocean Simulation" \
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/good-first-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ Nothing. This issue is meant to welcome you to Open Source :) We are happy to wa

- [ ] 🗄️ **Create a local workspace** for making your changes and testing [following these instructions](https://docs.ros.org/en/lyrical/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace.html)

- [ ] 🍴 **Fork the repository** using the handy button at the top of the repository page and **clone** it into `~/ros2_ws/src/dave`, [here is a guide that you can follow](https://guides.github.com/activities/forking/) (You will have to remove or empty the existing `dave` folder before cloning your own fork)
- [ ] 🍴 **Fork the repository** using the handy button at the top of the repository page and **clone** it into `~/ros2_ws/src/posim`, [here is a guide that you can follow](https://guides.github.com/activities/forking/) (You will have to remove or empty the existing `posim` folder before cloning your own fork)

- [ ] **Checkout a new branch** using `git checkout -b <branch_name>`

- [ ] 🤖 **Apply `pre-commit`** auto formatting, by running `pip3 install pre-commit` and running `pre-commit install` in the dave repo.
- [ ] 🤖 **Apply `pre-commit`** auto formatting, by running `pip3 install pre-commit` and running `pre-commit install` in the POSIM repo.

- [ ] 💾 **Commit and Push** your changes

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".docker/**"
- ".dockerignore"
- ".github/workflows/docker-amd64.yml"
- "dave_interfaces/**"
- "posim_interfaces/**"
- "examples/**"
- "extras/**"
- "gazebo/**"
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/docker-arm64v8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".docker/**"
- ".dockerignore"
- ".github/workflows/docker-arm64v8.yml"
- "dave_interfaces/**"
- "posim_interfaces/**"
- "examples/**"
- "extras/**"
- "gazebo/**"
Expand Down Expand Up @@ -43,9 +43,17 @@ jobs:
steps:
- name: Configure non-interactive Docker credentials
run: |
# Read the selected daemon before isolating credentials. A new
# DOCKER_CONFIG otherwise loses Docker Desktop's desktop-linux context
# and falls back to the absent /var/run/docker.sock on macOS.
docker_host="${DOCKER_HOST:-$(docker context inspect --format '{{.Endpoints.docker.Host}}')}"
docker_config="$RUNNER_TEMP/docker-config"
mkdir -p "$docker_config"
chmod 700 "$docker_config"
printf '{}\n' > "$docker_config/config.json"
chmod 600 "$docker_config/config.json"
echo "DOCKER_HOST=$docker_host" >> "$GITHUB_ENV"
echo "DOCKER_CONTEXT=" >> "$GITHUB_ENV"
echo "DOCKER_CONFIG=$docker_config" >> "$GITHUB_ENV"

- name: Checkout repository
Expand Down
34 changes: 13 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ manipulation tasks for ROS 2 and Gazebo.
POSIM continues the [DAVE](https://github.com/IOES-Lab/dave) codebase, originally
developed as [Project DAVE](https://github.com/Field-Robotics-Lab/dave). This
repository preserves the source history, existing copyright notices, and
Apache-2.0 license. See [origin and compatibility](docs/compatibility.md).
Apache-2.0 license.

## Current development version

Expand All @@ -16,47 +16,41 @@ The initial POSIM import is based on DAVE `ros2` commit
[`8a3f6ab`](https://github.com/IOES-Lab/dave/commit/8a3f6abc2ba14ced787aff8befa0201f6c80ca8c).
POSIM 1.0 has not been released.

Existing ROS package names and launch commands remain available. For example,
the demonstration package is still called `dave_demos`. The initial import
contains the CUDA sonar implementation; the WGPU work in
[DAVE PR #44](https://github.com/IOES-Lab/dave/pull/44) is not included in `main`.
Without a CUDA toolkit, the CUDA-specific sonar targets are skipped during
configuration. A successful build on ARM64 therefore does not establish sonar
availability.
ROS packages, plugin namespaces and launch files use the `posim_` prefix.
Rebuild in a clean workspace when migrating from the earlier `dave_` names.
Existing third-party source attribution is retained.

## Get started

1. Follow the [Ubuntu installation guide](docs/installation.md), or build a
[Docker image from this checkout](docs/docker.md).
1. Run `extras/ros-lyrical-gz-jetty-install.sh`, or build `.docker/lyrical.amd64.dockerfile` / `.docker/lyrical.arm64v8.dockerfile` from this checkout.
2. Open a terminal with the installed ROS and workspace environments loaded.
3. Start a world:

```bash
ros2 launch dave_demos dave_world.launch.py world_name:=dave_ocean_waves
ros2 launch posim_demos posim_world.launch.py world_name:=posim_ocean_waves
```

For a server-only run, append `headless:=true`. On a desktop with rendering
available, start REXROV with:

```bash
ros2 launch dave_demos dave_robot.launch.py \
namespace:=rexrov world_name:=dave_ocean_waves z:=-5 paused:=false
ros2 launch posim_demos posim_robot.launch.py \
namespace:=rexrov world_name:=posim_ocean_waves z:=-5 paused:=false
```

World and model references may download assets from Gazebo Fuel on first use.
More examples are in [the demo guide](examples/dave_demos/README.md).
More examples are in [the demo guide](examples/posim_demos/README.md).

## Library contents

- `models/`: world, vehicle, sensor, and object descriptions and their resources.
- `gazebo/`: model, sensor, world, ROS bridge, and multibeam sonar plugins.
- `examples/dave_demos/`: world, robot, sensor, and object launch entry points.
- `dave_interfaces/`: ROS messages and services used by the library.
- `examples/posim_demos/`: world, robot, sensor, and object launch entry points.
- `posim_interfaces/`: ROS messages and services used by the library.
- `extras/`: dependency installation, repository manifests, and development tools.

The [legacy DAVE Wiki](https://dave-ros2.notion.site) remains available for
background material. Follow this repository's installation instructions for
POSIM; the legacy Wiki is not a POSIM release manual.
Documentation is maintained separately in Notion by IOES-Lab.
The repository contains executable examples and dependency build instructions.

## Contributing

Expand All @@ -73,8 +67,6 @@ pre-commit install
pre-commit run --all-files
```

Maintainers should read [CI and image configuration](docs/maintainer-setup.md)
before enabling Docker builds or publication in this new repository.

## License

Expand Down
61 changes: 0 additions & 61 deletions docs/compatibility.md

This file was deleted.

60 changes: 0 additions & 60 deletions docs/docker.md

This file was deleted.

Loading
Loading