Display ros node in HTML

asked 2020-04-28 18:54:23 -0600

Primo gravatar image


I am launching a node that increments every 1 second. I want to see the data that is shown with the cmd: rostopic echo /listener in my html page ( the data must change like in the echo ). I have successfully shown the rostopic in an html div but it is static i have to reload the page to see a new data changing. How can i do that please ? i've tried smtg like setInterval but can't figure it out. Can anyone give the solution for it ?

My goal is to achieve smthg like this video on youtube: https://www.youtube.com/watch?v=-QcnC...

Thank you.

edit retag flag offensive close merge delete


Hello all, i have tried the setInterval function and it worked for me. I have a question, i think that the setinterval is not an optimal solution can it be done with something like websockets, I guess its a better solution because setinterval refresh only the div as i can see it ? if so guide me how so ?

Primo gravatar image Primo  ( 2020-04-28 19:40:46 -0600 )edit