-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
inomuh
committed
Feb 10, 2023
1 parent
86980ef
commit 4a83e98
Showing
1,317 changed files
with
239,906 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
BasedOnStyle: Google | ||
ColumnLimit: 120 | ||
MaxEmptyLinesToKeep: 1 | ||
SortIncludes: false | ||
|
||
Standard: Auto | ||
IndentWidth: 2 | ||
TabWidth: 2 | ||
UseTab: Never | ||
AccessModifierOffset: -2 | ||
ConstructorInitializerIndentWidth: 2 | ||
NamespaceIndentation: None | ||
ContinuationIndentWidth: 4 | ||
IndentCaseLabels: true | ||
IndentFunctionDeclarationAfterType: false | ||
|
||
AlignEscapedNewlinesLeft: false | ||
AlignTrailingComments: true | ||
|
||
AllowAllParametersOfDeclarationOnNextLine: false | ||
ExperimentalAutoDetectBinPacking: false | ||
ObjCSpaceBeforeProtocolList: true | ||
Cpp11BracedListStyle: false | ||
|
||
AllowShortBlocksOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None | ||
AllowShortCaseLabelsOnASingleLine: false | ||
|
||
AlwaysBreakTemplateDeclarations: true | ||
AlwaysBreakBeforeMultilineStrings: false | ||
BreakBeforeBinaryOperators: false | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializersBeforeComma: true | ||
|
||
BinPackParameters: true | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
DerivePointerBinding: false | ||
PointerBindsToType: true | ||
|
||
PenaltyExcessCharacter: 50 | ||
PenaltyBreakBeforeFirstCallParameter: 30 | ||
PenaltyBreakComment: 1000 | ||
PenaltyBreakFirstLessLess: 10 | ||
PenaltyBreakString: 100 | ||
PenaltyReturnTypeOnItsOwnLine: 50 | ||
|
||
SpacesBeforeTrailingComments: 2 | ||
SpacesInParentheses: false | ||
SpacesInAngles: false | ||
SpaceInEmptyParentheses: false | ||
SpacesInCStyleCastParentheses: false | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterControlStatementKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
|
||
# Configure each individual brace in BraceWrapping | ||
BreakBeforeBraces: Custom | ||
|
||
# Control of individual brace wrapping cases | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: true | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
Checks: '-*, | ||
performance-*, | ||
llvm-namespace-comment, | ||
modernize-redundant-void-arg, | ||
modernize-use-nullptr, | ||
modernize-use-default, | ||
modernize-use-override, | ||
modernize-loop-convert, | ||
modernize-make-shared, | ||
modernize-make-unique, | ||
modernize-avoid-bind, | ||
misc-unused-parameters, | ||
readability-named-parameter, | ||
readability-redundant-smartptr-get, | ||
readability-redundant-string-cstr, | ||
readability-simplify-boolean-expr, | ||
readability-container-size-empty, | ||
readability-identifier-naming, | ||
' | ||
HeaderFilterRegex: '' | ||
AnalyzeTemporaryDtors: false | ||
CheckOptions: | ||
- key: llvm-namespace-comment.ShortNamespaceLines | ||
value: '10' | ||
- key: llvm-namespace-comment.SpacesBeforeComments | ||
value: '2' | ||
- key: misc-unused-parameters.StrictMode | ||
value: '1' | ||
- key: readability-braces-around-statements.ShortStatementLines | ||
value: '2' | ||
# type names | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.UnionCase | ||
value: CamelCase | ||
# method names | ||
- key: readability-identifier-naming.MethodCase | ||
value: camelBack | ||
# variable names | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ClassMemberSuffix | ||
value: '_' | ||
# const static or global variables are UPPER_CASE | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.StaticConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.ClassConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.GlobalVariableCase | ||
value: UPPER_CASE | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# MoveIt Docker Containers | ||
|
||
|
||
For more information see the pages [Continuous Integration and Docker](http://moveit.ros.org/documentation/contributing/continuous_integration.html) and [Using Docker Containers with MoveIt](https://moveit.ros.org/install/docker/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# moveit/moveit:noetic-ci-testing | ||
# Sets up a base image to use for running Continuous Integration on Travis | ||
|
||
ARG IMAGE=noetic | ||
FROM moveit/moveit:${IMAGE}-ci | ||
MAINTAINER Robert Haschke [email protected] | ||
|
||
# Switch to ros-testing | ||
RUN echo "deb http://packages.ros.org/ros-testing/ubuntu `lsb_release -cs` main" | tee /etc/apt/sources.list.d/ros1-latest.list | ||
|
||
# Upgrade packages to ros-testing and clean apt-cache within one RUN command | ||
RUN apt-get -qq update && \ | ||
apt-get -qq -y dist-upgrade && \ | ||
# | ||
# Clear apt-cache to reduce image size | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# moveit/moveit:noetic-ci | ||
# Sets up a base image to use for running Continuous Integration on Travis | ||
|
||
ARG ROS_DISTRO=noetic | ||
FROM ros:${ROS_DISTRO}-ros-base | ||
MAINTAINER Dave Coleman [email protected] | ||
|
||
ENV TERM xterm | ||
|
||
# Setup (temporary) ROS workspace | ||
WORKDIR /root/ws_moveit | ||
|
||
# Copy MoveIt sources from docker context | ||
COPY . src/moveit | ||
|
||
# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size | ||
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers | ||
RUN \ | ||
# Update apt package list as previous containers clear the cache | ||
apt-get -q update && \ | ||
apt-get -q -y dist-upgrade && \ | ||
# | ||
# Install some base dependencies | ||
apt-get -q install --no-install-recommends -y \ | ||
# Some basic requirements | ||
wget git sudo \ | ||
# Preferred build tools | ||
python$(test "${ROS_DISTRO}" = "noetic" && echo 3)-catkin-tools \ | ||
clang clang-format-10 clang-tidy clang-tools \ | ||
ccache && \ | ||
# | ||
# Download MoveIt sources, so that we can fetch all necessary dependencies | ||
wstool init --shallow src src/moveit/.github/workflows/upstream.rosinstall && \ | ||
git clone --depth 1 --branch master https://github.com/ros-planning/moveit_resources src/moveit_resources && \ | ||
# | ||
# Download all dependencies of MoveIt | ||
rosdep update && \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \ | ||
# Remove the source code from this container | ||
rm -rf src && \ | ||
# | ||
# Clear apt-cache to reduce image size | ||
rm -rf /var/lib/apt/lists/* && \ | ||
# Globally disable git security | ||
# https://github.blog/2022-04-12-git-security-vulnerability-announced | ||
git config --global --add safe.directory "*" | ||
|
||
# Continous Integration Setting | ||
ENV IN_DOCKER 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# moveit/moveit:master-experimental | ||
# Based on a moveit source install, adds the mongo driver and the warehouse packages | ||
|
||
FROM moveit/moveit:master-source | ||
|
||
# installing mongocxx driver for the warehouse | ||
RUN git clone -b 26compat https://github.com/mongodb/mongo-cxx-driver.git && \ | ||
apt-get update -qq && \ | ||
apt-get -qq install -y scons mongodb && \ | ||
cd mongo-cxx-driver && \ | ||
scons --use-system-boost --prefix=/usr/local/ --full --disable-warnings-as-errors && \ | ||
ls /usr/local/lib && \ | ||
# scons install && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Download warehouse source | ||
RUN wstool set -yu warehouse_ros_mongo --git https://github.com/ros-planning/warehouse_ros_mongo.git -v jade-devel && \ | ||
wstool set -yu warehouse_ros --git https://github.com/ros-planning/warehouse_ros.git -v jade-devel | ||
|
||
# build the workspace | ||
RUN catkin build --limit-status-rate 0.001 --no-notify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
#!/bin/bash -u | ||
|
||
# This script is used to run a docker container with graphics support. | ||
# All arguments to this script except "-c <container_name>" will be appended to a docker run command. | ||
# If a container name is specified, and this container already exists, the container is re-entered, | ||
# which easily allows entering the same persistent container from multiple terminals. | ||
# See documentation for detailed examples: https://moveit.ros.org/install/docker/ | ||
|
||
# Example commands: | ||
# ./gui-docker --rm -it moveit/moveit:master-source /bin/bash # Run a (randomly named) container that is removed on exit | ||
# ./gui-docker -v ~/ros_ws:/root/ros_ws --rm -it moveit/moveit:master-source /bin/bash # Same, but also link host volume ~/ros_ws to /root/ros_ws in the container | ||
# ./gui-docker -c container_name # Start (or continue) an interactive bash in a moveit/moveit:master-source container | ||
# ./gui-docker # Same, but use the default container name "default_moveit_container" | ||
|
||
function check_nvidia2() { | ||
# If we don't have an NVIDIA graphics card, bail out | ||
lspci | grep -qi "vga .*nvidia" || return 1 | ||
# If we don't have the nvidia runtime, bail out | ||
if ! docker -D info | grep -qi "runtimes.* nvidia" ; then | ||
echo "nvidia-docker v2 not installed (see https://github.com/NVIDIA/nvidia-docker/wiki)" | ||
return 2 | ||
fi | ||
echo "found nvidia-docker v2" | ||
DOCKER_PARAMS="\ | ||
--runtime=nvidia \ | ||
--env=NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all} \ | ||
--env=NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}all" | ||
return 0 | ||
} | ||
|
||
function check_nvidia1() { | ||
# If we don't have an NVIDIA graphics card, bail out | ||
lspci | grep -qi "vga .*nvidia" || return 1 | ||
# Check whether nvidia-docker is available | ||
if ! which nvidia-docker > /dev/null ; then | ||
echo "nvidia-docker v1 not installed either" | ||
return 2 | ||
fi | ||
# Check that nvidia-modprobe is installed | ||
if ! which nvidia-modprobe > /dev/null ; then | ||
echo "nvidia-docker-plugin requires nvidia-modprobe. Please install it!" | ||
return 3 | ||
fi | ||
# Retrieve device parameters from nvidia-docker-plugin | ||
if ! DOCKER_PARAMS=$(curl -s http://localhost:3476/docker/cli) ; then | ||
echo "nvidia-docker-plugin not responding on http://localhost:3476/docker/cli" | ||
echo "See https://github.com/NVIDIA/nvidia-docker/wiki/Installation-(version-1.0)" | ||
return 3 | ||
fi | ||
echo "found nvidia-docker v1" | ||
DOCKER_EXECUTABLE=nvidia-docker | ||
} | ||
|
||
function check_dri() { | ||
# If there is no /dev/dri, bail out | ||
test -d /dev/dri || return 1 | ||
DOCKER_PARAMS="--device=/dev/dri --group-add video" | ||
} | ||
|
||
function transfer_x11_permissions() { | ||
# store X11 access rights in temp file to be passed into docker container | ||
XAUTH=/tmp/.docker.xauth | ||
touch $XAUTH | ||
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - | ||
} | ||
|
||
function count_positional_args() { | ||
while true ; do | ||
case "${1:-}" in | ||
# Skip common options with a subsequent positional argument | ||
# This list is not exhaustive! Augment as you see fit. | ||
-v|--volume) shift ;; | ||
-w) shift ;; | ||
-e) shift ;; | ||
# Skip all other options | ||
-*) ;; | ||
*) break ;; | ||
esac | ||
shift | ||
done | ||
# Return remaining number of arguments | ||
echo $# | ||
} | ||
|
||
if [ $# -eq 0 ] ; then | ||
# If no options are specified at all, use the name "default_moveit_container" | ||
CONTAINER_NAME=default_moveit_container | ||
else | ||
# Check for option -c or --container in first position | ||
case "$1" in | ||
-c|--container) | ||
shift | ||
# If next argument is not an option, use it as the container name | ||
if [[ "${1:-}" != -* ]] ; then | ||
CONTAINER_NAME="${1:-}" | ||
shift | ||
fi | ||
# Set default container name if still undefined | ||
CONTAINER_NAME="${CONTAINER_NAME:-default_moveit_container}" | ||
;; | ||
esac | ||
fi | ||
|
||
transfer_x11_permissions | ||
|
||
# Probe for nvidia-docker (version 2 or 1) | ||
check_nvidia2 || check_nvidia1 || check_dri || echo "No supported graphics card found" | ||
|
||
DOCKER_EXECUTABLE=${DOCKER_EXECUTABLE:-docker} | ||
|
||
# If CONTAINER_NAME was specified and this container already exists, continue it | ||
if [ -n "${CONTAINER_NAME:-}" ] ; then | ||
if [ -z "$($DOCKER_EXECUTABLE ps -aq --filter name=^$CONTAINER_NAME\$)" ] ; then | ||
# container not yet existing: add an option to name the container when running docker below | ||
NAME_OPTION="--name=$CONTAINER_NAME" | ||
if [ "$(count_positional_args $@)" == "0" ] ; then | ||
# If no further (positional) arguments were provided, start a bash in the default image (for dummy users) | ||
DUMMY_DEFAULTS="-it moveit/moveit:master-source bash" | ||
fi | ||
else | ||
if [ -z "$($DOCKER_EXECUTABLE ps -q --filter name=^$CONTAINER_NAME\$)" ] ; then | ||
echo -n "Start existing, but stopped container: " | ||
docker start $CONTAINER_NAME | ||
fi | ||
echo "Entering container: $CONTAINER_NAME" | ||
if [ $# -eq 0 ] ; then | ||
docker exec -it $CONTAINER_NAME bash | ||
else | ||
docker exec $CONTAINER_NAME $@ | ||
fi | ||
rm $XAUTH | ||
exit 0 | ||
fi | ||
fi | ||
|
||
${DOCKER_EXECUTABLE:-docker} run \ | ||
--env="DISPLAY=$DISPLAY" \ | ||
--env="QT_X11_NO_MITSHM=1" \ | ||
--env="XAUTHORITY=$XAUTH" \ | ||
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ | ||
--volume="$XAUTH:$XAUTH" \ | ||
${NAME_OPTION:-} \ | ||
${DOCKER_PARAMS:-} \ | ||
$@ ${DUMMY_DEFAULTS:-} | ||
|
||
# cleanup | ||
rm $XAUTH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Full debian-based install of MoveIt using apt-get | ||
|
||
ARG ROS_DISTRO=noetic | ||
FROM ros:${ROS_DISTRO}-ros-base | ||
MAINTAINER Dave Coleman [email protected] | ||
|
||
# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size | ||
RUN apt-get update -q && \ | ||
apt-get dist-upgrade -q -y && \ | ||
apt-get install -y ros-${ROS_DISTRO}-moveit-* && \ | ||
rm -rf /var/lib/apt/lists/* |
Oops, something went wrong.