0
$\begingroup$

Rosanswers logo

Hello, I am trying to connect ROS melodic with KUKA robot KR6 r900 sixx using kuka-experimental. However, after having done all things in README.md about configuring EKI on the controller, I am getting the error:

Failed to read from robot EKI server within alloted time of 5 seconds.  Make sure eki_hw_interface is running on the robot controller and all configurations are correct.

At the side of KUKA controller I have done these things:

  1. setting IP, creating new port 54600 (for udp)
  2. copy EkiHwInterface into C:\KRC\ROBOTER\Config\User\Common\EthernetKRL\ (with same IP as in the previous step)
  3. copy kuka_eki_hw_interface.dat and kuka_eki_hw_interface.src to KRC:\R1\Program

At the side of ROS I have done:

  1. The hardware_controllers.yaml and controller_joint_names.yaml I have not changed so the names of joints are as follows:
#Publish all joint states
joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50

# Joint trajectory controller
position_trajectory_controller:
  type: "position_controllers/JointTrajectoryController"
  joints:
    - joint_a1
    - joint_a2
    - joint_a3
    - joint_a4
    - joint_a5
    - joint_a6

  state_publish_rate: 50 # Defaults to 50
  action_monitor_rate: 20 # Defaults to 20
  Is the fact that I have written here the wrong names of the joints why I cant read from EKI server?
  1. The test_params.yaml file is as follows:
eki:
  robot_address: "192.168.100.2"
  robot_port: "54600"
  socket_timeout: 5

My launch file is as follows:

<?xml version="1.0" encoding="utf-8"?>
<launch>
    <param name="robot_description" command="$(find xacro)/xacro.py '$(find kuka_kr6_support)/urdf/kr6r900sixx.xacro'"/>

   <rosparam file="$(find kuka_eki_hw_interface)/test/test_params.yaml" command="load" />
> 
>        <!-- Start EKI interface -->
>        <node name="kuka_eki_hardware_interface" pkg="kuka_eki_hw_interface"
>          type="kuka_eki_hw_interface_node"
>          respawn="false"
>          output="screen"
>          required="true"/>
> 
>        <!-- Load joint controller configurations from YAML file to parameter server -->
>        <rosparam file="$(find kuka_eki_hw_interface)/config/hardware_controllers.yaml"
     command="load"/>

   <!-- Load standard kuka controller joint names from YAML file to parameter server -->
   <rosparam file="$(find kuka_eki_hw_interface)/config/controller_joint_names.yaml"
     command="load"/>

   <!-- Load controllers -->
   <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
     output="screen" args="position_trajectory_controller joint_state_controller --shutdown-timeout 1"/>
   <!-- Load robot state publisher -->
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
</launch>

Does anyone see where the mistake might be?

Thank you all in advance


Originally posted by sef_roboter on ROS Answers with karma: 16 on 2019-10-09

Post score: 0


Original comments

Comment by gvdhoorn on 2019-10-09:
I'm not an expert with EKI, but some things to check:

  1. you can ping the robot's IP from your ROS PC
  2. the value you've configured for eki/robot_address is the IP of the robot controller. Not the IP of the ROS PC.
  3. you're performing all steps listed in the Testing section of the readme (especially those mentioning the teach pendant (ie: pressing play, waiting, pressing play again and holding the deadman switch). In manual mode you cannot let go of the teach pendant.

Comment by sef_roboter on 2019-10-09:\

  1. I can ping from PC to KUKA and also the other way
  2. Yes I have done it, in the EkiHwInterface.xml is address of KUKA controller

So it is not the problem that I am using ROS Melodic, right?

Yes I select the program, holding deadman switch and pressing play. I am holding both buttons until I get message Programmed path reached (BCO). After that I am holding both buttons again and launching roslaunch kuka_eki_hw_interface test_hardware_interface.launch which gives me this error after 5s: Failed to read from robot EKI server within alloted time of 5 seconds. Make sure eki_hw_interface is running on the robot controller and all configurations are correct.

Comment by gvdhoorn on 2019-10-09:
If everything is running on the robot side, it should work, but again, I've not used EKI myself.

There is a small chance @BrettHemes_ could comment here.

Comment by sef_roboter on 2019-10-09:
Should I post it at kuka_experimental github?

Comment by gvdhoorn on 2019-10-09:
I'm not sure whether @BrettHemes_ monitors that issue tracker. But it could be that some other user who is using EKI notices your issue there.

If you do post on kuka_experimental's tracker, please include a link to your post here on ROS Answers.

And post a comment with a link to your kuka_experimental issue here, so we can keep things connected.

