My ROS 2 and Gazebo Docker setup. This can be extended or used an example for other Docker containers that want to use graphics and have persistent volumes.
- Run Gazebo and ROS 2 in a Docker container
- Persistent workspace
- Graphics support
#Include this at the top of your colab code | |
import os | |
if not os.path.exists('.mujoco_setup_complete'): | |
# Get the prereqs | |
!apt-get -qq update | |
!apt-get -qq install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libgl1-mesa-dev libglew-dev patchelf | |
# Get Mujoco | |
!mkdir ~/.mujoco | |
!wget -q https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz | |
!tar -zxf mujoco.tar.gz -C "$HOME/.mujoco" |
#!/bin/bash | |
URL=$1 | |
DOMAIN=$(echo "$URL" | awk -F[/:] '{print $4}') | |
## Domain starts with | |
if [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-start.txt)\)$) ]]; then | |
chromium-browser "$URL" & disown | |
elif [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-is.txt)\)$) ]]; then | |
firefox "$URL" & disown |