Skip to content

AndriyPt/carmen

Repository files navigation

carmen

Carmen Robot Car project

License

Table of Content

Linux

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 carmen_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 andriyp/carmen:latest

for NVidia Docker please use

nvidia-docker run -it --name carmen_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 andriyp/carmen-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 carmen_dev

and for NVidia Docker

nvidia-docker start carmen_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 carmen_launch view_urdf.launch

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

roslaunch carmen_launch rviz.launch

Hardware

In order to launch ROS Serial node which will be communicating with MCU run the following command

roslaunch carmen_launch hardware.launch

Default port is /dev/ttyACM0 and baud is 115200.

In order to run command with custom port and\or baud please use parameters to pass these values e.g.

roslaunch carmen_launch hardware.launch port:=/dev/ttyUSB0 baud:=57600

Messages from MCU could be received using rostopic command.

In case if sensor reading need to checked from MCU. You need to know in which topic there readings are published. Let's assume it is /mcu_sensor_data. Please start hardware nodes as described above. After that please run this command

rostopic echo /mcu_sensor_data

In order to publish messages to MCU please use rostopic pub command.

Header files for messages could be found in this folder.

The following command will regenerate these headers with most recent changes in message files

rosrun carmen_hardware generate_messages.sh

Windows

Docker Desktop

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

  1. Install Windows 10 on your machine or in virtual machine
  2. Install Docker Desktop using these instructions
  3. For development the following docker image will be used.
  4. Use the following command to start ordinary Docker container
docker run -d --name carmen_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 andriyp/carmen-dev-web:latest
  1. Command will spawn Docker container and exit.

In order to relaunch docker container please run

docker start carmen_dev

IDEs

In Docker Desktop only Cloud9 web IDE is available. Open http://localhost:8181 in your browser.

Visualization

Run the following command in Cloud9 web IDE terminal windows

roslaunch carmen_launch web_server.launch

Open web browser and go to WebViz application page. It will connect to your local web socket server running in Docker container. You will be able to plot data, view rosout and more.

Raspberry PI

Docker

Please follow these steps to run Docker container on your machine.

  1. Install Raspbian on your machine
  2. Install Docker using these instructions
  3. There are two docker images
  1. Use the following command to start ordinary Docker container
  • For Local UI

Before container spawning execute this command

xhost +local:root

ARM 32 bit

docker run --name carmen_dev -p 11311:11311 -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw andriyp/carmen-ui-rpi:armhf

Terminator window will appear.

ARM 32 bit with Hardware

docker run --name carmen_dev -p 11311:11311 -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --device /dev/nucleo_control --device /dev/lidar andriyp/carmen-ui-rpi:armhf
  • For Web UI

ARM 32 bit

docker run -d --name carmen_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 andriyp/carmen-dev-rpi:armhf

ARM 64 bit

docker run -d --name carmen_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 andriyp/carmen-dev-rpi:arm64

Command will spawn Docker container and exit.

In order to relaunch docker container please run

docker start carmen_dev

QEMU Docker

In case if you want to test Docker containers on Linux using QEMU install Docker as it is described in Linux section steps (1-4). After that run the following steps:

  1. Execute command
docker run --rm --privileged multiarch/qemu-user-static:register --reset
  1. Run container

ARM 32 bit

 docker run -it --name carmen_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 --entrypoint /usr/bin/qemu-arm-static andriyp/carmen-dev-rpi:armhf /bin/bash 

ARM 64 bit

 docker run -it --name carmen_dev -p 8080:8080 -p 8181:8181 -p 8282:8282 -p 8090:8090 -p 9090:9090 --entrypoint /usr/bin/qemu-aarch64-static andriyp/carmen-dev-rpi:arm64 /bin/bash 

IDEs

In Docker Desktop only Cloud9 web IDE is available. Open http://localhost:8181 in your browser.

Visualization

Run the following command in Cloud9 web IDE terminal windows

roslaunch carmen_launch web_server.launch

Open web browser and go to WebViz application page. It will connect to your local web socket server running in Docker container. You will be able to plot data, view rosout and more. In case if you want to see data running on remote Raspberry PI please click on Help sign in WebViz page to see how to change WebViz URL.

Running ROS Hardware Container

Bring up command

roslaunch carmen_launch hardware.launch

Launch SLAM with RViz

roslaunch carmen_launch slam.launch gui:=True

About

Robot Car project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages