Skip to content

Commit

Permalink
[Release] 1.8.0 (autowarefoundation#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfunaoka authored Aug 31, 2018
2 parents 470b04b + dc9bb6c commit 88a1f08
Showing 995 changed files with 68,262 additions and 18,948 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "ros/src/msgs/platform_automation_msgs"]
path = ros/src/msgs/platform_automation_msgs
url = https://github.com/astuff/platform_automation_msgs.git
branch = 51ceed71c28773887648993ceec803ca498698ae
86 changes: 60 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,12 @@ matrix:
os: linux
sudo: required
env: ROS_DISTRO=kinetic
- dist: xenial
os: linux
sudo: required
services:
- docker
env: ROS_DISTRO=kinetic CROSS_COMPILE=1
- dist: trusty
compiler: gcc
os: linux
@@ -22,36 +28,32 @@ env:
- CI_SOURCE_PATH=$(pwd)
- ROSINSTALL_FILE=$CI_SOURCE_PATH/dependencies.rosinstall
- CATKIN_OPTIONS=$CI_SOURCE_PATH/catkin.options
- PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
- PYTHONPATH=${PYTHONPATH}:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages

# Install system dependencies, and Autoware pre requisites (non-ros)
before_install:
- sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
- sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
# Autoware pre requisites should be installed automatically by rosdep not in here
- sudo apt-get update
- sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin
- source /opt/ros/$ROS_DISTRO/setup.bash
- sudo rosdep init
- rosdep update

# Create a catkin workspace with the package under integration.
install:
- cd ros/src
- catkin_init_workspace
- cd ..
- if [ "${CROSS_COMPILE}" != "1" ]; then
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list";
travis_retry sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116;
travis_retry sudo apt-get update;
travis_retry sudo apt-get install -y dpkg;
travis_retry sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-${ROS_DISTRO}-catkin;
source /opt/ros/${ROS_DISTRO}/setup.bash;
travis_retry sudo rosdep init;
travis_retry rosdep update;
fi

# Install all ros dependencies, using wstool first and rosdep second.
# wstool looks for a ROSINSTALL_FILE defined in the environment variables.
before_script:
# source dependencies: install using wstool.
- cd src
- wstool init
- if [[ -f $ROSINSTALL_FILE ]] ; then wstool merge $ROSINSTALL_FILE ; fi
- wstool up
# package depdencies: install using rosdep.
- cd ..
- rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
- if [ "${CROSS_COMPILE}" != "1" ]; then
cd ros/src;
wstool init;
test -f "${ROSINSTALL_FILE}" && wstool merge "${ROSINSTALL_FILE}";
travis_retry wstool up;
cd ..;
travis_retry rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO};
fi

# Compile and test (mark the build as failed if any step fails). If the
# CATKIN_OPTIONS file exists, use it as an argument to catkin_make, for example
@@ -62,9 +64,41 @@ before_script:
# fails. Running `catkin_test_results` aggregates all the results and returns
# non-zero when a test fails (which notifies Travis the build failed).
script:
- catkin_make clean
- source devel/setup.bash
- catkin_make -j4
- if [ "${CROSS_COMPILE}" == "1" ]; then
AUTOWARE_HOME=${TRAVIS_BUILD_DIR};
AUTOWARE_TARGET_ARCH=aarch64;
AUTOWARE_TARGET_PLATFORM=generic-aarch64;
AUTOWARE_BUILD_PATH=${AUTOWARE_HOME}/ros/build-${AUTOWARE_TARGET_PLATFORM};
AUTOWARE_DEVEL_PATH=${AUTOWARE_HOME}/ros/devel-${AUTOWARE_TARGET_PLATFORM};
AUTOWARE_TOOLCHAIN_FILE_PATH=${AUTOWARE_HOME}/ros/cross_toolchain.cmake;
AUTOWARE_SYSROOT=/sysroot/${AUTOWARE_TARGET_PLATFORM};

travis_retry docker run
-e AUTOWARE_SYSROOT=${AUTOWARE_SYSROOT}
--rm
-v ${AUTOWARE_HOME}:${AUTOWARE_HOME}
-w ${AUTOWARE_HOME}/ros
autoware/build:${AUTOWARE_TARGET_PLATFORM}-kinetic-20180809
bash
-c "source /opt/ros/kinetic/setup.bash &&
catkin_make
-DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH}
-DCATKIN_DEVEL_PREFIX=${AUTOWARE_DEVEL_PATH}
-DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH}
--build ${AUTOWARE_BUILD_PATH}
clean &&
source devel-${AUTOWARE_TARGET_PLATFORM}/setup.bash &&
catkin_make
-DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH}
-DCATKIN_DEVEL_PREFIX=${AUTOWARE_DEVEL_PATH}
-DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH}
--build ${AUTOWARE_BUILD_PATH}
-j4";
else
catkin_make clean;
source devel/setup.bash;
catkin_make -j4;
fi

#sudo: required
#dist: trusty
82 changes: 82 additions & 0 deletions docker/96boards/Dockerfile.kinetic
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
FROM ubuntu:16.04
MAINTAINER Kenji Funaoka <[email protected]>

# Develop
RUN apt-get update && apt-get install -y \
software-properties-common \
wget curl git cmake cmake-curses-gui \
libboost-all-dev \
libflann-dev \
libgsl0-dev \
libgoogle-perftools-dev \
libeigen3-dev

