
jamesabrannan
Confused. I searched the forum, is the TCP designed to handle simple commands? So Node.JS is not running on the EZ-B4's web server correct...it appears you run it on your server/client and it connects to EZ-B4.
I have a robotic head that I want to call from my Mac where I have CMU-Sphinx and FreeTTS, and Program AB to create a chatbot that uses voice. It's a college project...so I know there's probably a control that does all that ;-) .
All I really need to do is a simple way to call commands from the Java program to move 8 different servos and to perhaps allow eye tracking. Is that possible? The documentation doesn't seem to have anything on this, though perhaps I just couldn't find it.
I suppose I could go java ---- node.js --- ez-b4 but that seems a waste. Can't I just make calls directly from java via TCP?
Thanks.
This isn't going to help a lot with the Java question but yes, you can use the TCP to talk to ARC, which then controls the robot. I don't know of a way to talk directly to the ez-b via tcp. The sdk has c# examples of this. The tcp engine is a part of ARC and I don't know about the ez-b. I am sure that the ez-b accepts tcp commands, but I don't know if these are public outside of ARC or the sdk. A packet sniffer may be your friend here.
You can move the servos directly from your Java app. Simply connect to the EZ-B over a TCP connection to port 23. You can examine the EZ-OpenBot to get the protocol. However, here's what you will need to move servos...
Your very first command be a ping 0x55, which will return 0x04
Now to move a servo is really easy. The command takes 2 parameters and returns nothing.
The command looks like this...
0xAC + servo Port, Position in degrees
So here's an example to move servo port D0 to position 120
0xAC, 120
Now to move servo port D1 to position 120
0xAD, 120
Now to move servo port D2 to position 120
0xAE, 120
Make sense?
Hmm....I finally got a chance to look at the Client Server Robot Control video. I do not have a Script Interface Checkbox. I have the latest version of ARC. It is simply not there. Is this a bug or has something changed.
I am running windows 8.1 on Parallels on a Mac OSX.
I'm going to run ARC, then through telnet connect via the Java program I have running.
Again, there is no Script Interface checkbox.
James A. Brannan
Can you link to that video? The client/server ARC video is many years old and no longer supported. I need to remove that video.
As for my comment above, I would recommend re-reading what I wrote. Are you certain that you wish to run ARC AND your java program at the same time? With my information above, you can connect directly to the EZ-B and move the servos from your Java program.
You can move the servos using the response from my previous message.
Otherwise, I would your option to communicate with ARC over TCP is using the script tcp interface - which has replaced the "checkbox" that you've mentioned. The script interface is the new way which replaced the method you have mentioned. The method you have mentioned is deprecated and was too complicated. The new method uses EZ-Script commands. It's how all of the third party ez-robot apps communicate with ARC. This is also how roborealm communicates with ARC.
If you do not want to perform the communication directly to the ez-b, as in my previous response - you can communicate with the tcp server EZ-Script interface.
Here is where to enable the script interface. Press CONFIG on the Connection Control to find this option...
No dice. Trying to connect using telnet hangs. Connects then nothing. Tried on OSX and tried using Putty on Mac. Frustrating to say the least. Why aren't there up to date instructions on using it? This is a cool feature, that basically allows using whatever language and whatever platform one wants. I'd think this is something worth explaining how to do.
My understanding is, so far, that I should be able to telnet to ez-b4:
telnet <myip> <myport>
And then able to send simple commands. What commands? Script commands? The commands DJ-Sures mentions in his first response? The video on sending telnet commands is outdated, so that doesn't help.
This brings me back to my first thread, that generated a lot of flack. I stand by my claim that more documentation is sorely needed, and not just videos, but bona-fide documentation.
I understand - there are only so many hours in a day and I respond to every inquiry, as I have demonstrated in this thread by responding to your messages. The length of your post was consumed by frustration and not information to help me help you. We need to work together on this
pour a cup of tea because I need you to answer some questions to help you...
What you're asking is for an infinite number of help documentations - which is impossible. That's like asking for every programming language to already have written every program, past or future. ARC is a development environment for you to solve problems and we provide most of the work, if not all of it. In short, I am only able to respond to your questions - I am unable to predict the future, today.
In your case, the question is connecting a foreign program that has nothing to do with ezrobot to connect to our system. And even though I did not write your program, nor did ezrobot have anything to do with your program - I'm still assisting, so we'll figure this out together
I am confused over what your attempting to do now. Becuase, in both of my previous responses I have provided information on TWO different methods to control your servos. I have mentioned that there are two ways to connect, EZ-B directly and EZ-Script TCP Server in ARC. The connection setting in ARC also specifies that it is EZ-Script, as well. I have also previously provided a list of other products using the tcp ezscript interface. The connection setting window where you enable the tcp server has more than enough information to help you.
Perhaps you received slack before due to the answers are already there and directing frustration toward the community and product is not productive to achieve your goals. Hold back your opinions and provide questions AND answers to those helping you, otherwise there will be zero progress - as in this example.
I have asked questions which you have still not answered. I have also asked for the link to a video which may be out dated. In order to proceed, I require cooperation.
I'm only able to help if you wish to be helped. So answer these questions to help me help you...
I require an answer to each of these questions or I'm unable to proceed.
What is the link to the video that you have referenced?
are you attempting to telnet to the ezb or ARC? As stated in both responses, and now this is the third: the ezb protocol is explained above, if you connect directly to it. If you're connecting to ARC instead, then the commands are ezscript.
Due to the nature of this assistance request, I highly recommend that you do not connect directly to the ezb from your Java app as it may be out of scope. So to be specific, you will connect THROUGH ARC using the TCP EZ-Script TCP Server.
have Enabled the tcp server in ARC? I have provided instructions above.
once enabled, did you notice any messages or warnings in the debug window below? There's a chance that your specified tcp port (default is 6666) is already used by a Trojan or virus on your computer. If so, I'm unable to assist with that.
if there are no warnings or errrors in the debug window, you can telnet to your local computer - unless there are firewall issues. And again, that is something you can identify with Microsoft to disable or open ports in firewall. Normally if your Windows has not been modified, a dialog box will appear asking if you wish to allow ARC access through your firewall.
If you are using the default TCP Server Port in ARC, telnet to your local computer as such:
Now you will see an ezscript interface. Notice how I repeated that it is an ezscript interface. The tcp server for ARC is an ezscript interface.
This image circles the HELP TEXT, the CHECKBOX to enable EZ-Script TCP Server and the PORT. You can access this menu by pressing the CONFIG button on the connection control, as I had previously mentioned.
Every control has a ? (question mark) next to the X (close). When pressing that ? (question mark), you are brought to a page with information about the control. The direct link to the Connection Control ? is here: https://synthiam.com/Tutorials/Help.aspx?id=171
On that link, you will find information which I have provided in this response.
I have created an example video which demonstrates how to enable and connect to the tcp server.
Not angry btw, just frustrated by the having to hunt around, sit through videos, and not be able to just hone in directly to the information wanted, like Oracle's Java API or Microsoft's C# API documentation.
That being said, it is not lost on me that if I rolled up my sleeves and used your C# SDK I'd have a ton of sample code to work with. Guess I'm being stubborn, as I've been using Sphinx4 and FreeTTS and wanted to use it with ARC. But, and in this respect I am a dumb kid, I don't have time for the C# before my project is due. :-)
I tried to telnet directly to the EZ-B4 not ARC. Was I mistaken in assuming I could telnet to EZ-B4? So the scripting interface is NOT for EZ-B, but rather for ARC?
I will now try going through ARC. And yes, I realize the market you are shooting for is the hobby market using a GUI.
Again, I was mistaken, I though I could connect directly to EZ-B4 and see a scripting interface.
I will, btw, document the project and post back here. Unless I can't get it all working. AND YES I KNOW THAT I DON'T EVEN NEED THE SPEECH STUFF, AS ARC COMES WITH IT OUT OF THE BOX...all caps so nobody gets the wrong idea from this thread. Your speech stuff works great.
I appreciate the help, despite the two slams now. But it is what it is. You are missing out on a huge college educational market I'd think by not having a better programming interface with better documentation IMHO. The annoyance with these new fangled GUI stuff all you cool kids are using these days is that I can't go up to my bedroom, right a dumb driver that says "Im moving left" "I'm moving right" and write my program. The robotic kit we originally chose stunk so bad, the wheels didn't even turn correctly and the professor abandoned it. Your kit sits right in the middle between Legos and having to do it yourself with all that skeery hardware.
Thank you, I removed the video - with so many videos, it can be challenging to keep up with removing old outdated ones.
If you wanted to go ahead and connect directly to the EZ-B, as I mentioned in my first post - we can do it. And I can explain to you how. The example protocol is above in the first post. However, i'm not sure what TCP function you have available in Java to provide an example.
If you can connect to the ARC TCP Server EZ-Script interface with Java, then I can easily help you convert that to connect directly to the EZ-B v4.
The only real difference is rather than sending written words (i.e. Servo(D0, 20)), you would be sending HEX values to move the servo.
I haven't used Java in many years - so i'm not certain what the syntax is. But something like this is an example of how you would tell the EZ-B v4 directly to move a servo to position 80. In this example you would connect directly to the EZ-B v4
And here's how to do it connecting THROUGH ARC