[英]How to integrate Ros services in my Angular Web-App
I'm trying to establish a communication between a robot arm built on ros melodic and my web-app. 我正在尝试在基于ros melodic的机械手和我的Web应用程序之间建立通信。
On the web-app side, I have my gui without logic in a localhost. 在网络应用程序方面,我的gui在本地主机中没有逻辑。 On ROS side I have finalized all the movements, I want to integrate, in a C++ program.
在ROS方面,我已经完成了所有要整合到C ++程序中的动作。
Right now I communicate with the robot through ssh command to establish a communication. 现在,我通过ssh命令与机器人进行通信以建立通信。 And to move the robot I run the name of the function with parameters in the terminal shell.
为了移动机器人,我在终端外壳中使用参数运行函数的名称。 (I don't use rqt,rviz, etc)
(我不使用rqt,rviz等)
Could someone tells me how to establish a communication through my web-app in this same way so that when clicking on my "move" button, the logic calls the function? 有人可以告诉我如何以同样的方式通过我的Web应用程序建立通信,以便在单击“移动”按钮时,逻辑调用该函数吗?
I'm pretty new to stackOverflow so I'm sorry if this is not the right way to ask. 我对stackOverflow来说还很陌生,所以很抱歉这不是正确的提问方式。
I suggest to you to use rosnodejs . 我建议您使用rosnodejs 。 It is a interface to ROS written in NodeJS (Javascript).
它是用NodeJS(Javascript)编写的ROS的接口。 With NodeJS you can then program a server with an API which would accept your commands from your web-app (either through HTTP, websockets, ...).
然后,通过NodeJS,您可以使用API对服务器进行编程,该API会接受来自Web应用程序的命令(通过HTTP,Websockets等)。 On the server side you then implement communication to ROS by using rosnodejs.
然后在服务器端,使用rosnodejs实现与ROS的通信。 You can use topics, services, well, whatever you want.
您可以随意使用主题,服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.