Skip to content

geoporus-karelics/ros_humble_sandbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ros_lecture_demo

A simple ros and docker demo to show in lectures. Tested on unix system. For windows the setup requires bit extra steps including installing WSL2 etc.

Contains an example of and publisher in python. Running the publisher nodes with turtlesim will visualize what the effect of publishers.

Note: This example has CMakeLists.txt approach for specifying the package. This will allow you to have python and cpp sources in same package.

How to run

For gui following command is required to be ran on host machine xhost +local:lecture_demo. (To remove the right from xhost run xhost -local:lecture_demo)

  • git clone https://github.com/jonipol/ros_lecture_demo.git
  • cd lecture_demo/docker
  • bash build_image.bash
  • docker run -it --name="lecture_demo" --env="DISPLAY=$DISPLAY" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --runtime=nvidia lecture_demo bash

Or if you have docker-compose you can run

  • docker-compose up

To open additional terminals docker exec -it lecture_demo bash

Once the container is running you can run

  • ros2 run turtlesim turtlesim_node in one terminal
  • ros2 run lecture_demo demo_publisher.py in other terminal Now you should be seeing the ros magic working.

About

A simple ros humble docker sandbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 36.7%
  • Dockerfile 29.5%
  • CMake 24.3%
  • Shell 9.5%