Git Product home page Git Product logo

tmc_wrs_docker's Introduction

docker installation

In order to run the simulator, docker and docker-compose are necessary.

In the case of a Windows or Mac environment, please install docker for Windows or Mac respectively.

In the case of Linux, please input the following commands and install docker.

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh

If you input the following command, even regular users will be able to execute the docker command.

$ sudo usermod -aG docker <USERNAME>

After executing the above command, log out then log in again.

Input the following command, then verify that docker can execute correctly.

$ docker info

Input the following commands and install docker-compose. As the docker-compose that can be installed via apt-get is old, please input all of the following commands to install the newest version of docker-compose.

$ sudo apt-get remove docker-compose
$ COMPOSE_VERSION=$(wget https://api.github.com/repos/docker/compose/releases/latest -O - | grep 'tag_name' | cut -d\" -f4)
$ sudo wget https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -O /usr/local/bin/docker-compose
$ sudo chmod 755 /usr/local/bin/docker-compose

Usage

Please input the following commands to clone this repository.

$ git clone https://github.com/hsr-project/tmc_wrs_docker.git
$ cd tmc_wrs_docker

Download all of the images necessary for running the simulator. As you will be downloading a large amount of data, please execute the following command in an environment that is connected to a high speed network.

$ ./pull-images.sh

Starting the simulator

Please input the following command and start the simulator.

$ docker-compose up

Please open each of the following URLs in a browser, then move on to development.

Starting the simulator in an environment with a GPU

If it is the case that there is an NVIDIA video card, then acceleration of the simulation through rendering on the GPU is possible.

First, please install nvidia-docker by referring to the following URL:

https://github.com/NVIDIA/nvidia-docker

Next, perform rendering on display number 0 of the X server that was started up on the server. Please input the following command, to to give access from within docker to the X server.

$ DISPLAY=:0 xhost si:localuser:root

Please input the following command and start the simulator.

$ docker-compose -f docker-compose.nvidia.yml up

Please open each of the following URLs in a browser, then move on to development.

Running autonomous movement

In gazebo in the simulator's screen, click the play button (the right facing arrow in the lower left of the screen), and start the simulation. Into the terminal of the IDE screen, please input the following command to start rviz:

rviz -d $(rospack find hsrb_rosnav_config)/launch/hsrb.rviz

rviz will appear in the simulator's screen. If you click "2D Nav Goal" in rviz and click the autonomous movement goal, then the HSR will move autonomously to the goal location.

Operation within the docker host PC

In order to communicate from the host PC that is running the docker image with the simulator's roscore, it is necessary that ROS_MASTER_URI is set appropriately. If you source the script that is located directly under this package as illustrated below, then it is possible to set ROS_MASTER_URI.

$ source ./set-rosmaster.sh

After starting the simulator, please check that ROS communication is working using the host PC.

Authors

  • Yosuke Matsusaka

Contact

LICENSE

This software is released under the BSD 3-Clause Clear License, see LICENSE.txt.

tmc_wrs_docker's People

Contributors

davidhsrtoyota avatar yosuke avatar yuka-hashiguchi avatar

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.