https://github.com/zauberzeug/ros_nicegui_image_example
A simple ROS2 example that uses a 2 way input switcher with a button. This was requested by a user.
https://github.com/zauberzeug/ros_nicegui_image_example
Last synced: 4 months ago
JSON representation
A simple ROS2 example that uses a 2 way input switcher with a button. This was requested by a user.
- Host: GitHub
- URL: https://github.com/zauberzeug/ros_nicegui_image_example
- Owner: zauberzeug
- Created: 2023-09-26T12:27:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-20T13:05:08.000Z (over 1 year ago)
- Last Synced: 2025-04-05T08:41:28.809Z (9 months ago)
- Language: Python
- Size: 104 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What it does
The sender sends two images on two different topics every 1 second.
The receiver starts a NiceGUI Ui on localhost:8080 and displays the topics it sees.
By default, it will display the first topic.
If the button is pressed, it will display the next picture on the second topic and vice versa.
## How to use
Terminal1 :
```
python3 receiver.py
```
In this version of this tutorial, we start the script directly with python.
In ROS2, you can run nodes directly with python3 because the ROS2 initialization uses standard Python APIs, but you must source your ROS2 distribution beforehand to ensure the environment is correctly set.
Terminal2 :
```
ros2 run image_sender sender
```