Carmen Robot Car project
For convenience it is recommended to use Docker containers. Please follow these steps to run Docker container on your machine.
- Install Desktop OS Ubuntu Trusty or Xenial on your machine or in virtual machine
- Install Docker-CE using these instructions
- In order to executed Docker without sudo please execute
sudo usermod -aG docker $USER- Logout and login to your machine again :)
- In case if you have NVidia graphic card customized Docker could be installed which will utilize your GPU. Please follow these extra steps.
- For development the following docker image will be used for NVidia Docker this one.
- 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:latestfor 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- Black window of Terminator UI console will appear after some time.
- You can use it's features to split terminal window into smaller terminals and run few commands in parallel (Ctrl+Shift+E).
- If you want to run real robot add user to dialout group and restart Docker container
sudo usermod -a -G dialout userIn order to relaunch docker container after you closed Terminator window or rebooted machine please run
docker start carmen_devand for NVidia Docker
nvidia-docker start carmen_devAfter some time Terminator window will reappear.
In case if you want to run PyCharm in Docker container please run
pycharmTo launch QtCreator please run
qtcreatorFor VSCode type
vscodeIn order to debug URDF please launch
roslaunch carmen_launch view_urdf.launchTo have a look on the state of the robot in RViz run
roslaunch carmen_launch rviz.launchIn order to launch ROS Serial node which will be communicating with MCU run the following command
roslaunch carmen_launch hardware.launchDefault 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:=57600Messages 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_dataIn 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.shFor OS Windows it is recommended to use Docker Desktop containers. Please follow these steps to run Docker container on your machine.
- Install Windows 10 on your machine or in virtual machine
- Install Docker Desktop using these instructions
- For development the following docker image will be used.
- 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- Command will spawn Docker container and exit.
In order to relaunch docker container please run
docker start carmen_devIn Docker Desktop only Cloud9 web IDE is available. Open http://localhost:8181 in your browser.
Run the following command in Cloud9 web IDE terminal windows
roslaunch carmen_launch web_server.launchOpen 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.
Please follow these steps to run Docker container on your machine.
- Install Raspbian on your machine
- Install Docker using these instructions
- There are two docker images
- Use the following command to start ordinary Docker container
- For Local UI
Before container spawning execute this command
xhost +local:rootARM 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:armhfTerminator 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:armhfARM 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:arm64Command will spawn Docker container and exit.
In order to relaunch docker container please run
docker start carmen_devIn 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:
- Execute command
docker run --rm --privileged multiarch/qemu-user-static:register --reset- 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 In Docker Desktop only Cloud9 web IDE is available. Open http://localhost:8181 in your browser.
Run the following command in Cloud9 web IDE terminal windows
roslaunch carmen_launch web_server.launchOpen 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.
Bring up command
roslaunch carmen_launch hardware.launchLaunch SLAM with RViz
roslaunch carmen_launch slam.launch gui:=True