# Intall some basic GUI and sound libs
RUN apt-get update && apt-get install -y \
xz-utils file locales dbus-x11 pulseaudio dmz-cursor-theme \
fonts-dejavu fonts-liberation hicolor-icon-theme \
libcanberra-gtk3-0 libcanberra-gtk-module libcanberra-gtk3-module \
libasound2 libgtk2.0-0 libdbus-glib-1-2 libxt6 libexif12 \
libgl1-mesa-glx libgl1-mesa-dri language-pack-en \
&& update-locale LANG=en_US.UTF-8 LC_MESSAGES=POSIX

# Intall some basic GUI tools
RUN apt-get update && apt-get install -y \
cmake-qt-gui \
gnome-terminal

# Intall ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
RUN apt-get update && apt-get install -y ros-kinetic-desktop-full ros-kinetic-nmea-msgs ros-kinetic-nmea-navsat-driver ros-kinetic-sound-play ros-kinetic-jsk-visualization ros-kinetic-grid-map ros-kinetic-gps-common
RUN apt-get update && apt-get install -y ros-kinetic-controller-manager ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-gazebo-ros-control ros-kinetic-joystick-drivers
RUN apt-get update && apt-get install -y libnlopt-dev freeglut3-dev qtbase5-dev libqt5opengl5-dev libssh2-1-dev libarmadillo-dev libpcap-dev gksu libgl1-mesa-dev libglew-dev python-wxgtk3.0 software-properties-common libmosquitto-dev libyaml-cpp-dev python-flask python-requests

# Add basic user
ENV USERNAME autoware
ENV PULSE_SERVER /run/pulse/native
RUN useradd -m $USERNAME && \
echo "$USERNAME:$USERNAME" | chpasswd && \
usermod --shell /bin/bash $USERNAME && \
usermod -aG sudo $USERNAME && \
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
# Replace 1000 with your user/group id
usermod --uid 1000 $USERNAME && \
groupmod --gid 1000 $USERNAME

# Setup .bashrc for ROS
RUN echo "source /opt/ros/kinetic/setup.bash" >> /home/$USERNAME/.bashrc && \
#Fix for qt and X server errors
echo "export QT_X11_NO_MITSHM=1" >> /home/$USERNAME/.bashrc && \
# cd to home on login
echo "cd" >> /home/$USERNAME/.bashrc

# Change user
USER autoware

RUN sudo rosdep init \
&& rosdep update \
&& echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

# YOLO_V2 -> Unable to install because CMakeLists.txt in vision_yolo2_detect depends on CUDA

# Install Autoware
RUN cd && git clone https://github.com/CPFL/Autoware.git /home/$USERNAME/Autoware
RUN /bin/bash -c 'source /opt/ros/kinetic/setup.bash; cd /home/$USERNAME/Autoware/ros/src; git submodule update --init --recursive; catkin_init_workspace; cd ../; ./catkin_make_release -j2'
RUN echo "source /home/$USERNAME/Autoware/ros/devel/setup.bash" >> /home/$USERNAME/.bashrc

# Setting
ENV LANG="en_US.UTF-8"
RUN echo "export LANG=\"en_US.UTF-8\"" >> /home/$USERNAME/.bashrc

# Install dev tools
RUN sudo apt-get -y install vim tmux

# Change Terminal Color
RUN gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
RUN gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
RUN gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#000000"

# Default CMD
CMD ["/bin/bash"]
22 changes: 22 additions & 0 deletions docker/96boards/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Autoware Docker on 96boards

See [Wiki](https://github.com/CPFL/Autoware/wiki/Docker) for more information.

## How to Build
```
$ cd Autoware/docker/96boards/
# Ubuntu 16.04 (Kinetic)
$ sh build.sh kinetic
```

## How to Run
```
# Default shared directory path is /home/$USER/shared_dir
# Ubuntu 16.04 (Kinetic)
$ sh run.sh kinetic
# If you select your shared directory path
$ sh run.sh kinetic {SHARED_DIR_PATH}
```
10 changes: 10 additions & 0 deletions docker/96boards/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Build Docker Image
if [ "$1" = "kinetic" ]
then
echo "Use $1"
docker build -t autoware-$1 -f Dockerfile.$1 . --no-cache
else
echo "Set distribution, kinetic"
fi
35 changes: 35 additions & 0 deletions docker/96boards/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

XSOCK=/tmp/.X11-unix
XAUTH=/home/$USER/.Xauthority
SHARED_DIR=/home/autoware/shared_dir
HOST_DIR=/home/$USER/shared_dir

if [ "$1" = "kinetic" ]
then
echo "Use $1"
else
echo "Set distribution, kinetic"
exit
fi

if [ "$2" = "" ]
then
# Create Shared Folder
mkdir -p $HOST_DIR
else
HOST_DIR=$2
fi
echo "Shared directory: ${HOST_DIR}"

docker run \
-it --rm \
--volume=$XSOCK:$XSOCK:rw \
--volume=$XAUTH:$XAUTH:rw \
--volume=$HOST_DIR:$SHARED_DIR:rw \
--env="XAUTHORITY=${XAUTH}" \
--env="DISPLAY=${DISPLAY}" \
-u autoware \
--privileged -v /dev/bus/usb:/dev/bus/usb \
--net=host \
autoware-$1
Loading

0 comments on commit 88a1f08

Please sign in to comment.