Service | Status |
---|---|
Docker Image | |
Code Style Checks | |
Unit Tests | |
Install Tests | |
Code Coverage |
LeoBot telepresence robot
For convenience it is recommended to use Docker containers. Please follow these steps to run Docker container on your machine.
sudo usermod -aG docker $USER
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
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.
In case if you want to run PyCharm in Docker container please run
pycharm
To launch QtCreator please run
qtcreator
For VSCode type
vscode
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
For OS Windows it is recommended to use Docker Desktop containers. Please follow these steps to run Docker container on your machine.
docker run -d --name leobot_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 rosukraine/leobot-dev-web:latest
In order to relaunch docker container please run
docker start leobot_dev
In Docker Desktop only Cloud9 web IDE is available. Open http://localhost:8181 in your browser.
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.
Start office simulation
Linux in Terminator
roslaunch leobot_launch simulation.launch
Windows in Cloud9 IDE Terminal
roslaunch leobot_launch gzweb.launch
Please note that simulation URL is http://localhost:8282
If you want to reduce usage of machine's resources and increase simulation speed on Linux machine 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
Please note that Windows based Docker container is already running Gazebo in headless mode
Start art gallery simulation
Linux in Terminator
roslaunch leobot_launch simulation.launch world_file:=artgallery
Windows in Cloud9 IDE Terminal
roslaunch leobot_launch gzweb.launch world_file:=artgallery
Please note that simulation URL is http://localhost:8282
Launch navigation stack
Linux in Terminator
Please note that 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.
Windows in Cloud9 IDE Terminal
Please create another terminal in Cloud9 IDE. More details could be found here.
roslaunch leobot_launch navigation.launch gui:=False
You could send Goal commands manually using command rostopic.
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>
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.