Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

create custom renderer?

#1
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.
#2
If you need a browser WebGL view I recommend you to activate the following option:

Tools - Options - Other - Activate Local Web Server View

Then, follow the highlighted link to see your active RoboDK station in a browser. It should also work if you connect to this address from another computer in the same network.

   

RoboDK has an API that allows you to customize and automate operations. The RoboDK API is available in C#, Python, C++, Visual Basic and Matlab. Furthermore, you can also program robots and generate brand specific code directly from our API, so you can use RoboDK as a universal programming platform. More information here:
https://robodk.com/doc/en/RoboDK-API.html
https://github.com/RoboDK/RoboDK-API
#3
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?
#4
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). 

I assume that a Chrome extension (assuming that you 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.
#5
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?
#6
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.
#7
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?
#8
You can use the API (plugin interface) to customize an OpenGL renderer, not WebGL.
#9
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?
#10
The following link provides the documentation regarding the plugin interface:
https://robodk.com/doc/en/PlugIns/index.html
(we'll soon make a public repository on GitHub)

Normally RoboDK won't run without OpenGL support. However, you can try running RoboDK passing the /NOUI argument (or -NOUI) to avoid using a 3D scene. In that case RoboDK will not use resources for display purposes.
  




Users browsing this thread:
1 Guest(s)