Skip to content

Commit

Permalink
Merge pull request #324 from OUXT-Polaris/fix/vrx
Browse files Browse the repository at this point in the history
fix dockerfiles
  • Loading branch information
kentaokamoto authored Nov 1, 2023
2 parents 8e91b55 + c273dff commit 6471e2a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/docker/vrx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG ROSDIST=humble
RUN mkdir -p ~/vrx_ws/src

# TODO: restore version tag
RUN git clone --depth 1 -b 2.3.1 https://github.com/osrf/vrx.git \
RUN git clone --depth 1 -b 2.3.3 https://github.com/osrf/vrx.git \
&& mv ./vrx ~/vrx_ws/src

# Compile the VRX project.
Expand All @@ -22,21 +22,21 @@ RUN /bin/sh -c 'echo ". /opt/ros/${ROSDIST}/setup.bash" >> ~/.bashrc' \
## END OF SECTION BASED ON vrx/docker/Dockerfile

# Cache fuel resources
RUN /bin/bash -c 'gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/post \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/antenna \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_red \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_black \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_green \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_white \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_orange \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_black \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/platypus \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/crocodile \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/turtle \
&& gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/wam-v'
# ADD fuel.gazebosim.org /root/.gz/fuel/fuel.gazebosim.org
# RUN /bin/bash -c 'gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/sydney_regatta \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/post \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/ground_station \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/antenna \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_red \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_black \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_green \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_marker_buoy_white \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_orange \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/mb_round_buoy_black \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/platypus \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/crocodile \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/turtle \
# && gz fuel download -u https://fuel.gazebosim.org/1.0/openrobotics/models/wam-v'
ADD fuel.gazebosim.org /root/.gz/fuel/fuel.gazebosim.org

# read wam-v sensors and thruster config
COPY config /home/config
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker/vrx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## How to use

```bash
docker run wamvtan/vrx
docker run -it wamvtan/vrx /bin/bash
ros2 launch vrx_gz competition.launch.py world:=stationkeeping_task headless:=true urdf:=/home/config/wamv_target.urdf
```

In default setting, you can publish/subscribe these topics.
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/docker/vrx/run_vrx_gazebo.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# generate wamv_target.urdf
ros2 launch vrx_gazebo generate_wamv.launch.py component_yaml:=/home/config/component_config.yaml thruster_yaml:=/home/config/thruster_config.yaml wamv_target:=/home/config/wamv_target.urdf wamv_locked:=False

# launch nav_sim
ros2 launch navi_sim navi_sim.launch.py&

# run vrx_bridge node to exchange sensor info with nav_sim
ros2 run vrx_bridge vrx_bridge_node&

# launch vrx gazebo
ros2 launch vrx_gz competition.launch.py world:=sydney_regatta headless:=true urdf:=/home/config/wamv_target.urdf
# ros2 launch vrx_gz competition.launch.py world:=stationkeeping_task headless:=true urdf:=/home/config/wamv_target.urdf
7 changes: 7 additions & 0 deletions ansible/roles/clone_packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@
version: main
accept_hostkey: yes
tags: [utility]
- name: clone vrx_bridge
git:
repo: https://github.com/OUXT-Polaris/vrx_bridge.git
dest: "{{workspace_path}}/src/utils/vrx_bridge"
version: master
accept_hostkey: yes
tags: [utility]

# Description Packages
- name: clone wamv_description
Expand Down

0 comments on commit 6471e2a

Please sign in to comment.