Skip to content

Commit

Permalink
fix vrx image and document
Browse files Browse the repository at this point in the history
Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 committed Jan 24, 2024
1 parent 8392586 commit 2122bd4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 54 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.

4 changes: 2 additions & 2 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 Down

0 comments on commit 2122bd4

Please sign in to comment.