Execution error for remote urscript making use of external force sensor

I am trying to run a remote urscript on a UR10 by sending it through the /ur_hardware_interface/script_command topic but I keep getting a “C207A0: fieldbus input disconnected” error on the TP after publishing. The program, however, runs perfectly when executed directly on Polyscope from the TP. The script makes use of a URCap (FORCEKIT, from Weismann Robotics) to connect the UR10 to an external force sensor and both injects functions into the .script file during compilation -which I have saved on a USB and loaded on my ROS PC- and uses the RTDE interface in the background to replace the internal tool force data with the one provided by the external sensor.

My guess is that despite containing the injected functions, the remote script doesn’t have access to the URCap RTDE activity and crashes, but I am not entirely sure. I think a possible solution would be to start a local version of the script on the TP remotely using ROS but I need to change some of the script’s parameters (waypoints, speeds and forces applied in force mode) after each run based on a live analysis being carried out on the PC and again, I am not sure if this is possible using that method. Any help and advise on how to solve this would be appreciated.

Regarding the “C207A0” error: Did you check our README page troubleshooting section?

You could also inject your code into the script being sent to the robot by the ROS driver. It is in the file resources/servoj.urscript. However, depending on your use case it might be hard to inject it there. It sounds as if you are not relying on ROS motion commands, anyway, so you could also exchange the script being sent completely. For this, the robot launchfiles carry an argument to specify the urscript file being used.

Yes, I checked the troubleshooting section and my Ethernet/IP fieldbus was and still is disabled.

With regards to injecting the code, could you be more specific? I don’t quite understand what resources/servoj.urscript has to do with the problem.

I am indeed not relying on ROS motion commands. For now I am just using it as a middleware to connect my PC to all my sensors -which include the robot as a position sensor- and then submitting a urscript to the robot with some individual UR motion commands and some others in force mode using an external force sensor. In other words:

  • External force sensor mounted at the tool position and connected to UR10 through ethernet
  • UR10 connected to both the external force sensor and the ROS PC
  • ROS PC connected to UR10 and to a whole array of sensors
  • Sensor data is analyzed on the PC, urscript is generated and sent to the robot

The issue is very simple from a user’s perspective. Running a regular motion script that doesn’t rely on the external force sensor (and its URCap) works both if I run it from the TP and if I send it using the ROS Driver (no external control urcap). If I try running the same script with the external force sensor enabled it will work perfectly if I run it on the TP but will give me a “C207A0” error if I send it from ROS.

I am attaching 2 test urscripts that I created on the TP. They come both from the same program with the only difference being that one has the external force sensor URCap activated at saving time and the other doesn’t. As I have explained above, the one without the urcap works perfectly if I run it on the TP or send it using ROS, while the one with the URCap enabled only works if I run it on the TP. Note: be careful if running the files on a real robot as it will accelerate downwards and only stop if 5 N of force or more are exerted on the tool in the opposite direction. Just in case.

Let me know if any other information could be helpful.

test_urscripts.zip (2.8 KB)

I don’t quite understand what resources/servoj.urscript has to do with the problem.

Once you add the “External Control” node to a UR program, it will fetch URScript from the remote PC, which is resources/servoj.urscript by default. You can change this, however, and user your own code there, if you like.

Yes, I checked the troubleshooting section and my Ethernet/IP fieldbus was and still is disabled.

Did you also check other fieldbusses? C207A0 does not only yield from EtherNet/IP.

Regarding your script: I have no idea, why they should behave differently when run from the TP or through the socket…

Fieldbusses were all turned off so that definitely wasn’t the issue.

I tried injecting the code into this file and it works . I can now run my script, motions included, using the external force sensor. Just FYI, I first tried replacing the file altogether using the launch file and it gave some errors at run time.

One issue with this fix, aside from its hackiness , is that it only asks for the urscript at runtime. So how can I send a 2nd urscript from ROS at the time of my choosing afterwards? That is the reason I was using the socket. Iterative runs without the need to use the TP is a goal of the project using the robot.

I think the issue with the socket is worth looking into. It would make sense that urscripts with URcaps sent through it were able to work just as if run on the TP, although this might be an issue with the socket functionality and not the ROS driver perse, which just makes use of it.