current state Tue Mar 25 12:24:12 WEST 2025

This commit is contained in:
Niklas Halle 2025-03-25 12:24:12 +01:00
parent 294c82ead0
commit 84a9f1baa0
5 changed files with 11989 additions and 168 deletions

80
.gitignore vendored Normal file
View file

@ -0,0 +1,80 @@
# Prerequisites
*.d
# 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
# IntelliJ project files
.idea
*.iml
out
gen
# VS Code project files
.vscode/
### ROS2
install/
log/
build/
# Ignore generated docs
*.dox
*.wikidoc
# eclipse stuff
.project
.cproject
# qcreator stuff
CMakeLists.txt.user
srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user
*~
# Emacs
.#*
# Colcon custom files
COLCON_IGNORE
AMENT_IGNORE
## custom stuff
# python 3.10 venv
venv310/
# analysis output dir
analysis/

View file

@ -1,5 +1,65 @@
FROM osrf/ros:foxy-desktop # Set the ROS distribution as an argument, defaulting to 'jazzy'
ARG ROS_DISTRO=foxy
RUN apt update && apt install -y ninja-build clang-18 # You can find available ROS images here: https://hub.docker.com/_/ros/tags
FROM osrf/ros:${ROS_DISTRO}-desktop
RUN echo "source /opt/ros/foxy/setup.bash" >> /root/.bashrc # Set the maintainer information for this Dockerfile
LABEL maintainer="Niklas Halle <niklas@niklashalle.net>"
# Set environment variables
ENV PIP_BREAK_SYSTEM_PACKAGES=1
ENV DEBIAN_FRONTEND=noninteractive
# Set the default shell to bash for RUN commands
# This ensures all RUN commands use bash instead of sh
SHELL ["/bin/bash", "-c"]
# Update the system and install essential tools
# This step upgrades all packages and installs utilities needed for development
RUN apt-get update -q && \
apt-get upgrade -yq && \
apt-get install -yq --no-install-recommends \
apt-utils wget curl git build-essential vim sudo \
lsb-release locales bash-completion tzdata gosu \
gedit htop nano libserial-dev ninja-build clang-18
# Update packages and install dependencies
RUN apt-get update && \
apt-get install -y software-properties-common curl build-essential && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y \
python3.10 \
python3.10-venv \
python3.10-dev \
python3.10-distutils \
curl && \
rm -rf /var/lib/apt/lists/*
# Install additional tools required for ROS 2 development
# These packages help with building and managing ROS 2 workspaces
RUN apt-get update -q && \
apt-get install -y gnupg2 iputils-ping usbutils \
python3-argcomplete python3-colcon-common-extensions python3-networkx python3-pip python3-rosdep python3-vcstool
# Set up the ROS 2 environment
# This ensures that ROS 2 commands are available in the shell
# rosdep is a tool for installing system dependencies for ROS packages
RUN rosdep update && \
grep -F "source /opt/ros/${ROS_DISTRO}/setup.bash" /root/.bashrc || echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /root/.bashrc && \
grep -F "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" /root/.bashrc || echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> /root/.bashrc
# Bootstrap pip manually (recommended way)
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
# Set Python 3.10 as default Python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
# Install modern nodejs (optional but good practice for JupyterLab widgets)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm
# Install JupyterLab globally
RUN python3 -m pip install --upgrade jupyterlab

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

21
setup-venv.sh Normal file
View file

@ -0,0 +1,21 @@
#!/bin/bash
# Creates and sets up your Python 3.10 venv
python3.10 -m venv venv310
source venv310/bin/activate
# Install Python packages
pip install --upgrade pip
pip install \
numpy \
matplotlib \
ipympl \
jupyterlab \
jupyterlab-widgets \
ipykernel
# Register venv310 as Jupyter kernel
python -m ipykernel install --user --name=venv310 --display-name="Python 3.10 (venv310)"
echo "Setup complete! Activate with: source venv310/bin/activate"
echo "Then start JupyterLab with: jupyter lab --ip=0.0.0.0 --port=8888 --allow-root"