Skip to content

Commit

Permalink
fix vrx image and document (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuturu583 authored Jan 25, 2024
1 parent 8392586 commit 6174abd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 66 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/docker/vrx/DockerFile.copy

This file was deleted.

18 changes: 10 additions & 8 deletions .github/workflows/docker/vrx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
ARG BASEIMG=npslearninglab/watery_robots:vrx_base
FROM $BASEIMG

SHELL ["/bin/bash", "-c"]

# Set ROS distribution
ARG ROSDIST=humble
ARG ROS_DISTRO=humble

# Create workspace
RUN mkdir -p ~/vrx_ws/src
Expand All @@ -14,11 +16,8 @@ RUN git clone --depth 1 -b 2.3.3 https://github.com/osrf/vrx.git \
&& mv ./vrx ~/vrx_ws/src

# Compile the VRX project.
RUN /bin/bash -c ". /opt/ros/${ROSDIST}/setup.bash && cd ~/vrx_ws && colcon build --merge-install"
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && cd ~/vrx_ws && colcon build

# Source all the needed environment files.
RUN /bin/sh -c 'echo ". /opt/ros/${ROSDIST}/setup.bash" >> ~/.bashrc' \
&& /bin/sh -c 'echo ". ~/vrx_ws/install/setup.sh" >> ~/.bashrc'
## END OF SECTION BASED ON vrx/docker/Dockerfile

# Cache fuel resources
Expand All @@ -45,8 +44,11 @@ COPY config /home/config
EXPOSE 11345

# setup entrypoint
COPY ./vrx_entrypoint.sh /
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && \
source ~/vrx_ws/install/local_setup.bash && \
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

COPY ./run_vrx_gazebo.bash /
ADD entrypoint.sh /
RUN chmod +x entrypoint.sh

ENTRYPOINT ["/vrx_entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
set -e

# setup ros environment.
source "/opt/ros/humble/setup.bash" > /dev/null

source "/opt/ros/humble/setup.bash"
# setup vrx environment
source ~/vrx_ws/install/setup.sh
echo "vrx entrypoint executed"

# TODO: optionally disable this so a gzclient can be run on the host for development.
export GAZEBO_IP=127.0.0.1
export GAZEBO_IP_WHITE_LIST=127.0.0.1
# export GAZEBO_IP=127.0.0.1
# export GAZEBO_IP_WHITE_LIST=127.0.0.1

/run_vrx_gazebo.bash
exec "$@"
11 changes: 0 additions & 11 deletions .github/workflows/docker/vrx/run_vrx_gazebo.bash

This file was deleted.

8 changes: 0 additions & 8 deletions ansible/roles/clone_packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,3 @@
version: master
accept_hostkey: yes
tags: [simulation]

- name: clone vrx_bringup
git:
repo: https://github.com/OUXT-Polaris/vrx_bringup.git
dest: "{{workspace_path}}/src/simulation/vrx_bringup"
version: master
accept_hostkey: yes
tags: [simulation]
9 changes: 3 additions & 6 deletions docs/docs/tutorials/vrx_instruction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VRX Documents
# Run with VRX
[Documents](https://github.com/osrf/vrx/wiki/tutorials)

## How to run demo
Expand All @@ -9,7 +9,7 @@

### Run the vrx simulator and lauch vrx simulation
```
docker run -it wamvtan/vrx:latest ros2 launch vrx_gz competition.launch.py world:=stationkeeping_task headless:=true urdf:=/home/config/wamv_target.urdf
docker run -it wamvtan/vrx:latest --net=host --ipc=host --pid=host ros2 launch vrx_gz competition.launch.py world:=stationkeeping_task headless:=true urdf:=/home/config/wamv_target.urdf
```
you can change ```world:=``` for your purpose.

Expand All @@ -19,8 +19,5 @@ Also, vrx recieves [thruster and pose of thruster command](https://github.com/os
- The ekf.lauch commands [geographic_conversion](https://github.com/OUXT-Polaris/geographic_conversion)(geopose_converter_component) and [robotx_ekf_component](https://github.com/OUXT-Polaris/robotx_ekf).

```
ros2 launch vrx_bringup vrx_bringup.launch.xml
ros2 launch vrx_bridge vrx_bringup.launch.xml
```



0 comments on commit 6174abd

Please sign in to comment.