Code Monkey home page Code Monkey logo

leobot's Introduction

Service Status
Docker Image Docker Hub
Code Style Checks CircleCI
Unit Tests Build Status
Install Tests Build Status
Code Coverage Coverage Badge

leobot

LeoBot

LeoBot telepresence robot

License

Docker

For convenience it is recommended to use Docker containers. Please follow these steps to run Docker container on your machine.

  1. Install Desktop OS Ubuntu Trusty or Xenial on your machine or in virtual machine
  2. Install Docker-CE using these instructions
  3. In order to executed Docker without sudo please execute
sudo usermod -aG docker $USER
  1. Logout and login to your machine again :)
  2. In case if you have NVidia graphic card customized Docker could be installed which will utilize your GPU. Please follow these extra steps.
  3. For development the following docker image will be used for NVidia Docker this one.
  4. Use the following command to start ordinary Docker container
docker run -it --name leobot_dev -p 8080:8080 -p 8090:8090 -p 9090:9090 -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /tmp/.X11-unix:/tmp/.X11-unix:rw rosukraine/leobot:latest

for NVidia Docker please use

nvidia-docker run -it --name leobot_dev -p 8080:8080 -p 8090:8090 -p 9090:9090 -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /tmp/.X11-unix:/tmp/.X11-unix:rw rosukraine/leobot-dev-nvidia:latest
  1. Black window of Terminator UI console will appear after some time.
  2. You can use it's features to split terminal window into smaller terminals and run few commands in parallel (Ctrl+Shift+E).
  3. If you want to run real robot add user to dialout group and restart Docker container
sudo usermod -a -G dialout user

In order to relaunch docker container after you closed Terminator window or rebooted machine please run

docker start leobot_dev

and for NVidia Docker

nvidia-docker start leobot_dev

After some time Terminator window will reappear.

IDEs

In case if you want to run PyCharm in Docker container please run

pycharm

To launch QtCreator please run

qtcreator

For VSCode type

vscode

URDF and RViz

In order to debug URDF please launch

roslaunch leobot_launch view_urdf.launch

To have a look on the state of the robot in RViz run

roslaunch leobot_launch rviz.launch

Navigating on known map

Start office simulation

roslaunch leobot_launch simulation.launch

If you want to reduce usage of machine's resources and increase simulation speed you could run it without GUI in headless mode. For these purposes you could use the following command

roslaunch leobot_launch simulation.launch headless:=true gui:=false

Start art gallery simulation

roslaunch leobot_launch simulation.launch world_file:=artgallery

Launch navigation stack (in order to launch second command split Terminator window by two using Ctrl-Shift-E. More information on Terminator shortcuts can be found here)

roslaunch leobot_launch navigation.launch

In RViz which appear after some time select "2D Nav Goal" and robot will travel to it. Like it is shown in this video.

Building the map

Start simulation

roslaunch leobot_launch simulation.launch

Launch gmapping node

roslaunch leobot_launch gmapping.launch

Drive arround environment to build map using the following keys. Please note that console window with gmapping launch file should be active in order to teleoperate robot using keys

Save map to file

rosrun map_server map_saver -f <map_file_name>

Starting the web server

Once you install all project dependencies, you can start the web server with such command

roslaunch leobot_launch web_server.launch

Additionally you can specify a custom port for the web server in docker container

roslaunch leobot_launch web_server.launch port:=1234

In this case you'll need to re-build the docker container to publish the specified port to your host machine (see docker run -p command at Docker section).

If everything goes well, you'll see the message

Web server started at port 8080

After that the web server will become available on your host Ubuntu OS at http://localhost:8080 as well as from LAN.

Using a USB joystick

To use a USB joystick you need to rebuild the docker container. See item 7 in Docker.

Add the following parameter right after docker run

--device=/dev/input/js0

Notice: in this case you must have the joystick plugged in when you trigger docker run and every time you docker start the corresponding container. Otherwise these commands will fail with an error

docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/input/js0": no such file or directory.

To avoid this, you can create one container that supports USB joystick and another default one (using different --name parameters).

You can test that joistick is available from the container with a command

cat /dev/input/js0

It should print strange symbols in the console when you press joystick buttons. Press Ctrl+C to exit.

When joystick is available in the container, trigger the simulation.launch and then start the tepeoperation with joystick support using command

roslaunch leobot_control teleop.launch joy_enabled:=true

If your USB joystick is connected to something different than /dev/input/js0 you can configure it adding such parameter

joy_device:=/dev/input/js1

To operate the robot you need to press the so-called deadman button simultaneously with the arrow buttons or manipulating the thumbstick. Most often that is one of the main buttons at the right side of joystick. Just experiment to find the right one. If you don't press the deadman button the robot won't move.

The joystick will be working even if the console window is minimized, unlike the keyboard teleoperation.

leobot's People

Contributors

maxzhaloba avatar andriypt avatar lyubomyrd avatar systemdiagnosticss avatar abench avatar yarynad avatar

Watchers

James Cloos avatar  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.