Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into add-docker-role-to-…
Browse files Browse the repository at this point in the history
…dev-env
  • Loading branch information
hakuturu583 committed Nov 22, 2023
2 parents ec6fdf7 + 1163cc1 commit 53579d3
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 8 deletions.
4 changes: 2 additions & 2 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 Down Expand Up @@ -49,4 +49,4 @@ COPY ./vrx_entrypoint.sh /

COPY ./run_vrx_gazebo.bash /

ENTRYPOINT ["/vrx_entrypoint.sh"]
ENTRYPOINT ["/vrx_entrypoint.sh"]
11 changes: 9 additions & 2 deletions .github/workflows/docker/vrx/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Docker Image for Virtual RobotX

## How to use

Firstly, run wamvtan/vrx
```bash
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
```
Next, run another docker_image wamvtan/dev_container which includes our autonomous system.
```bash
docker run wamvtan/vrx
docker run -it wamvtan/dev_container /bin/bash
ros2 run vrx_bridge vrx_bridge_node&
ros2 launch navi_sim navi_sim.launch.py&
```

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
2 changes: 1 addition & 1 deletion .github/workflows/docker/vrx/vrx_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export GAZEBO_IP=127.0.0.1
export GAZEBO_IP_WHITE_LIST=127.0.0.1

/run_vrx_gazebo.bash
exec "$@"
exec "$@"
7 changes: 7 additions & 0 deletions ansible/roles/build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
command: rosdep install -y -r -i --from-paths {{ workspace_path }}/src --ignore-src --rosdistro humble
become: yes

- name: add colcon mixin
command: colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
ignore_errors: true

- name: update colcon mixin
command: colcon mixin update default

- name: load env variable & build
shell: |-
cd {{ workspace_path }}
Expand Down
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
4 changes: 2 additions & 2 deletions ansible/roles/ros2/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# shell: apt-get -y update && apt-get -y upgrade && apt-get --with-new-pkgs -y upgrade && aptitude -y full-upgrade && apt-get -y update && apt-get -y upgrade
# become: yes

- name: install ros2 humble/colcon/vcs
- name: install ros2 humble/vcs
become: yes
apt:
name: "{{ packages }}"
Expand All @@ -70,8 +70,8 @@
packages:
- "{{ ros_package_name }}"
- python3-colcon-common-extensions
- python3-colcon-mixin
- python3-vcstool
- python3-colcon-common-extensions
- python3-rospkg
- python3-catkin-pkg
- python3-rosdep
Expand Down

0 comments on commit 53579d3

Please sign in to comment.