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
| # A way of reproducing https://github.com/ros2/rviz/issues/322 | |
| # | |
| # Code source: | |
| # https://github.com/SebastianGrans/ROS2-Point-Cloud-Demo/blob/79ef97fc92147a0d550543a69541139097cc3b35/pcd_demo/pcd_publisher/pcd_publisher_node.py | |
| import rclpy | |
| from rclpy.node import Node | |
| import sensor_msgs.msg as sensor_msgs | |
| import std_msgs.msg as std_msgs |
| alias cdd="cd ~/Downloads/" | |
| alias cddev="cd ~/Documents/Github" | |
| alias cdc="cddev" | |
| alias gb="git branch -a" | |
| alias gc="git checkout" | |
| alias gcb="git checkout -b" | |
| alias gg="git gui" | |
| alias gl="git log --pretty=oneline --graph" | |
| alias gs="git status" |
| " vim: foldmethod=marker | |
| " Setup instructions | |
| " ------------------ | |
| " 1. Setup Vundle | |
| " ``` | |
| " git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
| " ``` | |
| " 2. Copy the contents of this file into `~/.vimrc` | |
| " 3. Install the plugins with `vim +PluginInstall +qall` |
| #!/bin/bash | |
| if [ -z ${1+x} ]; | |
| then | |
| echo "Exiting - Please enter a package" | |
| exit 1 | |
| fi | |
| if [ -z ${2+x} ]; | |
| then | |
| MODE="select"; |
| set $mod Mod1 | |
| # Appearance | |
| font pango:monospace 8 | |
| # System execs | |
| exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork | |
| exec --no-startup-id nm-applet | |
| # Use pactl to adjust volume in PulseAudio. |