GithubHelp home page GithubHelp logo

ros-docker's Introduction

DEPRECATED

This repository is old, but might still have some hints if you're trying to use USB in Docker containers.

If you want to run ROS in Docker, see the ROS Docker wiki.

For accelerated graphics, see Hardware Acceleration in Docker

ros-docker

A Docker project for building, testing, installing, and running ROS software in a container with an exposed rosbridge node.

Why would you want to put ROS in a container?

ROS for OS X is unsupported, so this exists as a prepared solution for running tests, playing with rosbridge, developing roslibjs applications, or creating a container-ized build farm.

If you need an industrial strength build farm, refer to the ROS build farm project which is also based on Docker.

Building the image

Optionally, drop your ROS packages into src/. Any packages in this path will be built and installed. rosdep will attempt to install any declared dependencies.

By default, the container will run rosbridge websocket and rosapi nodes. Add any additional launch activity you want to user.launch.

If you're running your own packages, be sure to set up install targets in CMakeLists.txt or roslaunch won't be able to find your stuff.

Finally, build the container:

$ docker build -t rosdev /path/to/ros-docker

Running the image

Be sure to specify local port forwarding when starting the container.

Running in the foreground (with screen output from roslaunch):

$ docker run -p 9090:9090 -i -t --privileged -v /dev/bus/usb:/dev/bus/usb rosdev

Running in the background:

$ docker run -p 9090:9090 --privileged -v /dev/bus/usb:/dev/bus/usb -d rosdev

While the container is runnning, you should be able to connect to its rosbridge socket at ws://localhost:9090.

Verify in a Chrome dev console or use wscat:

$ wscat --connect ws://localhost:9090
connected (press CTRL+C to quit)
>

OS X

If you're using a Mac, you'll need to set up boot2docker.

Boot2Docker port forwarding

Once boot2docker is running and the docker command is working, run the boot2docker_forward.sh script to forward the rosbridge port through the VM.

Spacenav and LeapMotion

Make sure that spacenav isn't running on your host machine ps aux | grep spacenavd, and stop it if it is sudo service spacenavd stop Also make sure that there are no other rosdev docker images running spacenavd in the background either, docker ps will show you any running containers.

ros-docker's People

Contributors

minshallj avatar mvollrath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

minshallj tazdeb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.