Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cave prep #392

Merged
merged 4 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Prerequisites
*.d
*.orig
*.swp

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
8 changes: 0 additions & 8 deletions .hgignore

This file was deleted.

4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each subdirectory contains a Dockerfile for a particular use case.
### `cloudsim_sim`

This is the docker image that will run a simulation instance in the
same way as CloudSim. Refer to: https://bitbucket.org/osrf/subt/wiki/cloudsim_architecture.
same way as CloudSim. Refer to: https://github.com/osrf/subt/wiki/Cloudsim%20Architecture.

This image should be used in conjunction with `cloudsim_bridge`.

Expand All @@ -31,7 +31,7 @@ This image should be used in conjunction with `cloudsim_bridge`.
### `cloudsim_bridge`

This is the docker image that with run the cloudsim bridge. Refer to:
https://bitbucket.org/osrf/subt/wiki/cloudsim_architecture.
https://github.com/osrf/subt/wiki/Cloudsim%20Architecture.

This image should be used in conjunction with `cloudsim_sim`.

Expand Down
6 changes: 1 addition & 5 deletions docker/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ fi
user_id=$(id -u)
image_name=$(basename $1)
image_plus_tag=$image_name:$(date +%Y_%b_%d_%H%M)
# mercurial adds a + symbol if there are uncomitted changes in the repo
# that will break docker tag syntax
hg_id=$(hg id -i | tr -d '+')
Copy link
Contributor

Choose a reason for hiding this comment

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

When I ported this, I ended up using:

git_id=$(git describe)

It requires you to create annotated tags with git tag -a and make sure they are pushed with git push --tags

Copy link
Contributor

Choose a reason for hiding this comment

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

And it generates version numbers like 0.0.1-14-g136b05b which is $(last tag)-$(commits since tag)-g$(commit hash)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I removed it because we don't use these tagged images, so it felt like a useless chunk of code.


shift

docker build --rm -t $image_plus_tag --build-arg user_id=$user_id "$@" -f $DIR/$image_name/Dockerfile .
docker tag $image_plus_tag $image_name:latest
docker tag $image_plus_tag $image_name:$hg_id

echo "Built $image_plus_tag and tagged as $image_name:latest and $image_name:$hg_id"
echo "Built $image_plus_tag and tagged as $image_name:latest"
3 changes: 1 addition & 2 deletions docker/cloudsim_bridge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ RUN apt-get update -qq \
libspnav-dev \
libusb-dev \
lsb-release \
mercurial \
python3-dbg \
python3-empy \
python3-numpy \
Expand Down Expand Up @@ -103,7 +102,7 @@ RUN rosdep update
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& hg clone https://bitbucket.org/osrf/subt
&& git clone https://github.com/osrf/subt

WORKDIR /home/$USERNAME/subt_ws

Expand Down
2 changes: 1 addition & 1 deletion docker/cloudsim_bridge/run_bridge.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "log4j.logger.ros.roscpp.cached_parameters=INFO" >> /home/developer/.ros/co
echo "log4j.logger.ros.roscpp=DEBUG" >> /home/developer/.ros/config/rosconsole.config

# https://wiki.ros.org/rosconsole#Force_line_buffering_for_ROS_logger
# See also https://bitbucket.org/osrf/subt/issues/204
# See also https://github.com/osrf/subt/issues/204
export ROSCONSOLE_STDOUT_LINE_BUFFERED=1

# atop process monitoring
Expand Down
3 changes: 1 addition & 2 deletions docker/cloudsim_sim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ RUN apt-get update -qq \
libspnav-dev \
libusb-dev \
lsb-release \
mercurial \
python3-dbg \
python3-empy \
python3-numpy \
Expand Down Expand Up @@ -108,7 +107,7 @@ RUN rosdep update
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& hg clone https://bitbucket.org/osrf/subt
&& git clone https://github.com/osrf/subt

# Download the public models
COPY download_models.sh ./
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# This setup replicates the cloud simulation setup for the SubT Virtual
# Testbed.
#
# See also: https://bitbucket.org/osrf/subt/wiki/cloudsim_architecture
# See also: https://github.com/osrf/subt/wiki/Cloudsim%20Architecture
#
# Usage:
#
Expand Down
13 changes: 13 additions & 0 deletions docker/download_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,27 @@ ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/C
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Starting Area" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Cap" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave 3 Way 01" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave 3 Way 01 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Vertical Shaft" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Vertical Shaft Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Elevation" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Elevation Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 01" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 01 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 02" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 02 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30 D" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30 D Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30F" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30F D" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Corner 30F D Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 01" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 01 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 02" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 02 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 03" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 04" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 04 Lights" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 05" -v 4
ign fuel download --url "https://fuel.ignitionrobotics.org/openrobotics/models/Cave Straight 05 Lights" -v 4
3 changes: 1 addition & 2 deletions docker/subt_shell/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apt-get update -qq \
libspnav-dev \
libusb-dev \
lsb-release \
mercurial \
python3-dbg \
python3-empy \
python3-numpy \
Expand Down Expand Up @@ -103,7 +102,7 @@ RUN sudo apt-get update -qq \
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& hg clone https://bitbucket.org/osrf/subt
&& git clone https://github.com/osrf/subt

# Download the public models
COPY download_models.sh ./
Expand Down
3 changes: 1 addition & 2 deletions docker/subt_sim_entry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN apt-get update -qq \
libspnav-dev \
libusb-dev \
lsb-release \
mercurial \
python3-dbg \
python3-empy \
python3-numpy \
Expand Down Expand Up @@ -102,7 +101,7 @@ RUN sudo apt-get update -qq \
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& hg clone https://bitbucket.org/osrf/subt
&& git clone https://github.com/osrf/subt

# Download the public models
COPY download_models.sh ./
Expand Down
3 changes: 1 addition & 2 deletions docker/subt_team_entry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apt-get update -qq \
libspnav-dev \
libusb-dev \
lsb-release \
mercurial \
python3-dbg \
python3-empy \
python3-numpy \
Expand Down Expand Up @@ -103,7 +102,7 @@ RUN sudo apt-get update -qq \
# docker is run
RUN mkdir -p subt_ws/src \
&& cd subt_ws/src \
&& hg clone https://bitbucket.org/osrf/subt
&& git clone https://github.com/osrf/subt

# Download the public models
COPY download_models.sh ./
Expand Down
2 changes: 1 addition & 1 deletion subt_ign/launch/cloudsim_bridge.ign
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
development.

For more information, please refer to
https://bitbucket.org/osrf/subt/wiki/tutorials/cloudsim
https://github.com/osrf/subt/wiki/Cloudsim

Usage: ign launch cloudsim_bridge.ign
[worldName:=<worldName>
Expand Down
2 changes: 1 addition & 1 deletion subt_ign/launch/cloudsim_sim.ign
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cloudsim_bridge.ign, starts a ROS master and the ROS1-Ignition bridge.

For more information, please refer to
https://bitbucket.org/osrf/subt/wiki/tutorials/cloudsim
https://github.com/osrf/subt/wiki/Cloudsim

Usage: ign launch cloudsim_sim.ign
[worldName:=<worldName>
Expand Down