Author Topic: sunrise communicator - axis and pos outputs nothing  (Read 459 times)

victorlin

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
sunrise communicator - axis and pos outputs nothing
« on: May 21, 2020, 11:41:20 AM »
Hi Everyone,

I'm testing the IIWA, and i'm using the sunrise communicator component to control the IIWA.
I can send commands no problem, but I can't get the component to output an info for axis and pos.
Is there any special setup/hardware required for this?

What I'm trying to do is have grasshopper read the position/torque of the robot, and send different movements accordingly.
This seems to be not possible, since:
1.communicator is no outputing values
2.communicator needs movements commands to work, it cannot simply listen?

Also, When i end the PRC_RunUDP, i'm gettings a few errors on the HMI:
java.net.SocketException: socket closed
  at java.net.PlainDatagramSocketImpl.receive0 (Native Method)
  at java.net.PlainDatagramSocketImpl.receive (Unknown Source)
  at java.net.DatagramSocket.receive (Unknown Source)
  at threads.UDPReceiver.run (UDPReceiver.java:43)
The task didn't terminate within 15.0s: shutdown timeout while waiting ofr Main thread
Doesn't seems to matter much, but are these errors normal?

If someone can give share some thoughts on this.

Thanks,

Victor Lin
« Last Edit: May 21, 2020, 11:58:15 AM by victorlin »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: sunrise communicator - axis and pos outputs nothing
« Reply #1 on: May 22, 2020, 01:59:33 PM »
Hello Victor,

I'm not at my main PC at the moment, but if I remember correctly then the Communicator needs a Grasshopper Timer to output data. Please give it a try!
Regarding the exception, it's probably not properly closing the socket when the program exits. If that is causing problems the next time you start the program, it needs to be fixed, otherwise it's more cosmetic for now.

Best,
Johannes

victorlin

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: sunrise communicator - axis and pos outputs nothing
« Reply #2 on: May 25, 2020, 11:19:26 AM »
Hi Johannes,

Sorry for the late reply, just had a time to work on the robot now.
Even with the timer, it's still outputing null.
Using SmartSniff to check the traffic, I don't think the robot is outputing any values, as seen in the second attachment, there's no incoming traffic.
Is there some settings I need to do on the robot?

Regards,

Victor Lin

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: sunrise communicator - axis and pos outputs nothing
« Reply #3 on: May 25, 2020, 11:23:55 AM »
Hello,

Usually when you are not receiving data, your firewall is blocking it. Have you tried to temporarily disable it?
You could also check on the Sunrise side if it's sending anything, via a breakpoint in the relevant thread.

Best,
Johannes

victorlin

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: sunrise communicator - axis and pos outputs nothing
« Reply #4 on: May 26, 2020, 01:29:12 PM »
Hi Johannes,

So I've tested the breakpoint, the program is generating the information, but I'm not reciving it for some reason.
I've already disabled the fireware and any anti-virus programs I have, but still no go.
What would be the next steps in debuging this issue?

Regards,

Victor Lin

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: sunrise communicator - axis and pos outputs nothing
« Reply #5 on: May 26, 2020, 03:54:09 PM »
Hello Victor,

Did you unblock the port in the configuration file? That's another possible issue. By default, only ports 30000 to 30010 are open to the outside, see 15.5 in the Sunrise documentation.

Best,
Johannes

victorlin

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 9
    • View Profile
Re: sunrise communicator - axis and pos outputs nothing
« Reply #6 on: May 29, 2020, 12:29:20 PM »
Hi Johannes,

Where and how do I find the configuration file for ports?
15.5 only says:
Quote
15.5 Network communication via UDP and TCP/IP
Certain ports are enabled on the robot controller for communication with external
devices via UDP or TCP/IP.
The following port numbers (client or server socket) can be used in a robot application:
 30,000 to 30,010

Since I couldn't find the config file, I tried to modify the UDPSender.java instead.
from:
socket = new DatagramSocket(49152);
to:
socket = new DatagramSocket(30001);
and used 30001 for port on the Gh communicator component.
But it's still outputing null.

.
Also is 6 axis movement the only command type supported by the communicator?
I tried linear movement command, and the HMI give me an error.

Regards,

Victor Lin
« Last Edit: May 29, 2020, 02:04:17 PM by victorlin »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1067
    • View Profile
    • Robots in Architecture
Re: sunrise communicator - axis and pos outputs nothing
« Reply #7 on: May 31, 2020, 09:24:36 PM »
Hello Victor,

For troubleshooting I would recommend Packet Sender, it works fine for us: https://packetsender.com/download
You can run it on your PC and set it to the receiving socket.
Just make sure that no other software like Rhino is running on the same socket. You could also launch the portable version on the Windows side of the Sunrise controller to test the sending of data.

As Sunrise users usually want to create very individual systems, we provide the full Java code. If you look at the UDPReceiver.java file in threads you can see the supported functions and can debug them, set breakpoints etc. LIN should work.

Regarding the ports, 30001 should actually work. If it doesn't, also when using Packet Sender, I would contact KUKA directly. I don't remember where that configuration file exactly was, it's just too long ago, sorry...

Best,
Johannes