├── .gitignore ├── LICENSE ├── README.md ├── docker-compose.yml ├── ros-actionlib ├── Dockerfile ├── fibonacci_client.py └── fibonacci_server.py ├── ros-image_pipeline └── Dockerfile ├── ros-kinect └── Dockerfile ├── ros-kinect2 └── Dockerfile ├── ros-leap_motion └── Dockerfile ├── ros-rviz ├── Dockerfile └── default.rviz ├── ros-structure_sensor └── Dockerfile ├── ros-tutorials └── Dockerfile └── ros-usbcam ├── Dockerfile └── init.sh /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | bin/ 3 | lib/ 4 | msg_gen/ 5 | srv_gen/ 6 | msg/*Action.msg 7 | msg/*ActionFeedback.msg 8 | msg/*ActionGoal.msg 9 | msg/*ActionResult.msg 10 | msg/*Feedback.msg 11 | msg/*Goal.msg 12 | msg/*Result.msg 13 | msg/_*.py 14 | 15 | # Generated by dynamic reconfigure 16 | *.cfgc 17 | /cfg/cpp/ 18 | /cfg/*.py 19 | 20 | # Ignore generated docs 21 | *.dox 22 | *.wikidoc 23 | 24 | # eclipse stuff 25 | .project 26 | .cproject 27 | 28 | # qcreator stuff 29 | CMakeLists.txt.user 30 | 31 | srv/_*.py 32 | *.pcd 33 | *.pyc 34 | qtcreator-* 35 | *.user 36 | 37 | /planning/cfg 38 | /planning/docs 39 | /planning/src 40 | 41 | *~ 42 | 43 | # Emacs 44 | .#* 45 | 46 | # Catkin custom files 47 | CATKIN_IGNORE 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Todd Sampson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ROS Indigo Docker Packages 2 | 3 | Docker Image wrappers and config scripts for various [ROS](http://www.ros.org/) (Robot Operating System) Indigo packages I have needed for my projects. I tried to keep with Docker's simple-purpose image/container philosophy. As such, you will need to use Docker's experimental networking to have the various containers play nicely together (more below). 4 | 5 | 6 | ## Use with Docker Compose 7 | 8 | A sample Docker Compose file is included to show you how to launch each package, including a rosmaster image for running the roscore node. 9 | 10 | Be sure you are running Docker Compose with Experimental Networking enabled. (For more information see my post: [Docker Experimental Networking and ROS](http://toddsampson.com/post/131227320927/docker-experimental-networking-and-ros)): 11 | 12 | `docker-compose --x-networking up -d` 13 | 14 | 15 | ## Working Packages 16 | 17 | * [ROS Master](http://wiki.ros.org/roscore) -- Simple laucch script around ROS's official roscore Docker Image. 18 | * [ROS Tutorials](http://wiki.ros.org/ROS/Tutorials) -- Full tutorials are installed, Docker Compose only runs talker/listener 19 | * [ROS Image View](http://wiki.ros.org/image_view) -- Full image-pipeline is installed, Docker Compose only launches image_view 20 | * [ROS Leap Motion](http://wiki.ros.org/leap_motion) -- Finger and hand tracking in ROS with the Leap Motion 21 | * [ROS USB Camera](http://wiki.ros.org/libuvc_camera) -- USB webcam image stream for ROS using [libuvc_camera](http://wiki.ros.org/libuvc_camera) ([More info](http://toddsampson.com/post/131447984382/ros-usb-sensor-input-in-docker)) 22 | * [ROS KINECT](http://wiki.ros.org/libfreenect) -- Kinect (v1) sensor using the libfreenect package. Also includes [openni](http://wiki.ros.org/openni_launch) packages. 23 | * [ROS RViz](http://wiki.ros.org/rviz) -- RViz 3D visualization tool for ROS 24 | 25 | 26 | ## Notes 27 | 28 | * IMPORTANT: If you are using Image View, RVIZ or other packages that have graphic displays be sure to set `xhost +` on the host machine to authorize a connection to the X host. Also be sure to set the correct uid and gid to your user in the Dockerfile. 29 | * I am working on making each package available on Docker Hub as an automated build. If one is missing because I haven't added it yet, use the `build: ros-package-name/.` in the docker-compose.yml to build it. 30 | * I made these Docker Images as a fast way to spin-up ROS for my own projects. As such, things are likely to change a lot. I recommend forking the code for your own use. 31 | * I am running these under Linux. They should work just fine under OSX using Docker-Machine and XQuartz with some minor debugging. I don't know enough about Docker under Windows to know how well it will work. 32 | * I'd love recommendations for updates and improvements/additional ROS packages as pull-requests. 33 | 34 | Cheers, 35 | - Todd 36 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # ROS Tutorial Talker 2 | talker: 3 | # build: ros-tutorials/. 4 | image: toddsampson:ros-indigo-tutorials 5 | container_name: talker 6 | hostname: talker 7 | net: rosdocker 8 | environment: 9 | - "ROS_HOSTNAME=talker" 10 | - "ROS_MASTER_URI=http://rosmaster:11311" 11 | # command: bash 12 | command: rosrun roscpp_tutorials talker 13 | 14 | # ROS Tutorial Listener 15 | listener: 16 | # build: ros-tutorials/. 17 | image: toddsampson:ros-indigo-tutorials 18 | container_name: listener 19 | hostname: listener 20 | net: rosdocker 21 | environment: 22 | - "ROS_HOSTNAME=listener" 23 | - "ROS_MASTER_URI=http://rosmaster:11311" 24 | # command: bash 25 | command: rosrun roscpp_tutorials listener 26 | 27 | # ROS Structure Sensor 28 | structure_sensor: 29 | # build: ros-structure_sensor/. 30 | image: toddsampson/ros-indigo-structure_sensor 31 | container_name: structure_sensor 32 | hostname: structure_sensor 33 | volumes_from: 34 | - "rosmaster" 35 | net: rosdocker 36 | devices: 37 | - "/dev/bus/usb:/dev/bus/usb" 38 | volumes: 39 | - "/tmp/.X11-unix:/tmp/.X11-unix" 40 | environment: 41 | - "DISPLAY=$DISPLAY" 42 | - "ROS_HOSTNAME=structure_sensor" 43 | - "ROS_MASTER_URI=http://rosmaster:11311" 44 | # command: bash 45 | command: roslaunch openni2_launch openni2.launch rgb_processing:=False depth_registration:=True 46 | 47 | # ROS USBCAM 48 | usbcam: 49 | # build: ros-usbcam/. 50 | image: toddsampson/ros-indigo-usbcam 51 | container_name: usbcam 52 | hostname: usbcam 53 | net: rosdocker 54 | devices: 55 | - "/dev/bus/usb:/dev/bus/usb" 56 | environment: 57 | - "ROS_HOSTNAME=usbcam" 58 | - "ROS_MASTER_URI=http://rosmaster:11311" 59 | command: rosrun libuvc_camera camera_node _height:=480 _width:=640 _vendor:=2084 _video_mode:=uncompressed _frame_rate:=30 60 | 61 | # ROS Leap Motion 62 | leap_motion: 63 | # build: ros-leap_motion/. 64 | image: toddsampson/ros-indigo-leap_motion 65 | container_name: leap_motion 66 | hostname: leap_motion 67 | volumes_from: 68 | - "rosmaster" 69 | net: rosdocker 70 | privileged: true 71 | devices: 72 | - "/dev/bus/usb:/dev/bus/usb" 73 | volumes: 74 | # - "/tmp/.X11-unix:/tmp/.X11-unix:rw" 75 | - "/tmp/.X11-unix:/tmp/.X11-unix" 76 | environment: 77 | - "QT_X11_NO_MITSHM=1" 78 | - "DISPLAY=$DISPLAY" 79 | - "ROS_HOSTNAME=leap_motion" 80 | - "ROS_MASTER_URI=http://rosmaster:11311" 81 | ports: 82 | - "6437:6437" 83 | command: bash 84 | # command: rosrun leap_motion sender.py 85 | 86 | # ROS Image View 87 | image_view: 88 | # build: ros-image_pipeline/. 89 | image: toddsampson/ros-indigo-image_pipeline 90 | container_name: image_view 91 | hostname: image_view 92 | volumes_from: 93 | - "rosmaster" 94 | net: rosdocker 95 | volumes: 96 | - "/tmp/.X11-unix:/tmp/.X11-unix" 97 | environment: 98 | - "DISPLAY=$DISPLAY" 99 | - "ROS_HOSTNAME=image_view" 100 | - "ROS_MASTER_URI=http://rosmaster:11311" 101 | command: rosrun image_view image_view image:=/image_raw 102 | 103 | # ROS RVIZ 104 | rviz: 105 | # build: ros-rviz/. 106 | image: toddsampson/ros-indigo-rviz 107 | container_name: rviz 108 | hostname: rviz 109 | net: rosdocker 110 | volumes: 111 | - "/tmp/.X11-unix:/tmp/.X11-unix" 112 | environment: 113 | - "DISPLAY=$DISPLAY" 114 | - "ROS_HOSTNAME=rviz" 115 | - "ROS_MASTER_URI=http://rosmaster:11311" 116 | command: rosrun rviz rviz 117 | 118 | # ROS Actionlib 119 | actionlib: 120 | build: ros-actionlib/. 121 | # image: toddsampson:ros-indigo-actionlib 122 | container_name: actionlib 123 | hostname: actionlib 124 | net: rosdocker 125 | environment: 126 | - "ROS_HOSTNAME=actionlib" 127 | - "ROS_MASTER_URI=http://rosmaster:11311" 128 | command: bash 129 | 130 | # ROS Kinect 131 | kinect: 132 | # build: ros-kinect/. 133 | image: toddsampson:ros-indigo-kinect 134 | container_name: kinect 135 | hostname: kinect 136 | net: rosdocker 137 | devices: 138 | - "/dev/bus/usb:/dev/bus/usb" 139 | environment: 140 | - "ROS_HOSTNAME=kinect" 141 | - "ROS_MASTER_URI=http://rosmaster:11311" 142 | # command: bash 143 | command: roslaunch freenect_launch freenect.launch depth_registration:=true 144 | 145 | 146 | # ROS Kinect2 147 | kinect2: 148 | build: ros-kinect2/. 149 | # image: toddsampson:ros-indigo-kinect2 150 | container_name: kinect2 151 | hostname: kinect2 152 | net: rosdocker 153 | devices: 154 | - "/dev/bus/usb:/dev/bus/usb" 155 | environment: 156 | - "ROS_HOSTNAME=kinect2" 157 | - "ROS_MASTER_URI=http://rosmaster:11311" 158 | # command: bash 159 | command: roslaunch kinect2_bridge kinect2_bridge.launch 160 | 161 | 162 | # ROS MASTER (ROSCORE) 163 | rosmaster: 164 | image: ros:latest 165 | container_name: rosmaster 166 | hostname: rosmaster 167 | net: rosdocker 168 | ports: 169 | - "11311:11311" 170 | command: roscore 171 | -------------------------------------------------------------------------------- /ros-actionlib/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get -y update && \ 5 | apt-get -y install ros-indigo-actionlib ros-indigo-actionlib-msgs ros-indigo-actionlib-tutorials 6 | 7 | RUN mkdir -p /opt/ros/indigo/share/actionlib_tutorials/simple_action_servers && \ 8 | mkdir -p /opt/ros/indigo/share/actionlib_tutorials/simple_action_client 9 | 10 | COPY ./fibonacci_client.py /opt/ros/indigo/share/actionlib_tutorials/simple_action_client/fibonacci_client.py 11 | COPY ./fibonacci_server.py /opt/ros/indigo/share/actionlib_tutorials/simple_action_servers/fibonacci_server.py 12 | 13 | RUN chmod +x /opt/ros/indigo/share/actionlib_tutorials/simple_action_client/fibonacci_client.py && \ 14 | chmod +x /opt/ros/indigo/share/actionlib_tutorials/simple_action_servers/fibonacci_server.py 15 | 16 | CMD bash 17 | -------------------------------------------------------------------------------- /ros-actionlib/fibonacci_client.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | import roslib; roslib.load_manifest('actionlib_tutorials') 4 | import rospy 5 | 6 | # Brings in the SimpleActionClient 7 | import actionlib 8 | 9 | # Brings in the messages used by the fibonacci action, including the 10 | # goal message and the result message. 11 | import actionlib_tutorials.msg 12 | 13 | def fibonacci_client(): 14 | # Creates the SimpleActionClient, passing the type of the action 15 | # (FibonacciAction) to the constructor. 16 | client = actionlib.SimpleActionClient('fibonacci', actionlib_tutorials.msg.FibonacciAction) 17 | 18 | # Waits until the action server has started up and started 19 | # listening for goals. 20 | client.wait_for_server() 21 | 22 | # Creates a goal to send to the action server. 23 | goal = actionlib_tutorials.msg.FibonacciGoal(order=20) 24 | 25 | # Sends the goal to the action server. 26 | client.send_goal(goal) 27 | 28 | # Waits for the server to finish performing the action. 29 | client.wait_for_result() 30 | 31 | # Prints out the result of executing the action 32 | return client.get_result() # A FibonacciResult 33 | 34 | if __name__ == '__main__': 35 | try: 36 | # Initializes a rospy node so that the SimpleActionClient can 37 | # publish and subscribe over ROS. 38 | rospy.init_node('fibonacci_client_py') 39 | result = fibonacci_client() 40 | print "Result:", ', '.join([str(n) for n in result.sequence]) 41 | except rospy.ROSInterruptException: 42 | print "program interrupted before completion" 43 | -------------------------------------------------------------------------------- /ros-actionlib/fibonacci_server.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | import roslib; roslib.load_manifest('actionlib_tutorials') 4 | import rospy 5 | 6 | import actionlib 7 | 8 | import actionlib_tutorials.msg 9 | 10 | class FibonacciAction(object): 11 | # create messages that are used to publish feedback/result 12 | _feedback = actionlib_tutorials.msg.FibonacciFeedback() 13 | _result = actionlib_tutorials.msg.FibonacciResult() 14 | 15 | def __init__(self, name): 16 | self._action_name = name 17 | self._as = actionlib.SimpleActionServer(self._action_name, actionlib_tutorials.msg.FibonacciAction, execute_cb=self.execute_cb, auto_start = False) 18 | self._as.start() 19 | 20 | def execute_cb(self, goal): 21 | # helper variables 22 | r = rospy.Rate(1) 23 | success = True 24 | 25 | # append the seeds for the fibonacci sequence 26 | self._feedback.sequence = [] 27 | self._feedback.sequence.append(0) 28 | self._feedback.sequence.append(1) 29 | 30 | # publish info to the console for the user 31 | rospy.loginfo('%s: Executing, creating fibonacci sequence of order %i with seeds %i, %i' % (self._action_name, goal.order, self._feedback.sequence[0], self._feedback.sequence[1])) 32 | 33 | # start executing the action 34 | for i in xrange(1, goal.order): 35 | # check that preempt has not been requested by the client 36 | if self._as.is_preempt_requested(): 37 | rospy.loginfo('%s: Preempted' % self._action_name) 38 | self._as.set_preempted() 39 | success = False 40 | break 41 | self._feedback.sequence.append(self._feedback.sequence[i] + self._feedback.sequence[i-1]) 42 | # publish the feedback 43 | self._as.publish_feedback(self._feedback) 44 | # this step is not necessary, the sequence is computed at 1 Hz for demonstration purposes 45 | r.sleep() 46 | 47 | if success: 48 | self._result.sequence = self._feedback.sequence 49 | rospy.loginfo('%s: Succeeded' % self._action_name) 50 | self._as.set_succeeded(self._result) 51 | 52 | if __name__ == '__main__': 53 | rospy.init_node('fibonacci') 54 | FibonacciAction(rospy.get_name()) 55 | rospy.spin() 56 | -------------------------------------------------------------------------------- /ros-image_pipeline/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get -y update 5 | RUN apt-get -y install ros-indigo-image-pipeline 6 | 7 | # IMPORTANT: Update these values to your primary computer user id and group id 8 | # On OSX use `id -u` and `id -g` to find the correct values 9 | ENV uid 1000 10 | ENV gid 1000 11 | 12 | RUN export uid=${uid} gid=${gid} && \ 13 | mkdir -p /home/ros && \ 14 | echo "ros:x:${uid}:${gid}:ros,,,:/home/ros:/bin/bash" >> /etc/passwd && \ 15 | echo "ros:x:${uid}:" >> /etc/group && \ 16 | echo "ros ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ros && \ 17 | chmod 0440 /etc/sudoers.d/ros && \ 18 | chown ${uid}:${gid} -R /home/ros 19 | 20 | USER ros 21 | ENV HOME /home/ros 22 | -------------------------------------------------------------------------------- /ros-kinect/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get update 5 | RUN apt-get -y install ros-indigo-openni-* 6 | RUN apt-get -y install ros-indigo-freenect* 7 | 8 | -------------------------------------------------------------------------------- /ros-kinect2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get update && apt-get -y install software-properties-common && \ 5 | add-apt-repository ppa:ethz-asl/backports && add-apt-repository ppa:ethz-asl/drivers && \ 6 | add-apt-repository ppa:ethz-asl/ros && apt-get -y update && \ 7 | apt-get -y install libcanberra-gtk-module 8 | RUN apt-get -y install ros-indigo-kinect2 9 | 10 | # IMPORTANT: Update these values to your primary computer user id and group id 11 | # On OSX use `id -u` and `id -g` to find the correct values 12 | # ENV uid 1000 13 | # ENV gid 1000 14 | # 15 | # RUN export uid=${uid} gid=${gid} && \ 16 | # mkdir -p /home/ros && \ 17 | # echo "ros:x:${uid}:${gid}:ros,,,:/home/ros:/bin/bash" >> /etc/passwd && \ 18 | # echo "ros:x:${uid}:" >> /etc/group && \ 19 | # echo "ros ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ros && \ 20 | # chmod 0440 /etc/sudoers.d/ros && \ 21 | # chown ${uid}:${gid} -R /home/ros 22 | # 23 | # USER ros 24 | # ENV HOME /home/ros 25 | -------------------------------------------------------------------------------- /ros-leap_motion/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN sudo apt-get -y update 5 | RUN sudo apt-get -y install ros-indigo-leap-motion bc libgl1-mesa-glx-lts-trusty libglu1-mesa libxi6 libxxf86vm1 libgl1-mesa-glx libx11-6 libxext6 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb1 libxdamage1 libxfixes3 libxshmfence1 libgl1-mesa-dri libxcb1 libx11-data libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libelf1 libllvm3.4 libtxc-dxtn-s2tc0 libglapi-mesa libxau6 libxdmcp6 6 | #wget patch fakeroot 7 | 8 | COPY Leap_Motion_SDK_Linux_2.3.1.tgz /tmp/Leap_Motion_SDK_Linux_2.3.1.tgz 9 | 10 | COPY prl_mod.tar.gz /tmp/prl_mod.tar.gz 11 | 12 | RUN sudo chmod -R 777 /tmp 13 | 14 | RUN cd /tmp && tar -xzvf Leap_Motion_SDK_Linux_2.3.1.tgz && \ 15 | cd LeapD* && \ 16 | sudo dpkg --install Leap-*-x64.deb 17 | 18 | # IMPORTANT: Update these values to your primary computer user id and group id 19 | # On OSX use `id -u` and `id -g` to find the correct values 20 | ENV uid 1000 21 | ENV gid 1000 22 | 23 | RUN export uid=${uid} gid=${gid} && \ 24 | mkdir -p /home/ros && \ 25 | echo "ros:x:${uid}:${gid}:ros,,,:/home/ros:/bin/bash" >> /etc/passwd && \ 26 | echo "ros:x:${uid}:" >> /etc/group && \ 27 | echo "ros ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ros && \ 28 | chmod 0440 /etc/sudoers.d/ros && \ 29 | chown ${uid}:${gid} -R /home/ros 30 | 31 | USER ros 32 | ENV HOME /home/ros 33 | 34 | RUN mkdir -p ~/.Leap\ Motion && printf '{\n "configuration": {\n "images_mode": 2,\n "low_resource_mode_enabled": true\n }\n}\n' > ~/.Leap\ Motion/config.json 35 | 36 | RUN sudo apt-get -y install linux-headers-$(uname -r) mesa-utils xarclock lshw && cd /tmp && \ 37 | tar xzvf prl_mod.tar.gz 38 | RUN cd /tmp && /usr/bin/make -f Makefile.kmods 39 | RUN sudo mkdir -p /lib/modules/$(uname -r)/parallels && \ 40 | sudo cp /tmp/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko /lib/modules/$(uname -r)/parallels && \ 41 | sudo depmod -A 42 | COPY prltoolsd /etc/init.d/prltoolsd 43 | RUN sudo chmod +x /etc/init.d/prltoolsd 44 | RUN sudo initctl reload-configuration 45 | -------------------------------------------------------------------------------- /ros-rviz/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get -y update 5 | RUN apt-get -y install ros-indigo-rviz 6 | 7 | # IMPORTANT: Update these values to your primary computer user id and group id 8 | # On OSX use `id -u` and `id -g` to find the correct values 9 | ENV uid 1000 10 | ENV gid 1000 11 | 12 | RUN export uid=${uid} gid=${gid} && \ 13 | mkdir -p /home/ros && \ 14 | echo "ros:x:${uid}:${gid}:ros,,,:/home/ros:/bin/bash" >> /etc/passwd && \ 15 | echo "ros:x:${uid}:" >> /etc/group && \ 16 | echo "ros ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ros && \ 17 | chmod 0440 /etc/sudoers.d/ros && \ 18 | chown ${uid}:${gid} -R /home/ros 19 | 20 | USER ros 21 | ENV HOME /home/ros 22 | 23 | RUN printf "export QT_GRAPHICSSYSTEM=native\nsource /opt/ros/indigo/setup.bash" >> /home/ros/.bashrc 24 | -------------------------------------------------------------------------------- /ros-rviz/default.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | Splitter Ratio: 0.5 10 | Tree Height: 565 11 | - Class: rviz/Selection 12 | Name: Selection 13 | - Class: rviz/Tool Properties 14 | Expanded: 15 | - /2D Pose Estimate1 16 | - /2D Nav Goal1 17 | - /Publish Point1 18 | Name: Tool Properties 19 | Splitter Ratio: 0.588679 20 | - Class: rviz/Views 21 | Expanded: 22 | - /Current View1 23 | Name: Views 24 | Splitter Ratio: 0.5 25 | - Class: rviz/Time 26 | Experimental: false 27 | Name: Time 28 | SyncMode: 0 29 | SyncSource: "" 30 | Visualization Manager: 31 | Class: "" 32 | Displays: 33 | - Alpha: 0.5 34 | Cell Size: 1 35 | Class: rviz/Grid 36 | Color: 160; 160; 164 37 | Enabled: true 38 | Line Style: 39 | Line Width: 0.03 40 | Value: Lines 41 | Name: Grid 42 | Normal Cell Count: 0 43 | Offset: 44 | X: 0 45 | Y: 0 46 | Z: 0 47 | Plane: XY 48 | Plane Cell Count: 10 49 | Reference Frame: 50 | Value: true 51 | Enabled: true 52 | Global Options: 53 | Background Color: 48; 48; 48 54 | Fixed Frame: map 55 | Frame Rate: 30 56 | Name: root 57 | Tools: 58 | - Class: rviz/Interact 59 | Hide Inactive Objects: true 60 | - Class: rviz/MoveCamera 61 | - Class: rviz/Select 62 | - Class: rviz/FocusCamera 63 | - Class: rviz/Measure 64 | - Class: rviz/SetInitialPose 65 | Topic: /initialpose 66 | - Class: rviz/SetGoal 67 | Topic: /move_base_simple/goal 68 | - Class: rviz/PublishPoint 69 | Single click: true 70 | Topic: /clicked_point 71 | Value: true 72 | Views: 73 | Current: 74 | Class: rviz/Orbit 75 | Distance: 10 76 | Enable Stereo Rendering: 77 | Stereo Eye Separation: 0.06 78 | Stereo Focal Distance: 1 79 | Swap Stereo Eyes: false 80 | Value: false 81 | Focal Point: 82 | X: 0 83 | Y: 0 84 | Z: 0 85 | Name: Current View 86 | Near Clip Distance: 0.01 87 | Pitch: 0.785398 88 | Target Frame: 89 | Value: Orbit (rviz) 90 | Yaw: 0.785398 91 | Saved: ~ 92 | Window Geometry: 93 | Displays: 94 | collapsed: false 95 | Height: 846 96 | Hide Left Dock: false 97 | Hide Right Dock: false 98 | QMainWindow State: 000000ff00000000fd00000004000000000000013c000002c4fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000002c4000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002c4fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000028000002c4000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b0000002f600fffffffb0000000800540069006d0065010000000000000450000000000000000000000259000002c400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 99 | Selection: 100 | collapsed: false 101 | Time: 102 | collapsed: false 103 | Tool Properties: 104 | collapsed: false 105 | Views: 106 | collapsed: false 107 | Width: 1200 108 | X: 55 109 | Y: 50 110 | -------------------------------------------------------------------------------- /ros-structure_sensor/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get -y update 5 | RUN apt-get -y install ros-indigo-openni2* 6 | RUN sed -i 's/;UsbInterface=2/UsbInterface=0/' /etc/openni/GlobalDefaults.ini 7 | 8 | # IMPORTANT: Update these values to your primary computer user id and group id 9 | # On OSX use `id -u` and `id -g` to find the correct values 10 | # ENV uid 1000 11 | # ENV gid 1000 12 | # 13 | # RUN export uid=${uid} gid=${gid} && \ 14 | # mkdir -p /home/ros && \ 15 | # echo "ros:x:${uid}:${gid}:ros,,,:/home/ros:/bin/bash" >> /etc/passwd && \ 16 | # echo "ros:x:${uid}:" >> /etc/group && \ 17 | # echo "ros ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ros && \ 18 | # chmod 0440 /etc/sudoers.d/ros && \ 19 | # chown ${uid}:${gid} -R /home/ros 20 | # 21 | # USER ros 22 | # ENV HOME /home/ros 23 | -------------------------------------------------------------------------------- /ros-tutorials/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | FROM ros:indigo-ros-base 5 | 6 | # install ros tutorials packages 7 | RUN apt-get update && apt-get install -y \ 8 | ros-indigo-ros-tutorials \ 9 | ros-indigo-common-tutorials \ 10 | && rm -rf /var/lib/apt/lists/ 11 | -------------------------------------------------------------------------------- /ros-usbcam/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ros:indigo-ros-core 2 | MAINTAINER Todd Sampson "toddsampson+docker@gmail.com" 3 | 4 | RUN apt-get -y update 5 | RUN apt-get -y install ros-indigo-libuvc-ros 6 | -------------------------------------------------------------------------------- /ros-usbcam/init.sh: -------------------------------------------------------------------------------- 1 | until rostopic list ; do sleep 1; done 2 | rosrun roscpp_tutorials talker 3 | --------------------------------------------------------------------------------