-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into goalie_behaviour
- Loading branch information
Showing
189 changed files
with
1,126 additions
and
741 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,97 @@ | ||
FROM ros:iron | ||
|
||
# Basic Utilities | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update -y \ | ||
&& apt-get install -y apt-utils auto-apt-proxy \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
curl \ | ||
ffmpeg \ | ||
gdb \ | ||
gnupg2 \ | ||
htop \ | ||
iproute2 \ | ||
iputils-ping \ | ||
ipython3 \ | ||
jq \ | ||
less \ | ||
libncurses5-dev \ | ||
locales \ | ||
python3-pip \ | ||
radeontop \ | ||
ranger \ | ||
rsync \ | ||
screen \ | ||
ssh \ | ||
sudo \ | ||
synaptic \ | ||
tig \ | ||
tmux \ | ||
tree \ | ||
uvcdynctrl \ | ||
vim \ | ||
vlc \ | ||
wget \ | ||
x11-apps \ | ||
zsh | ||
|
||
# Setup locale | ||
RUN echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen \ | ||
&& locale-gen \ | ||
&& update-locale LANG=en_US.UTF-8 \ | ||
&& ln -s /usr/bin/python3 /usr/bin/python | ||
|
||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
# Setup and prioritize packages.bit-bots.de repository | ||
RUN apt update -y \ | ||
&& apt upgrade -y --allow-downgrades | ||
|
||
# Additional robotics related packages | ||
RUN apt-get install -y \ | ||
python3-rosdep \ | ||
python3-vcstool \ | ||
ros-iron-camera-calibration \ | ||
ros-iron-desktop \ | ||
ros-iron-joint-state-publisher-gui \ | ||
# ros-iron-plotjuggler-ros containing plotjuggler ros plugins | ||
# build currently fails and is not available as a package so we | ||
# have to manually install plotjuggler and plotjuggler-msgs | ||
# https://github.com/PlotJuggler/plotjuggler-ros-plugins/issues/59 | ||
ros-iron-plotjuggler \ | ||
ros-iron-plotjuggler-msgs \ | ||
ros-iron-rmw-cyclonedds-cpp \ | ||
ros-iron-rqt-robot-monitor \ | ||
ros-iron-soccer-vision-3d-rviz-markers | ||
|
||
# Update pip and install colcon-clean | ||
RUN pip3 install pip -U | ||
|
||
# Install colcon extensions / patches | ||
RUN python3 -m pip install \ | ||
git+https://github.com/ruffsl/colcon-clean \ | ||
git+https://github.com/timonegk/colcon-core.git@colors \ | ||
git+https://github.com/timonegk/colcon-notification.git@colors \ | ||
git+https://github.com/timonegk/colcon-output.git@colors | ||
|
||
# Set zsh as default shell | ||
SHELL ["/bin/zsh", "-c"] | ||
|
||
# Create home directory and colcon workspace | ||
RUN mkdir -p "/root/colcon_ws" | ||
|
||
# Install oh-my-zsh for pretty terminal | ||
RUN sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ | ||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | ||
|
||
# Add zshrc | ||
COPY zshrc "/root/.zshrc" | ||
|
||
# This is required for sharing Xauthority | ||
ENV QT_X11_NO_MITSHM=1 | ||
|
||
# Switch to the workspace directory | ||
WORKDIR "/root/colcon_ws" |
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,43 @@ | ||
{ | ||
"name": "Bit-Bots Iron Dev", | ||
|
||
"build": { "dockerfile": "Dockerfile" }, | ||
|
||
"containerEnv": { | ||
"DISPLAY": "${localEnv:DISPLAY}", | ||
"LIBGL_ALWAYS_SOFTWARE": "1", | ||
"QT_X11_NO_MITSHM": "1", | ||
"DOCKER": "1" | ||
}, | ||
|
||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } } | ||
}, | ||
"extensions": [ | ||
"ms-iot.vscode-ros" | ||
] | ||
} | ||
}, | ||
|
||
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/colcon_ws/src/bitbots_main", | ||
"workspaceFolder": "/root/colcon_ws/src/bitbots_main", | ||
|
||
"mounts": [ | ||
"type=bind,source=${localEnv:HOME},target=/srv/host_home,consistency=cached", | ||
], | ||
|
||
"runArgs": [ | ||
"--tmpfs", "/tmp:exec,mode=01777", | ||
"--privileged", | ||
"--net=host", | ||
"--device=/dev/dri:/dev/dri", | ||
"--volume=/tmp/.X11-unix:/tmp/.X11-unix", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", "seccomp=unconfined" | ||
], | ||
|
||
"postCreateCommand": "git config --global --add safe.directory '*'" | ||
} |
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,120 @@ | ||
# If you come from bash you might have to change your $PATH. | ||
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin:$PATH | ||
|
||
# Path to your oh-my-zsh installation. | ||
export ZSH=$HOME/.oh-my-zsh | ||
|
||
# Set name of the theme to load. | ||
ZSH_THEME="agnoster" | ||
|
||
# Set list of | ||
plugins=( | ||
git | ||
zsh-autosuggestions | ||
) | ||
|
||
# Setups for oh-my-zsh | ||
source $ZSH/oh-my-zsh.sh | ||
|
||
# User configuration | ||
|
||
# You may need to manually set your language environment | ||
export LANG=en_US.UTF-8 | ||
export LANGUAGE=en_US:en | ||
|
||
# Set personal aliases, overriding those provided by oh-my-zsh libs, | ||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | ||
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | ||
# For a full list of active aliases, run `alias`. | ||
# | ||
# Example aliases | ||
# alias zshconfig="mate ~/.zshrc" | ||
# alias ohmyzsh="mate ~/.oh-my-zsh" | ||
function mkcd(){ | ||
mkdir -p $1 | ||
cd $1 | ||
} | ||
|
||
function mksh(){ | ||
vim $1.sh | ||
chmod 744 $1.sh | ||
} | ||
|
||
|
||
# Settings for the terminal | ||
bindkey "^H" backward-kill-word | ||
bindkey "^[[1;5C" forward-word | ||
bindkey "^[[1;5D" backward-word | ||
|
||
|
||
# Settings for the prompt to show that we are in a docker container | ||
export PROMPT="%K{black} 🐋 %K{blue}%F{black}%/ %f%k%F{blue}%f " # Prefix the prompt with DOCKER | ||
|
||
# Do ros2 specific things | ||
source /opt/ros/iron/setup.zsh &> /dev/null | ||
|
||
# Ignore some deprecation warnings | ||
export PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources | ||
|
||
# Limit ROS 2 communication to localhost (can be overridden when needed) | ||
export ROS_DOMAIN_ID=24 | ||
export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST | ||
|
||
# Set the default colcon workspace | ||
export COLCON_WS="$HOME/colcon_ws" | ||
|
||
# Set the default log level for colcon | ||
export COLCON_LOG_LEVEL=30 | ||
|
||
# Define a log layout | ||
export RCUTILS_COLORIZED_OUTPUT=1 | ||
export RCUTILS_CONSOLE_OUTPUT_FORMAT="[{severity}] [{name}]: {message}" | ||
|
||
# Set the default Middleware | ||
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
|
||
# Create a function to update the argcomplete so tab completion works | ||
# This needs to be called every time we source something ROS 2 related | ||
function update_ros2_argcomplete() { | ||
eval "$(register-python-argcomplete3 colcon)" | ||
eval "$(register-python-argcomplete3 ros2)" | ||
} | ||
|
||
# Update the tab completion | ||
update_ros2_argcomplete | ||
|
||
alias rr='ros2 run' | ||
alias rl='ros2 launch' | ||
|
||
alias rte='ros2 topic echo' | ||
alias rtl='ros2 topic list' | ||
alias rth='ros2 topic hz' | ||
alias rtp='ros2 topic pub' | ||
|
||
alias rpl='ros2 param list' | ||
alias rpg='ros2 param get' | ||
|
||
alias cdc='cd $COLCON_WS' | ||
|
||
alias cba='cdc && colcon build --symlink-install --continue-on-error' | ||
alias cb='cdc && colcon build --symlink-install --continue-on-error --packages-up-to' | ||
alias cbs='cdc && colcon build --symlink-install --packages-select' | ||
alias cc='cdc && colcon clean packages --packages-select' | ||
alias cca='cdc && colcon clean packages' | ||
|
||
alias sr='source /opt/ros/iron/setup.zsh && update_ros2_argcomplete' | ||
alias sc='source $COLCON_WS/install/setup.zsh && update_ros2_argcomplete' | ||
alias sa='sr && sc' | ||
|
||
# Set default editor | ||
export VISUAL="vim" | ||
|
||
# Some user instructions | ||
echo "Hello there! Welcome to the Bit-Bots ROS 2 development environment!" | ||
echo "If you just (re)build this container a few manual steps are nessessary:" | ||
echo "Create a ssh key with 'ssh-keygen -q -f $HOME/.ssh/id_rsa -N \"\" && cat $HOME/.ssh/id_rsa.pub'." | ||
echo "Copy the commands output and add it to your GitHub account ('https://github.com/settings/keys') (ctrl+click to open in browser)." | ||
echo "Now you can install the rest of the workspace and compile everything with 'make install && cba'." | ||
echo "To update an existing workspace you can use 'make update && cba'." | ||
echo "To compile all packages in the workspace use 'cba'. If you want to compile only a specific package use 'cbs <package_name>'." | ||
echo "Run 'xhost local:root' in a terminal on the host machine to enable GUI applications (e.g. rviz2) in the container. This needs to be done after every restart of the host machine." |
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
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
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
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
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
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
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
Oops, something went wrong.