-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare packages for new release (#938)
* Add development container * fix executables * fix webots controller * fix error details * fix urdf * fix tiago * fix * add jazzy ci * fix * remove iron support * delete hotfix * test ci * print only stderr * use load_and_initialize_components * fix resourcemanager * fix lint * fix * add more options to the container * add WebotsResourceManager * cleanup * fix multirobot example * format * ci * add changelog * ci * ci * ci * ci --------- Co-authored-by: Olivier Michel <[email protected]>
- Loading branch information
1 parent
4448c16
commit b90f915
Showing
39 changed files
with
308 additions
and
67 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ARG ROS_DISTRO=jazzy | ||
|
||
FROM osrf/ros:${ROS_DISTRO}-desktop | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG UID=1000 | ||
ARG DOCKERUSER= | ||
ARG DOCKERUSERCOMMENT= | ||
ARG ROS_DISTRO=jazzy | ||
ARG ROS_TESTING=0 | ||
ARG WEBOTS_VERSION=2023b | ||
|
||
RUN userdel -r ubuntu && \ | ||
useradd -d /${DOCKERUSER} -m \ | ||
-u ${UID} -U \ | ||
-s /usr/bin/bash \ | ||
-c "${DOCKERUSERCOMMENT}" ${DOCKERUSER} && \ | ||
echo "${DOCKERUSER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||
usermod -a -G video ${DOCKERUSER} && \ | ||
usermod -a -G dialout ${DOCKERUSER} | ||
|
||
RUN apt update && apt install -y wget && \ | ||
wget https://github.com/cyberbotics/webots/releases/download/R${WEBOTS_VERSION}/webots_${WEBOTS_VERSION}_amd64.deb -O /tmp/webots.deb && \ | ||
apt install -y /tmp/webots.deb && \ | ||
rm /tmp/webots.deb | ||
|
||
RUN [ "$ROS_TESTING" -eq "1" ] && echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] http://packages.ros.org/ros2-testing/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros2-latest.list || true | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ros-${ROS_DISTRO}-vision-msgs \ | ||
ros-${ROS_DISTRO}-ros2-control \ | ||
ros-${ROS_DISTRO}-ros2-controllers \ | ||
ros-${ROS_DISTRO}-xacro \ | ||
gdb | ||
|
||
COPY ./docker/bashrc /tmp/bashrc | ||
COPY ./docker/webots.conf /${DOCKERUSER}/.config/Cyberbotics/Webots-R${WEBOTS_VERSION}.conf | ||
RUN cat /tmp/bashrc >> /${DOCKERUSER}/.bashrc | ||
|
||
ENV USERNAME=default | ||
USER ${DOCKERUSER} | ||
WORKDIR /${DOCKERUSER}/ros2_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,44 @@ | ||
UID:=$(shell id -u) | ||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/../ | ||
NVIDIA_GPU:=$(shell docker info | grep Runtimes | grep nvidia 1> /dev/null && nvidia-smi 1> /dev/null && echo '--runtime nvidia --gpus all' || echo '') | ||
DOCKERUSER:=cyberbotics | ||
BASENAME:=webots_ros2 | ||
DOCKERUSERCOMMENT:="Cyberbotics" | ||
ROS_DISTRO?=jazzy | ||
ROS_TESTING?=0 | ||
WEBOTS_VERSION?=2023b | ||
|
||
build: | ||
echo "ROS_TESTING=${ROS_TESTING}" | ||
docker build ${ROOT_DIR} \ | ||
-f ${ROOT_DIR}/docker/Dockerfile \ | ||
-t ${BASENAME}-image ${DOCKER_ARGS} \ | ||
--build-arg UID=${UID} \ | ||
--build-arg DOCKERUSER=${DOCKERUSER} \ | ||
--build-arg DOCKERUSERCOMMENT=${DOCKERUSERCOMMENT} \ | ||
--build-arg ROS_TESTING=${ROS_TESTING} \ | ||
--build-arg WEBOTS_VERSION=${WEBOTS_VERSION} \ | ||
--build-arg ROS_DISTRO=${ROS_DISTRO} | ||
|
||
run: | ||
@docker container rm -f ${BASENAME}-container | ||
docker run \ | ||
--net=host \ | ||
--ipc=host \ | ||
--cap-add SYS_ADMIN \ | ||
--name ${BASENAME}-container \ | ||
--privileged \ | ||
--restart unless-stopped \ | ||
-e NVIDIA_DRIVER_CAPABILITIES=all ${NVIDIA_GPU} \ | ||
-e DISPLAY=${DISPLAY} \ | ||
-v ~/.Xauthority:/${DOCKERUSER}/.Xauthority:ro \ | ||
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \ | ||
-v /dev/dri:/dev/dri:ro \ | ||
-v ${ROOT_DIR}:/${DOCKERUSER}/ros2_ws/src/${BASENAME} \ | ||
-v /dev:/dev:rw \ | ||
--entrypoint bash \ | ||
-d -it ${BASENAME}-image | ||
|
||
|
||
exec: | ||
docker exec -it ${BASENAME}-container bash |
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,22 @@ | ||
# Docker | ||
|
||
Development container for the project. | ||
|
||
## Dependencies | ||
|
||
```bash | ||
sudo apt install git make curl | ||
curl -sSL https://get.docker.com | sh && sudo usermod -aG docker $USER | ||
``` | ||
|
||
## Usage | ||
|
||
You need to build & run the container only the first time: | ||
```bash | ||
ROS_DISTRO=jazzy ROS_TESTING=1 WEBOTS_VERSION=2023b make build run exec | ||
``` | ||
|
||
After that, you can just attach to the container with: | ||
```bash | ||
make exec | ||
``` |
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,8 @@ | ||
source /opt/ros/${ROS_DISTRO}/setup.bash | ||
source ~/ros2_ws/install/local_setup.bash | ||
alias cb='colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Debug' | ||
alias teleop='ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p stamped:=true' | ||
|
||
# For debugging | ||
export WEBOTS_HOME=/usr/local/webots | ||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/cyberbotics/ros2_ws/src/webots_ros2/webots_ros2_driver/webots/lib/controller |
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,17 @@ | ||
[%General] | ||
checkWebotsUpdateOnStartup=false | ||
pythonCommand=python3 | ||
rendering=true | ||
startupMode=Real-time | ||
telemetry=false | ||
theme=webots_night.qss | ||
|
||
[OpenGL] | ||
GTAO=0 | ||
disableAntiAliasing=true | ||
disableShadows=true | ||
textureFiltering=1 | ||
textureQuality=0 | ||
|
||
[Internal] | ||
firstLaunch=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
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.