UniversalRobots / Universal_Robots_ROS2_Driver

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

Sending urscript in remote control mode while UR_Driver running #982

Closed Sohaib-Snouber closed 1 month ago

Sohaib-Snouber commented 2 months ago

Affected ROS2 Driver version(s)

ROS2

Used ROS distribution.

Iron

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)

polyscope

How is the ROS driver used.

Through the robot teach pendant using External Control URCap

Issue details

Summary

I have installed the ROS2 ur_driver and the URCaps and both running fine with testing them using the MoveIt, but i have only in rviz just the ur5e without the gripper, so i have read from an issue that it is not easy to configure the gripper in the ur_description and be able to control it, so i have chosen to use the urscript to be able to control the gripper, but till now i have only succeded to control the digital output and be able to move the robot using the urscript by running a python code as the following:

`import socket

def send_urscript(ip, port, script): try: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((ip, port)) s.sendall(script.encode('utf-8')) print("Command sent successfully.") except Exception as e: print(f"An error occurred: {e}")

robot_ip = '10.130.1.100' # Replace with your robot's IP port = 30002 # Standard port for URScript commands

urscript_command = ''' def secondaryProgram(): set_digital_out(1, False)\n sleep(5)\n set_digital_out(1, True)\n sleep(10)\n

end\n secondaryProgram() '''

send_urscript(robot_ip, port, urscript_command)

` after running the ur_driver and running my urcaps external control, i also used the remote control to be able to send urscripts, but when i run the the python code i get what i have written in the code, but after that the urcaps external control will be stopped automatically alone, i have thought of primary and secondary programms and using the information of this site [https://www.universal-robots.com/articles/ur/interface-communication/remote-control-via-tcpip/] i did not get any other response using port like 30001, 30002 or 30003, the other ports did not work for remote control (I could not receive the true digital output by using 30004, 30011, etc).

Another problem is that i tried in this way to control the gripper (2F Adaptive gripper) that is connected to the wrist of the roboter with these type of commands e.x. "rq_open()" in urscript, but it didn't work (I have only activated the gripper from the teach pendant after i turned on the device).

One more thing that is maybe be important to say is that while running the ur_driver a two repeated message is shown that about 0.5 - 1 ms the connection to reverse interface dropped as shown

[ur_ros2_control_node-1] [INFO] [1714412116.518364831] [UR_Client_Library:]: Connection to reverse interface dropped. [ur_ros2_control_node-1] [INFO] [1714412116.518765602] [UR_Client_Library:]: Robot connected to reverse interface. Ready to receive control commands. [ur_ros2_control_node-1] [INFO] [1714412117.378185573] [UR_Client_Library:]: Connection to reverse interface dropped. [ur_ros2_control_node-1] [INFO] [1714412117.378787896] [UR_Client_Library:]: Robot connected to reverse interface. Ready to receive control commands.

Finally when the python code is executed then the "connection to reverse interface dropped" message is only received.

Thanks for all your help and support.

Relevant log output

No response

Accept Public visibility

Sohaib-Snouber commented 2 months ago

Update from working on this problem:

I have used what here in this link given: https://www.universal-robots.com/articles/ur/programming/secondary-program/ I mean i have changed my urscript, instead of using def, I have used "sec" as a definition of a secondary program. After running the ur_driver and running the urcaps external control and using remote control, then the python code has been executed, then the ur_driver has failed(and trying to reconnect) and i turn it off and run it again, i have got this as output log:

sohaib@sohaib-GE75-Raider-10SF:$ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=10.130.1.100 launch_rviz:=false
[INFO] [launch]: All log files can be found below /home/sohaib/.ros/log/2024-04-30-12-22-10-394976-sohaib-GE75-Raider-10SF-10503
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [dashboard_client-2]: process started with pid [10510]
[INFO] [controller_stopper_node-3]: process started with pid [10512]
[INFO] [ur_ros2_control_node-1]: process started with pid [10508]
[INFO] [urscript_interface-4]: process started with pid [10514]
[INFO] [robot_state_publisher-5]: process started with pid [10516]
[INFO] [spawner-6]: process started with pid [10518]
[INFO] [spawner-7]: process started with pid [10520]
[INFO] [spawner-8]: process started with pid [10522]
[INFO] [spawner-9]: process started with pid [10524]
[INFO] [spawner-10]: process started with pid [10526]
[INFO] [spawner-11]: process started with pid [10528]
[robot_state_publisher-5] [INFO] [1714472531.003165445] [robot_state_publisher]: got segment base
[robot_state_publisher-5] [INFO] [1714472531.003239721] [robot_state_publisher]: got segment base_link
[robot_state_publisher-5] [INFO] [1714472531.003247353] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-5] [INFO] [1714472531.003251170] [robot_state_publisher]: got segment flange
[robot_state_publisher-5] [INFO] [1714472531.003255484] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-5] [INFO] [1714472531.003260135] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-5] [INFO] [1714472531.003265041] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-5] [INFO] [1714472531.003270075] [robot_state_publisher]: got segment tool0
[robot_state_publisher-5] [INFO] [1714472531.003275655] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-5] [INFO] [1714472531.003281201] [robot_state_publisher]: got segment world
[robot_state_publisher-5] [INFO] [1714472531.003286521] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-5] [INFO] [1714472531.003291766] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-5] [INFO] [1714472531.003297402] [robot_state_publisher]: got segment wrist_3_link
[dashboard_client-2] [INFO] [1714472531.008911335] [UR_Client_Library:]: Connected: Universal Robots Dashboard Server
[dashboard_client-2] 
[controller_stopper_node-3] [INFO] [1714472531.014894320] [Controller stopper]: Waiting for switch controller service to come up on controller_manager/switch_controller
[ur_ros2_control_node-1] [WARN] [1714472531.017007124] [controller_manager]: [Deprecated] Passing the robot description parameter directly to the control_manager node is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.
[ur_ros2_control_node-1] text not specified in the tf_prefix tag
[ur_ros2_control_node-1] [INFO] [1714472531.019092681] [resource_manager]: Loading hardware 'ur5e' 
[ur_ros2_control_node-1] [INFO] [1714472531.022270611] [resource_manager]: Initialize hardware 'ur5e' 
[ur_ros2_control_node-1] [INFO] [1714472531.022337316] [resource_manager]: Successful initialization of hardware 'ur5e'
[ur_ros2_control_node-1] [INFO] [1714472531.022546026] [resource_manager]: 'configure' hardware 'ur5e' 
[ur_ros2_control_node-1] [INFO] [1714472531.022556656] [URPositionHardwareInterface]: Starting ...please wait...
[ur_ros2_control_node-1] [INFO] [1714472531.022569969] [URPositionHardwareInterface]: Initializing driver...
[ur_ros2_control_node-1] [WARN] [1714472531.023522619] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472531.253816623] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472531.254405652] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472532.278332632] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
[spawner-7] [INFO] [1714472533.471371367] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-10] [INFO] [1714472533.485289128] [spawner_force_torque_sensor_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-9] [INFO] [1714472533.499340380] [spawner_speed_scaling_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-11] [INFO] [1714472533.500807441] [spawner_forward_position_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1714472533.501286576] [spawner_scaled_joint_trajectory_controller]: Waiting for '/controller_manager' services to be available
[spawner-8] [INFO] [1714472533.502228523] [spawner_io_and_status_controller]: Waiting for '/controller_manager' services to be available
[spawner-7] [INFO] [1714472535.491770925] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-10] [INFO] [1714472535.505479578] [spawner_force_torque_sensor_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-9] [INFO] [1714472535.519299192] [spawner_speed_scaling_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-11] [INFO] [1714472535.520637469] [spawner_forward_position_controller]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1714472535.520819081] [spawner_scaled_joint_trajectory_controller]: Waiting for '/controller_manager' services to be available
[spawner-8] [INFO] [1714472535.521508516] [spawner_io_and_status_controller]: Waiting for '/controller_manager' services to be available
[spawner-7] [INFO] [1714472537.511744614] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-10] [INFO] [1714472537.525631611] [spawner_force_torque_sensor_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-9] [INFO] [1714472537.539322196] [spawner_speed_scaling_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1714472537.540333751] [spawner_scaled_joint_trajectory_controller]: Waiting for '/controller_manager' services to be available
[spawner-11] [INFO] [1714472537.540580806] [spawner_forward_position_controller]: Waiting for '/controller_manager' services to be available
[spawner-8] [INFO] [1714472537.540929751] [spawner_io_and_status_controller]: Waiting for '/controller_manager' services to be available
[spawner-7] [INFO] [1714472539.531859020] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-10] [INFO] [1714472539.545634659] [spawner_force_torque_sensor_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-9] [INFO] [1714472539.559381396] [spawner_speed_scaling_state_broadcaster]: Waiting for '/controller_manager' services to be available
[spawner-6] [INFO] [1714472539.559705623] [spawner_scaled_joint_trajectory_controller]: Waiting for '/controller_manager' services to be available
[spawner-8] [INFO] [1714472539.560355776] [spawner_io_and_status_controller]: Waiting for '/controller_manager' services to be available
[spawner-11] [INFO] [1714472539.560467787] [spawner_forward_position_controller]: Waiting for '/controller_manager' services to be available
[spawner-7] [ERROR] [1714472541.551931035] [spawner_joint_state_broadcaster]: Controller manager not available
[spawner-10] [ERROR] [1714472541.564248115] [spawner_force_torque_sensor_broadcaster]: Controller manager not available
[spawner-6] [ERROR] [1714472541.578238683] [spawner_scaled_joint_trajectory_controller]: Controller manager not available
[spawner-9] [ERROR] [1714472541.578239071] [spawner_speed_scaling_state_broadcaster]: Controller manager not available
[spawner-8] [ERROR] [1714472541.578322861] [spawner_io_and_status_controller]: Controller manager not available
[spawner-11] [ERROR] [1714472541.579111441] [spawner_forward_position_controller]: Controller manager not available
[ERROR] [spawner-7]: process has died [pid 10520, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args'].
[ERROR] [spawner-10]: process has died [pid 10526, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner force_torque_sensor_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args'].
[ERROR] [spawner-11]: process has died [pid 10528, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner forward_position_controller --controller-manager /controller_manager --controller-manager-timeout 10 --inactive --ros-args'].
[ERROR] [spawner-8]: process has died [pid 10522, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner io_and_status_controller --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args'].
[ERROR] [spawner-6]: process has died [pid 10518, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner scaled_joint_trajectory_controller -c /controller_manager --controller-manager-timeout 10 --ros-args'].
[ERROR] [spawner-9]: process has died [pid 10524, exit code 1, cmd '/opt/ros/iron/lib/controller_manager/spawner speed_scaling_state_broadcaster --controller-manager /controller_manager --controller-manager-timeout 10 --ros-args'].
[ur_ros2_control_node-1] [WARN] [1714472542.279309208] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472542.373144610] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472542.373742002] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472543.414233674] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
[ur_ros2_control_node-1] [WARN] [1714472553.415146439] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472553.492782139] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472553.493310608] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472554.518293275] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
[ur_ros2_control_node-1] [WARN] [1714472564.518914536] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472564.611787833] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472564.612122244] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472565.654185052] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
[ur_ros2_control_node-1] [WARN] [1714472575.655133938] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472575.731459204] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472575.731976550] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472576.758227861] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[dashboard_client-2] [INFO] [1714472584.726835285] [rclcpp]: signal_handler(signum=2)
[controller_stopper_node-3] [INFO] [1714472584.726836049] [rclcpp]: signal_handler(signum=2)
[controller_stopper_node-3] [INFO] [1714472584.727185670] [Controller stopper]: Service available
[controller_stopper_node-3] [INFO] [1714472584.727198733] [Controller stopper]: Waiting for list controllers service to come up on controller_manager/list_controllers
[controller_stopper_node-3] [INFO] [1714472584.727207619] [Controller stopper]: Service available
[controller_stopper_node-3] 
[controller_stopper_node-3] >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
[controller_stopper_node-3] This error state is being overwritten:
[controller_stopper_node-3] 
[controller_stopper_node-3]   'rcl node's context is invalid, at ./src/rcl/node.c:446'
[controller_stopper_node-3] 
[controller_stopper_node-3] with this new error message:
[controller_stopper_node-3] 
[controller_stopper_node-3]   'publisher's context is invalid, at ./src/rcl/publisher.c:423'
[controller_stopper_node-3] 
[controller_stopper_node-3] rcutils_reset_error() should be called after error handling to avoid this.
[controller_stopper_node-3] <<<
[controller_stopper_node-3] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[controller_stopper_node-3]   what():  failed to create guard condition: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at ./src/rcl/guard_condition.c:67
[robot_state_publisher-5] [INFO] [1714472584.726834390] [rclcpp]: signal_handler(signum=2)
[ur_ros2_control_node-1] [INFO] [1714472584.726836755] [rclcpp]: signal_handler(signum=2)
[urscript_interface-4] [INFO] [1714472584.726835828] [rclcpp]: signal_handler(signum=2)
[controller_stopper_node-3] Stack trace (most recent call last):
[controller_stopper_node-3] #16   Object "", at 0xffffffffffffffff, in 
[controller_stopper_node-3] #15   Object "/opt/ros/iron/lib/ur_robot_driver/controller_stopper_node", at 0x55e192399894, in _start
[controller_stopper_node-3] #14   Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7f85bc25fe3f]
[controller_stopper_node-3] #13   Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7f85bc25fd8f]
[controller_stopper_node-3] #12   Object "/opt/ros/iron/lib/ur_robot_driver/controller_stopper_node", at 0x55e19239968e, in main
[controller_stopper_node-3] #11   Object "/opt/ros/iron/lib/ur_robot_driver/controller_stopper_node", at 0x55e1923a24e3, in ControllerStopper::ControllerStopper(std::shared_ptr<rclcpp::Node> const&, bool)
[controller_stopper_node-3] #10   Object "/opt/ros/iron/lib/librclcpp.so", at 0x7f85bc86303c, in rclcpp::executors::SingleThreadedExecutor::SingleThreadedExecutor(rclcpp::ExecutorOptions const&)
[controller_stopper_node-3] #9    Object "/opt/ros/iron/lib/librclcpp.so", at 0x7f85bc85589a, in rclcpp::Executor::Executor(rclcpp::ExecutorOptions const&)
[controller_stopper_node-3] #8    Object "/opt/ros/iron/lib/librclcpp.so", at 0x7f85bc87a6ad, in rclcpp::GuardCondition::GuardCondition(std::shared_ptr<rclcpp::Context>, rcl_guard_condition_options_s)
[controller_stopper_node-3] #7    Object "/opt/ros/iron/lib/librclcpp.so", at 0x7f85bc851f38, in rclcpp::exceptions::throw_from_rcl_error(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcutils_error_state_s const*, void (*)())
[controller_stopper_node-3] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f85bc52d1fd, in std::rethrow_exception(std::__exception_ptr::exception_ptr)
[controller_stopper_node-3] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f85bc52d276, in std::terminate()
[controller_stopper_node-3] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f85bc52d20b, in 
[controller_stopper_node-3] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f85bc521b9d, in 
[controller_stopper_node-3] #2    Source "./stdlib/abort.c", line 79, in abort [0x7f85bc25e7f2]
[controller_stopper_node-3] #1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x7f85bc278475]
[controller_stopper_node-3] #0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[controller_stopper_node-3]     | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[controller_stopper_node-3]       Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7f85bc2cc9fc]
[controller_stopper_node-3] Aborted (Signal sent by tkill() 10512 1000)
[INFO] [urscript_interface-4]: process has finished cleanly [pid 10514]
[INFO] [robot_state_publisher-5]: process has finished cleanly [pid 10516]
[INFO] [dashboard_client-2]: process has finished cleanly [pid 10510]
[ERROR] [controller_stopper_node-3]: process has died [pid 10512, exit code -6, cmd '/opt/ros/iron/lib/ur_robot_driver/controller_stopper_node --ros-args -r __node:=controller_stopper --params-file /tmp/launch_params_sniipnf2 --params-file /tmp/launch_params_hp7nzvd4 --params-file /tmp/launch_params_q4eyrodd'].
[ur_ros2_control_node-1] [WARN] [1714472586.758968363] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/doc/real_time.md for details.
[ur_ros2_control_node-1] [INFO] [1714472586.851198920] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1714472586.851428060] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [ERROR] [1714472587.894194064] [UR_Client_Library:]: Failed to initialize RTDE client, retrying in 10 seconds
[ERROR] [ur_ros2_control_node-1]: process[ur_ros2_control_node-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [ur_ros2_control_node-1]: sending signal 'SIGTERM' to process[ur_ros2_control_node-1]
[ur_ros2_control_node-1] [INFO] [1714472589.737884876] [rclcpp]: signal_handler(signum=15)
[ERROR] [ur_ros2_control_node-1]: process[ur_ros2_control_node-1] failed to terminate '10.0' seconds after receiving 'SIGTERM', escalating to 'SIGKILL'
[INFO] [ur_ros2_control_node-1]: sending signal 'SIGKILL' to process[ur_ros2_control_node-1]
[ERROR] [ur_ros2_control_node-1]: process has died [pid 10508, exit code -9, cmd '/opt/ros/iron/lib/ur_robot_driver/ur_ros2_control_node --ros-args --params-file /tmp/launch_params_oyccl9dr --params-file /opt/ros/iron/share/ur_robot_driver/config/ur5e_update_rate.yaml --params-file /tmp/launch_params_63yg50cq'].
sohaib@sohaib-GE75-Raider-10SF:$ 

Note: something strange happened to the teach pendant, it froze partially, like i change from remote control to local control to be able to stop and restart the urcaps program, but i was not able to stop the program, then i restarted the robot from teach pendant. (this freeze situation only happen when using the "sec") I have tried to install the kernel to see if it will resolve the issue, but an error occured while building up the kernel, as follow:


 make[2]: *** [debian/rules:6: build] Errore 2
dpkg-buildpackage: Errore: debian/rules build subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Errore 2
make: *** [Makefile:1464: deb-pkg] Errore 2
``

I have tried something like commenting some config keys, as in this link [https://askubuntu.com/questions/1327749/error-in-compiling-installing-realtime-kernel-on-ubuntu-20-04-2-lts](url) , but it did not work.

I have chnaged my path, I am now trying to learn a little bit of the ur_driver, thinking it will help me to integrate the gripper to the ur.
fmauch commented 2 months ago

Hi,

to control IOs, you don't need to send URScript. You can directly use the services from the io_and_status_controller:

ros2 service call /io_and_status_controller/set_io ur_msgs/srv/SetIO "{fun: 1, state: 1, pin: 1}"

If you want to include the gripper to your URDF you'll need a description for that and a ROS driver for it.

fmauch commented 1 month ago

I will close this issue, since there was a solution proposed roughly a month ago. Feel free to comment / reopen if there is still any issue persisting.