UniversalRobots / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series
BSD 3-Clause "New" or "Revised" License
414 stars 216 forks source link

Publishing to /urscript_interface/script_command unreliable #1161

Closed ZdenekM closed 3 hours ago

ZdenekM commented 3 hours ago

Affected ROS2 Driver version(s)

2.4.10-1noble.20240922.120253

Used ROS distribution.

Other

Which combination of platform is the ROS driver running on.

Ubuntu Linux with realtime patch

How is the UR ROS2 Driver installed.

From binary packets

Which robot platform is the driver connected to.

UR E-series robot

Robot SW / URSim version(s)

5.16.0

How is the ROS driver used.

Through the robot teach pendant using External Control URCap

Issue details

Summary

The ultimate goal is to control VGC10 suction by sending urscript commands. As a first test, I tried to send some trivial stuff, but found out, that it is, for some reason, highly unreliable. For instance, I tried to control digital out:

ros2 topic pub --qos-reliability reliable /urscript_interface/script_command std_msgs/msg/String '{data: "sec my_prog():\n    set_digital_out(1,True)\nend"}' --once

by setting it on and off. And it works (the command gets printed by the interface and executed on the robot) only sporadically.

Issue details

It seems to be the same without specified QoS, with inline code, etc.

Steps to Reproduce

Run external control program, put robot into remote mode, run ROS driver, publish urscript command.

Expected Behavior

I would expect that every sent valid script will be executed.

Actual Behavior

The sent script gets executed only sporadically (most of the time it is simply ignored).

Relevant log output

No response

Accept Public visibility

ZdenekM commented 3 hours ago

Sorry for the noise, it seems that it was caused by publishing from outside the docker container, while the driver is running within the container (with network_mode: host and real-time capabilities). So it is not related to the driver. When trying to publish from the container, it works as expected. Another issue is that vg10_grip() does not work, but that is a different story.