Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ksakash committed Aug 12, 2019
0 parents commit 06ce699
Show file tree
Hide file tree
Showing 389 changed files with 150,616 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.hg*
.vscode
Changelog.md
bitbucket-pipelines.yml
*CHANGELOG.rst
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Virtual RobotX (VRX)

This repository is the home to the source code and software documentation for the VRX Competition. [Competition documentation](https://bitbucket.org/osrf/vrx/wiki/documentation) is available on the project wiki, including links to registration information and documentation of the tasks and technical specifications.

This is an active development project. We are adding and improving things all the time. The project contains a simulation foundation, including an environment similar to the RobotX venue and description of the WAM-V platform. It is intended as a first step for teams that would then extend the tools for their specific development needs.


![VRX](images/sand_island.png)

## Getting Started

* Watch the [Release 0.2 Highlight Video](https://www.youtube.com/watch?v=v23cI4H9RKM)
* The [VRX Wiki](https://bitbucket.org/osrf/vrx/wiki) provides documentation and tutorials.
* The instructions assume a basic familiarity with the ROS environment and Gazebo. If these tools are new to you, we recommend starting with the excellent [ROS Tutorials](http://wiki.ros.org/ROS/Tutorials)
* For technical problems, please us the [project issue tracker](https://bitbucket.org/osrf/vrx/issues?status=new&status=open) to describe your problem or request support.

## Contributing

The simulation tools under active development to support the RobotX teams. We are starting simple with the important fundamental aspects of the robot and environment, but will rely on the community to develop additional functionality around their particular use cases.

If you have any questions about these topics, or would like to work on other aspects, please contribute. You can contact us directly (see below), submit an [issue](https://bitbucket.org/osrf/vrx/issues) or, better yet, submit a [pull request](https://bitbucket.org/osrf/vrx/pull-requests/)!

## Contributors

We continue to receive important improvements from the community. We have done our best to document this on our [Contributors Wiki](https://bitbucket.org/osrf/vrx/wiki/Contributors).

## Contacts

* Carlos Aguero <[email protected]>
* Brian Bingham <[email protected]>
123 changes: 123 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Ubuntu 18.04 with nvidia-docker2 beta opengl support.
ARG BASEIMG=ubuntu:bionic
FROM $BASEIMG

# Set ROS distribution
ARG DIST=melodic

# Set Gazebo verison
ARG GAZ=gazebo9

# Tools useful during development.
RUN apt update \
&& apt install -y \
build-essential \
cppcheck \
curl \
cmake \
lsb-release \
gdb \
git \
mercurial \
python3-dbg \
python3-pip \
python3-venv \
ruby \
software-properties-common \
sudo \
vim \
wget \
libeigen3-dev \
pkg-config \
protobuf-compiler \
&& apt clean

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt update \
&& apt install -y \
tzdata \
&& ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt clean

# Get ROS melodic and Gazebo 9.
COPY docker/keys/gazebo.key /tmp/gazebo.key
COPY docker/keys/ros.key /tmp/ros.key
RUN /bin/sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' \
&& apt-key add /tmp/ros.key \
&& /bin/sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list' \
&& apt-key add /tmp/gazebo.key \
&& apt update \
&& apt install -y \
qtbase5-dev \
libgles2-mesa-dev \
${GAZ} \
lib${GAZ}-dev \
ros-${DIST}-ros-base \
ros-${DIST}-xacro \
ros-${DIST}-gazebo-ros \
ros-${DIST}-gazebo-plugins \
ros-${DIST}-hector-gazebo-plugins \
ros-${DIST}-joy \
ros-${DIST}-joy-teleop \
ros-${DIST}-key-teleop \
ros-${DIST}-robot-localization \
ros-${DIST}-robot-state-publisher \
ros-${DIST}-rviz \
ros-${DIST}-teleop-tools \
ros-${DIST}-teleop-twist-keyboard \
ros-${DIST}-velodyne-simulator \
ros-${DIST}-rqt \
ros-${DIST}-rqt-common-plugins \
&& rosdep init \
&& apt clean

RUN rosdep update

# Set USER and GROUP
ARG USER=developer
ARG GROUP=developer

# Add a user with the same user_id as the user outside the container
# Requires a docker build argument `user_id`.

RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.4-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf - && \
chown root:root /usr/local/bin/fixuid && \
chmod 4755 /usr/local/bin/fixuid && \
mkdir -p /etc/fixuid && \
printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml

RUN addgroup --gid 1000 $USER && \
adduser --uid 1000 --ingroup $USER --home /home/$USER --shell /bin/sh --disabled-password --gecos "" $USER

RUN adduser $USER sudo \
&& echo "$USER ALL=NOPASSWD: ALL" >> /etc/sudoers.d/$USER

# Commands below run as the developer user.
USER $USER:$GROUP

# When running a container start in the developer's home folder.
WORKDIR /home/$USER

# Create workspace
RUN mkdir -p vrx_ws/src/vrx

# Copy the VRX repository from the local file system
# We can't use the USER:GROUP variables until Docker adds support to --chown
COPY --chown=developer:developer . vrx_ws/src/vrx/

# Compile the VRX project.
RUN /bin/bash -c ". /opt/ros/${DIST}/setup.bash && cd vrx_ws && catkin_make"

# Source all the needed environment files.
RUN /bin/sh -c 'echo ". /opt/ros/${DIST}/setup.bash" >> ~/.bashrc' \
&& /bin/sh -c 'echo ". /usr/share/gazebo/setup.sh" >> ~/.bashrc' \
&& /bin/sh -c 'echo ". ~/vrx_ws/devel/setup.sh" >> ~/.bashrc'

ENTRYPOINT ["fixuid"]

CMD ["/bin/bash"]
# Customize your image here.


# ...
75 changes: 75 additions & 0 deletions docker/build.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash

#
# Copyright (C) 2018 Open Source Robotics Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#

# Builds a Docker image.
BUILD_BASE=""
BUILD_ROS_GAZ=""
image_name="vrx"

POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"

case $key in
-n|--nvidia)
BUILD_BASE="--build-arg BASEIMG=nvidia/opengl:1.0-glvnd-devel-ubuntu18.04"
image_name="vrx_nvidia"
shift
;;
-k|--kinetic)
BUILD_BASE="--build-arg BASEIMG=ubuntu:xenial"
image_name="vrx_gaz7"
BUILD_ROS_GAZ="--build-arg DIST=kinetic --build-arg GAZ=gazebo7"
shift
;;
-K|--kinetic-nvidia)
BUILD_BASE="--build-arg BASEIMG=nvidia/opengl:1.1-glvnd-devel-ubuntu16.04"
image_name="vrx_nvidia_gaz7"
BUILD_ROS_GAZ="--build-arg DIST=kinetic --build-arg GAZ=gazebo7"
shift
;;
*) # unknown option
POSITIONAL+=("$1")
shift
;;
esac
done

set -- "${POSITIONAL[@]}"

if [ $# -lt 1 ]
then
echo "Usage: $0 [-n --nvidia] <root of vrx repo>"
exit 1
fi

if [ ! -f $1/docker/Dockerfile ]
then
echo "Err: Directory does not contain a Dockerfile to build."
exit 1
fi


image_plus_tag=$image_name:$(export LC_ALL=C; date +%Y_%m_%d_%H%M)
echo ".*" > "${1}"/.dockerignore
docker build --rm -t $image_plus_tag -f "${1}"/docker/Dockerfile "${1}" $BUILD_BASE $BUILD_ROS_GAZ && \
docker tag $image_plus_tag $image_name:latest && \
echo "Built $image_plus_tag and tagged as $image_name:latest"
rm "${1}"/.dockerignore
11 changes: 11 additions & 0 deletions docker/join.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# Typical usage: ./join.bash vrx
#

IMG=$(basename $1)

xhost +
containerid=$(docker ps -aqf "ancestor=${IMG}")
docker exec --privileged -e DISPLAY=${DISPLAY} -e LINES=`tput lines` -it ${containerid} bash
xhost -
31 changes: 31 additions & 0 deletions docker/keys/gazebo.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)

mQENBFUcKaEBCAD1ajXaWLnow3pZEv44Lypt6s5jAh1rYPN6zpaFZWdkzpwTdYU1
Rpw/0hPzIoiyOPNwCti4E3+dSrv1ogEBu85P2XSy67RnabxF4/z7mPG/++u0EQav
CwfrsN8OpJTtTxk+nKIhVwpAtob+KOLATerTPETrdrKh7qJ/FE8cw/XXbknjwywf
R8uJqaKTu7mWNrTFaS3P5GZF5ss+ztf0EHcyYFMvzEVnSiOGBBL9pw91P1qpggBa
lKL1Ilmf6zZBPihORJ/iTH5qMCAPDdR5BaxxEUHgz+pg+RkLKd2ENEaO+SCDVRhP
yNdkYHpuIslyMHfXrh4y5nHclJ+bNXKXDcudABEBAAG0R09TUkYgUmVwb3NpdG9y
eSAoT1NSRiBSZXBvc2l0b3J5IEdQRyBrZXkpIDxvc3JmYnVpbGRAb3NyZm91bmRh
dGlvbi5vcmc+iQE4BBMBAgAiBQJVHCmhAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIe
AQIXgAAKCRBnFwWYrySXQ/D4CACVnSdHT/1dEkOrYkCnaFLNBrG2tJdBrbIZOxKy
+xV0yGniqsQFAxLESoy+ygaiKdTnAFlA24ozoNY8ur+oKMFt6CrUY01ItTq/WMA1
iper0TO935SpDzNIPjPnD2WUSXShISWP0bFg64g0aAD1S7Yg/v7/eOmMSoeMav0T
h8KOo6yhJuhgGp3lHKAKLppH94b77d8JYqGeP03Gv6gcaqNojyKccdXrKTugZui5
+7V/cOJTo9XqzXjkpfwp24jR8FlKI7EWqCVqtRAXHeqRgo3OaKmuoKLcJ4/8BjSU
+ppmJtEstSaL+qw49P/GQHwUkCHlx1mV5dSdVFLBPreli1ChuQENBFUcKaEBCAC7
ZgTdYubw1sU/4A6+NvW/poBfh2DDOeh3uHJc0y235JFjr+tC1AwouaxLOUm8FE9k
7qzwnyXbeklmXAHxw6wXZdE4PEYA/sgBYhTQy+s4PHlI6TGhwgcROkJKlW4Lld+W
IJ/fzW93DXyhEkV3AAhkrVcOLOgCPdpK5EXxJ3p6dCOKC5Vjyz1PxTNcRaLpp9w6
J0hLIXmmoCN4aoYSXWtL/C9J+B5Cr+HHgrmFsGNrHmmVv1gMXLcVzw5p3Z4d8SuT
g9a1CemSE5bFIoOHKEQRwv/CGpoviAr+T3za3dPFTcSMOoJuYvoheTJ6fhf2sj74
bp2Fwi4L7am/asfa7xWVABEBAAGJAR8EGAECAAkFAlUcKaECGwwACgkQZxcFmK8k
l0OX9Af+IrzUChXf6H0nZZY77gcjwFgVChRX1RLzHTTHum4WNKGP9Sw1aGdHpmdt
LhypQImxdT2yhCPEyB8EQxhgPHjqZ6UUMeYMw5rAvrcb3/ercy5pG7O8Z+Bea6hu
TAXquJ1tsFessZwMS3RUXp/gtZCHbESR7PeBlZJWBWxG/lOmX7Z4fa88dWRU0Pl/
nfns7v6eb57HXbf0teCitRRsJwCMhYbHj2m1slZHMjhEc6kv2bgPmAFb04bcyEAP
BAo3BKu2XUVqE1t7Q2EfsItL/0FpfDY6zGKM6NIi+C40CsRl4W0o6egUhiDqsMYX
9Su5aZdCoxMhzy5QxS3sXcpNAWH2gw==
=YM5F
-----END PGP PUBLIC KEY BLOCK-----
30 changes: 30 additions & 0 deletions docker/keys/ros.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQINBFzvJpYBEADY8l1YvO7iYW5gUESyzsTGnMvVUmlV3XarBaJz9bGRmgPXh7jc
VFrQhE0L/HV7LOfoLI9H2GWYyHBqN5ERBlcA8XxG3ZvX7t9nAZPQT2Xxe3GT3tro
u5oCR+SyHN9xPnUwDuqUSvJ2eqMYb9B/Hph3OmtjG30jSNq9kOF5bBTk1hOTGPH4
K/AY0jzT6OpHfXU6ytlFsI47ZKsnTUhipGsKucQ1CXly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