Did you install the option packages that come with Sunrise Workbench?
Posts by kiiwa
-
-
Hello,
I needed to control the Robotiq Gripper 2F-85 with LBR iiwa via Ethercat, and didn't find anything usable online or a good tutorial,except this thread on the old forum: https://www.robot-forum.com/robotforum/kuk…rough-ethercat/
So, I created a java library to control the gripper either from a Java Program or directly the SmartPad's userKeys.
Hope it helps. -
Here's a Library I made, to control the Robotiq 2F-85 gripper with LBR iiwa via Ethercat:
-
Quote
1. how do i execute another application from within this application?
What kind of application do you want to execute? Do you want it to run in parallel?Quote2. is this loop of minute movements harmful to the robot? (ie: wears out the joint really fast?)
Not sure 100%, but I wouldn't do it. Too much jerk is always bad.Quote3. is there another method to sense external force? with the except of of X, Y and Z seems to fluctuate unpredictably when pushed (doesn't seem too reliable) [my payload is extremely light, only a few hundred grams]
Don't measure when you're close to singularity positions. The robot is sensitive, but it has its limits. Try measuring in the same position after a bit of wait time.Quote4. is the a way to output to my computer instead of on the console?
You can use the Debug mode on the sunrise workbench, you can see the evolution of your program. And if you want to output messages on your PC instead of the smartPad, you simple UDP packets to send messages and run a simple UDP listener on you PC.Quote5. there's a small delay between a push and detection, is it because of slow processing speed? or am i doing something wrong?
How much of a delay are you getting? -
-
Good!
Yes, the firewall is a pain in the neck sometimes. -
Here's a simple example that works.
Client on Robot:
Java
Display Morepackage apps; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.Socket; import javax.inject.Inject; import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication; import com.kuka.roboticsAPI.controllerModel.Controller; public class LBR_Client extends RoboticsAPIApplication { @Inject private Controller contoller; Socket clientSocket = null; @Override public void initialize() { contoller = (Controller) getContext().getControllers().toArray()[0]; } @Override public void run() { try { String sentence; String modifiedSentence; BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in)); clientSocket = new Socket("172.31.1.135", 30000); DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream()); BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); sentence = "tcp message"; outToServer.writeBytes(sentence + '\n'); modifiedSentence = inFromServer.readLine(); System.out.println("FROM SERVER: " + modifiedSentence); clientSocket.close(); } catch (IOException e) { e.printStackTrace(); } } // To liberate the port @Override public void dispose() { try { clientSocket.close(); System.out.println("Socket closed"); }catch (Exception e) { e.printStackTrace(); } super.dispose(); } }
Server on PC:
Java
Display Morepackage tcp; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; import java.net.*; class MyServer { public static void main(String argv[]) throws Exception { String clientSentence; String capitalizedSentence; ServerSocket welcomeSocket = new ServerSocket(30000); while (true) { Socket connectionSocket = welcomeSocket.accept(); BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream()); clientSentence = inFromClient.readLine(); System.out.println("Received: " + clientSentence); capitalizedSentence = clientSentence.toUpperCase() + '\n'; outToClient.writeBytes(capitalizedSentence); } } }
-
-
Are you sure you're in the right forum?
-
You can put as much applications as you like, it's just that you can run only one Robotic application at a time. If you want parallel processing, use background tasks or threads. They are detailed in the manual.
-
-
You are right NullReference. I am trying to send from the cabinet to the pc. Which port do I have to pass when constructing the datagram packet?I am able to receive info in my cabinet sent from the PC and then get the port of the received datagram to send an answer, but I noticed the port always changes with every datagram and what I really want to do is to first send from the cabinet but I dont know which port to use. Thank you!
You don't need to install any optional package to use TCP/UDP. You need to use ports only in the [30000-30010] Range. So, use 30.000 to send from PC--> Robot and 30.000 to send from Robot-->PC, i.e.
It didn't work because you were sending to your Robot (local machine) and not to the external PC, and you didn't use a robot application to run your class.
Here's your example adapted. copy both of the to your work-space and run the second. Be sure to use your PC's IP address (the one in the example is (172.31.1.135)
Java
Display Morepackage apps; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.UnknownHostException; public class UDPClientClass { private int port ; private byte[] ComputerIP; private InetAddress address; UDPClientClass(byte[] IP,int port) { this.ComputerIP = IP; this.port =port; try { address = InetAddress.getByAddress(this.ComputerIP); } catch (UnknownHostException e) { e.printStackTrace(); } } public void sendMessage(String msg){ try { byte[] bufferO = new byte[1024]; bufferO = msg.getBytes(); DatagramPacket packet = new DatagramPacket(bufferO, bufferO.length,this.address, this.port); DatagramSocket socket = new DatagramSocket(); socket.send(packet); socket.close(); } catch (UnknownHostException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }
Code
Display Morepackage apps; import javax.inject.Inject; import apps.UDPClientClass; import com.kuka.roboticsAPI.controllerModel.Controller; import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication; public class UDPTest extends RoboticsAPIApplication { @Inject private Controller contoller; private int port = 30001; private byte[] ComputerIP={(byte)172,31,1,(byte)135}; //IP of External PC @Override public void initialize() { contoller = (Controller) getContext().getControllers().toArray()[0]; } @Override public void run() { System.out.println("Start"); UDPClientClass udpClient = new UDPClientClass(ComputerIP,port ); System.out.println("udpClient" ); String message = "Hello"; udpClient.sendMessage(message); System.out.println("sent: " + message + "to client: " + ComputerIP.toString()); } }
-
i have no idea if it's similar to EntertainTech.If you want to have a try , you can provide the generated emily file and i can help you have a test with the entertainTECH in my OfficePC.Thanks. Can you explain, shortly, the process of setting up entertainTECH on the robot and how to play the .emily file?
-
Or, maybe you could try RoboDK.
https://robodk.com/indexI must use Maya, because I'll be creating robot motion then an animator/graphic designer would also create visual effects that we will project during the robots motion. Hence the need for time accuracy.
-
EntertainTech is cheaper to purchase, but since you appear to have ordered the robots already, prepare for a massive quote, especially for 3 robots.
Do you mean they install them on the robot controllers themselves? Or would they just send the package files?
Because, we ordered the KR22 robots, first, and now we're looking to purchase the ready2_animate/EntertainTech option.QuoteI use a custom version of Mimic with a live control package I wrote, which also exports to KRL.
Cool. Is it available somewhere online? if so, I'd love to take a look. -
Hello everyone,
I have a project coming up, where I need to animate three KRC4 robots KR22 R1610, on KSS 8.5 (Not sure about the release, as we didn't receive the robots, yet).
I'm going to use Maya + MIMIC (A Maya plugin for controlling Industrial Robot). I was told that it needs A package called "ready2_animate".
Correct me if I'm wrong, My understanding from the Tool's github and this forum, is that we create a robot animation on maya, then we export it to a .emily file that contains robot axes values mapped to a timeline/timetable. So, when we launch this program on a robot running "ready2_animate", the real motions are similar to virtual one and take the same amount of time.
my questions are:- Did anyone tried the same setup? If yes, what are the components of this package? Is it a Tech option we install, like EthernetKRL? or is a set of programs and functions we call from our main program?
- Did anyone used EntertainTech? because according to KUKA, ready2_animate is based on EntertainTech. Is there any documention or manual I can look at to know how to plan my project, because I have no idea about ready2_animate, to give our client a deadline.
Any help would be much appreciated.
-
Can you send a pic to show where are the fuses?here's a photo in attach. But, be sure to change the burned one with the same type of fuse. Usually, KUKA ships a couple of fuses along with the new robot.
-
As it was stated before, apparently, you're trying to sync a project without installing a station. Do you know how to setup a new installation?
-
I don't think the sunrise controller is supportedHi,
Are you sure? because I just started looking at this today. Correct me if I'm wrong, but aren't the Surnise controller a KRC4?
Thanks -
Honestly, I never tried. I, use, mainly, KLI for TCP/UDP, as well as SmartServo.
Why do you want to use KONI for TCP?