Comment by sef_roboter on 2019-10-09:
https://github.com/ros-industrial/kuka_experimental/issues/160

Comment by BrettHemes on 2019-10-09:
I do get emails from that tracker it seems :)

Sorry you are having issues with getting the communication going; these types of problems can be tough. Have you tried using Wireshark to see what exactly is getting transferred (if anything)?

Comment by sef_roboter on 2019-10-09:
I think that I tested it utterly wrong (if yes I am sorry). I executed at one PC(Windows) Wireshark scan and also executed kuka_eki_hw_interface on kuka controller. Nothing at all is transferred. Was this wrong test? If it was, could you point me to the direction how to test it?

Today I do not have another computer available so tomorrow I will test it with one PC with Wireshark and on the other PC I will launch that test.launch from ROS to see if it is sending something to KUKA or not.

Comment by BrettHemes on 2019-10-09:
I am by no means a Wireshark expert, but the easiest way I have found is to run Wireshark from the same PC as kuka_eki_hw_interface. This will ensure that all the packets to and from that machine are visible.

Comment by gvdhoorn on 2019-10-09:
Two comments:

  • wireshark can be installed on Ubuntu (sudo apt install wireshark-gtk)

  • @sef_roboter: when you write:

    executed kuka_eki_hw_interface on kuka controller

    you are actually referring to the files in the krl sub directory, correct? Not the actual ROS node.

Comment by BrettHemes on 2019-10-09:
Good clarification @gvdhoorn; thanks

Yes, it has been awhile since I have used this but if I remember correctly the kuka controller won't send state information until a connection from the ros node on the PC has been established.

Comment by sef_roboter on 2019-10-10:
@gvdhoorn Yes I meant the file in the krl sub directory

So I have made the capture using Wireshark. ( IP.2 is the address of KUKA and IP.3 is the PC with ROS) and it is as follows:

  1. From PC to KUKA the message is sent using UDP with info: 52999 -> 54600 Len=1
  2. From Kuka to PC something is sent using ICMP and info is: Destination unreachable (Port unreachable)

I can send you whole capture by email. I cant post a photo in the comment.

Comment by gvdhoorn on 2019-10-10:\

From Kuka to PC something is sent using ICMP and info is: Destination unreachable (Port unreachable)

we don't need the capture most likely.

What you saw means that the controller hasn't actually opened the port. So the krl program either isn't running, or you did not setup the tag/socket correctly.

Comment by sef_roboter on 2019-10-10:
I can be surely wrong but doesnt it mean that something is wrong on the way where KUKA is responding to ROS? I think it based on the fact that at the beginning ROS sent successfully something to KUKA at port 54600. So the KUKA port should be setup correctly. Isnt the problem in port on the PC? I mean that KUKA doesnt know about on which port should send data or the port on the PC is blocked (not allowed)??

Comment by gvdhoorn on 2019-10-10:
No. The ICMP response "Destination unreachable (Port unreachable)" means that the recipient (KR C4) received a packet to a port (or IP) that is unreachable. For ports that typically means they are not opened (or don't accept traffic) at the time the packet is received.

The message is not the KR C4 "not knowing" or "not being allowed" to send traffic to the PC.

But my interpretation of course is based on what you described about the capture.

Comment by MBP on 2020-12-07:
Hi @sef_roboter, @gvdhoorn and @BrettHemes,

I am having similiar issue with @sef_roboter.

here are my error,

Comment by MBP on 2020-12-07:
[ERROR] [1607393242.321608787]: Could not load controller 'position_trajectory_controller' because controller type 'position_controllers/JointTrajectoryController' does not exist. [ERROR] [1607393242.321703228]: Use 'rosservice call controller_manager/list_controller_types' to get the available types [ERROR] [1607393243.323688]: Failed to load position_trajectory_controller [INFO] [1607393243.327050]: Loading controller: joint_state_controller [INFO] [1607393243.340930]: Controller Spawner: Loaded controllers: joint_state_controller [ERROR] [1607393247.043264641]: Failed to read from robot EKI server within alloted time of 5 seconds. Make sure eki_hw_interface is running on the robot controller and all configurations are correct.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

@gvdhoorn @BrettHemes I have found a solution. The problem was that I added new port within KUKA controller with value 54600. I should not do it. When I have removed the port from NAT (port list), communication suddenly works.

Thank you for your help


Originally posted by sef_roboter with karma: 16 on 2019-10-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2019-10-11:
Good to hear that you got it fixed.

Comment by BrettHemes on 2019-10-11:
Yay. I have issues like this way more than I would like to admit. Let me know how the driver works out for you.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.