Posts: 12
Threads: 4
Joined: Jan 2019
Reputation:
0
Is it possible to create a custom application using the API?
I would like to create a WebGL app for just the path planning feature.
Posts: 12
Threads: 4
Joined: Jan 2019
Reputation:
0
Thanks, I am aware of the web view feature, but what I want to do is not just viewing but to create an actual app in the browser ( program the robot ). Is this possible?
Posts: 1,710
Threads: 1
Joined: Apr 2018
Reputation:
93
The purpose of the browser in this case is only to view what's going on in the RoboDK scene. You can use the RoboDK API to move the robot in RoboDK and any browser view will be updated to match what's happening in RoboDK's 3D environment. RoboDK can be just a running process (you don't need to display the RoboDK window, for example passing the /NOUI argument when launching RoboDK will run RoboDK behind the scenes).
我认为Chrome扩展(假设哟u stick to Chrome) would be the most suitable option you need to embed your controls in a browser. In that case you would have to implement the RoboDK API in Javascript (maybe not an easy task). Since the RoboDK API uses TCP/IP socket protocol you may have to use Node.JS or something similar to be able to use sockets.
Posts: 12
Threads: 4
Joined: Jan 2019
Reputation:
0
I think I understand. You are saying I can create a node.js web server that acts a proxy between a RoboDK process and the browser. The node server will have a web socket connection to the client, and stream the 'state' of the Item tree, which can then be visualized by a custom WebGL renderer. Is this correct?
Posts: 1,710
Threads: 1
Joined: Apr 2018
Reputation:
93
No, RoboDK works as a Server in both cases:
1- A Javascript/Node.js client to communicate with RoboDK and setup/move the station however you want (it requires Sockets, not websockets). This could be a Chrome extension.
2- The browser displays the scene and remains connected to RoboDK using WebSockets.
Posts: 12
Threads: 4
Joined: Jan 2019
Reputation:
0
I see. But what I really want it to create my own custom renderer, not use the RoboDK native one. I want to control the shaders, geometry, etc.
Do you think the API is robust enough to support this use-case?
Posts: 1,710
Threads: 1
Joined: Apr 2018
Reputation:
93
You can use the API (plugin interface) to customize an OpenGL renderer, not WebGL.
Posts: 12
Threads: 4
Joined: Jan 2019
Reputation:
0
02-04-2019, 06:45 PM
(This post was last modified: 02-05-2019, 12:11 AM byrobotguy.)
Can you link the documentation to the plugin interface? I can't find it. Also, is it possible to install RoboDK in a ubuntu docker image? When I try to run the installer I get this error:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
Is there a headless mode?