Skip to content

Backport #26, #28, #30 from VORC to VRX#31

Merged
mabelzhang merged 7 commits into
masterfrom
backport_26
Nov 2, 2021
Merged

Backport #26, #28, #30 from VORC to VRX#31
mabelzhang merged 7 commits into
masterfrom
backport_26

Conversation

@mabelzhang
Copy link
Copy Markdown
Collaborator

@mabelzhang mabelzhang commented Jan 13, 2021

To test:

# Remove if exists
docker network rm vorc-network

# Rebuild image
./vrx_server/build_image.bash -n
# Prepare team
./prepare_team_wamv.bash example_team

# Change duration of stationkeeping0.world to 60 seconds to shorten test time.
vim generated/task_generated/stationkeeping/worlds/stationkeeping0.world 

# Run some task
./run_trial.bash -n example_team stationkeeping 0

# Test log playback
./replay_trial.bash -n example_team stationkeeping 0
# Test log recording
./generate_trial_video.bash -n example_team stationkeeping 0

Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
@mabelzhang mabelzhang requested a review from caguero January 13, 2021 06:07
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
@mabelzhang mabelzhang changed the title Backport #26 from vorc to vrx Backport #26, #28, #30 from VORC to VRX Jan 13, 2021
mabelzhang and others added 2 commits January 13, 2021 01:39
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
@M1chaelM
Copy link
Copy Markdown
Collaborator

@mabelzhang I'm getting stuck on

./run_trial.bash -n example_team stationkeeping 0

For me this launches the competitor image and then hangs forever. Could you confirm it's working on your end?

@mabelzhang
Copy link
Copy Markdown
Collaborator Author

It'll take me a while to get the environment set up again. Quick check - does it work on master for you?

@M1chaelM
Copy link
Copy Markdown
Collaborator

It'll take me a while to get the environment set up again. Quick check - does it work on master for you?

It does! Hm, so I guess the problem is not with the competitor image.

@mabelzhang
Copy link
Copy Markdown
Collaborator Author

Maybe unrelated, I just realized why it says vorc-network. I think it is not a typo. It was needed because if we were running vorc before that, that network would exist and be hogging the port, possibly the 127.0.0.1. Then the vrx-network will not be able to be established on that port. Something like that.

@M1chaelM
Copy link
Copy Markdown
Collaborator

M1chaelM commented Nov 1, 2021

Seems like something has gone wrong in the new Docker server image. If I build the image on the master branch, switch to this branch and run a trial without rebuilding, it works. Looking at the Dockerfile, the only non-trivial modifications that could affect running the trial are the new / updated scripts:

  • run_vrx_trial.sh
  • gz_utils.sh

@M1chaelM
Copy link
Copy Markdown
Collaborator

M1chaelM commented Nov 1, 2021

OK, I think I found it. The basic problem was just that sandisland.launch has been moved out of vrx_gazebo to vrx_2019 so the launch command in run_vrx_trial.sh was failing. This was confusing because it worked using the master branch, which should not be the case since the change is in the vrx repo.

The reason this was happening has to do with Docker's caching behavior and the way we are building the image. Since we had to modify an early layer in the image when we added psmisc, Docker produced a whole new version of the image for the branch. This included building the vrx repo again, which caused us to get the latest version in the new image. But, when I switched back the master branch, removing the psmisc line caused Docker to use a cached version for everything. That cached version had the old version of vrx in it.

The crux of the problem is that Docker can't tell when a remote repository like vrx needs to be downloaded and rebuilt again, and this can lead to confusing behavior. We might want to change the way we are doing this at some point.

@M1chaelM
Copy link
Copy Markdown
Collaborator

M1chaelM commented Nov 1, 2021

The trial now runs and playback and recording work, but the wamv is spawning way off the end of the world. This may be a separate issue.

@M1chaelM
Copy link
Copy Markdown
Collaborator

M1chaelM commented Nov 2, 2021

This may be a separate issue.

As suspected, this is a separate problem. We have updated to use vrx.launch in this branch, but this branch doesn't include practice worlds in the Sydney Regatta, so the WAMV is set in the wrong place. This should be OK and I don't think it needs to be fixed before merging.

@M1chaelM M1chaelM self-requested a review November 2, 2021 22:08
Copy link
Copy Markdown
Collaborator

@M1chaelM M1chaelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments above; I think this is now working as expected and can be merged.

@mabelzhang
Copy link
Copy Markdown
Collaborator Author

Thank you for reviewing and testing!!

Nice find re the Docker layer! Yeah we encounter that with Docker and building repos from source.
One safe way is to specify --no-cache after the docker build command, and let the developer remove it. If they don't remember to remove it, then it'll just always take forever to build.
I'm lazy, so I don't specify it in the repo, and instead add the --no-cache manually when something is fishy.

@mabelzhang mabelzhang merged commit 7db2794 into master Nov 2, 2021
@mabelzhang mabelzhang deleted the backport_26 branch November 2, 2021 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants