Turtlebot3, pass parameters from web server to a python code (Node)
hello everyone, I created a web application that enables the user to enter some parameters from a web page. These parameters will be received (posted) by the webserver. The web server used in this app was created using a Flask. The question is how can I use these parameters and pass them as arguments to a python program (code) which drives the robot in a specific way? OR: How can I use my program (code) within the webserver? Thank in advance
Asked by adel on 2019-10-31 07:49:22 UTC
Answers
You may look at the ros Bridge there is an json ros interface.
https://wiki.ros.org/rosbridge_suite
Or you Programm you python flesk service as an ros node directly so this python script can publish the topic data https://answers.ros.org/question/234418/easiest-way-to-implement-http-server-that-can-send-ros-messages/
Asked by duck-development on 2019-10-31 09:27:26 UTC
Comments
Thanks for the answer, Do you have any idea how can I use my script with the rosbridge? What I did is next: 1-created an HTML file to launch it with the webserver 2-started the rosbridge server. now, how can I manipulate the parameter? and should I rewrite my code(python) in javascript to use it in the html file or one can use python with html ? thanks in advance
Asked by adel on 2019-11-06 07:35:26 UTC
Comments