Asked — Edited

Connect To Ez-B Or ARC Via Html5 Web Socket

I saw that you can open up a telnet connection to ARC .

That's very cool.

I really want to use JavaScript to program my robot.

If I could connect to ARC via an html5 web socket, where all data that comes in from the ez-b is transferred across the connection, that would be very cool.

Will ez-robot ever support something like this?


ARC Pro

Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro

#2  

Looks like you could use javascript now, if you were to implement the other end of the websocket to talk to telnet. Kinda overcomplicating things, but it would be possible.

#3  

Yeah, I could but its a hack.

Also, I'm asking about new functionality.

In a component config panel, I imagine there would be an "event definition" section.

For example, an accelerometers config panel would allow: If the x vector reaches value N trigger event "tip" sending values x and N.

If the x vector changes at a rate (r) above value M, trigger event "bump" sending values x, r and M

These "events" would be pushed out over the socket along with contextual event data.

Also, web sockets allow for binary data transfer while telnet is text only. This would allow a camera on a robot to send image data to ARC which would then send an event "photograph" along with raw image data.

Implementing a web socket event server would be a programmers dream come true;)

United Kingdom
#4  

Maybe something like SignalR could be used? It's based on .NET and will be part of the next .NET framework release. I've used it a few times and it's very cool.

Worth looking into at least.

PRO
Synthiam
#5  

What is it you would like to do?

  • The camera image can already be obtained by the built-in HTTP server
  • Enabling the Connection Control TCP Server but disabling Script Interfae will allow direct EZ-Robot Protocol Commands to be sent. This can either be another ARC instance, or your own application. To reference the EZ-Robot Protocol, visit the EZ-OpenBot library: http://code.google.com/p/ez-openbot

I could add an EZ-Script interface to the HTTP Server. It is now added to the to-do list:)

#6  

Could events be defined in ARC which would be pushed out to a web socket?

For example, for an ARC temperature control, if the temp hits say 90C, event "hot" occurs which pushes "hot:90" out the web socket.

The parameters and names for these event would be user entered of course.

PRO
Synthiam
#7  

Sure, use the EZ-Script browse() command:)

There is a large manual of EZ-Script commands in ARC. Click the link to install. The add control button will allow you to scroll throug the categories of controls with the arrow keys:)

The scripting section might be of most interest to you

#9  

Cool, new features! Thanks!

I'll play around with it, see if I can make it work.

It will be interesting to see how the HTTP service works out.

HTTP is stateless, not a dedicated connection so it seems like it would be more useful for some operations more than others.