This is a minimal template for a Flask application that subscribes to a ROS topic and changes the image rendered full screen on the client side.
- Python 3.x installed on your machine
- Flask and other dependencies (check the
requirements.txt
file)
- Clone the repository:
git clone <repository_url>
- Navigate to the project directory:
cd flask_ros_webapp
pip install -r requirements.txt
To start the Flask App, execute the following command:
python3 app.py
The application will be accessible at http://localhost:5000 or using the PC IP address at http://IP:5000
To publish a new image called image1.jpg:
ros2 topic pub /image_name std_msgs/String 'data: image1.jpg' -1
Note that the image must be placed in the folder /static to be accessible.
Contributions are welcome! If you find any bugs or have suggestions for improvement, please open an issue or submit a pull request to the repository.
This app is licensed under the MIT License.