Unable to activate the controllers

I am getting this errosr as I try to launch the launch_control file mentioned in the tutorial:

https://docs.ros.org/en/ros2_packages/humble/api/ur_robot_driver/usage.html#usage-with-official-ur-simulator

===================================================================================================
Terminal Error:

[[INFO] [launch]: All log files can be found below /home/devesh/.ros/log/2024-10-30-13-21-38-675288-devesh-ThinkPad-P14s-Gen-2a-61470
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [dashboard_client-2]: process started with pid [61474]
[INFO] [controller_stopper_node-3]: process started with pid [61476]
[INFO] [ur_ros2_control_node-1]: process started with pid [61472]
[INFO] [urscript_interface-4]: process started with pid [61478]
[INFO] [robot_state_publisher-5]: process started with pid [61480]
[INFO] [rviz2-6]: process started with pid [61482]
[INFO] [spawner-7]: process started with pid [61484]
[INFO] [spawner-8]: process started with pid [61486]
[INFO] [spawner-9]: process started with pid [61488]
[rviz2-6] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[dashboard_client-2] [INFO] [1730290899.123904674] [UR_Client_Library:]: Connected: Universal Robots Dashboard Server
[dashboard_client-2]
[controller_stopper_node-3] [INFO] [1730290899.125921382] [Controller stopper]: Waiting for switch controller service to come up on controller_manager/switch_controller
[ur_ros2_control_node-1] [WARN] [1730290899.126736893] [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] [1730290899.127341398] [resource_manager]: Loading hardware ‘ur20’
[ur_ros2_control_node-1] [INFO] [1730290899.131035315] [resource_manager]: Initialize hardware ‘ur20’
[ur_ros2_control_node-1] [INFO] [1730290899.131234299] [resource_manager]: Successful initialization of hardware ‘ur20’
[ur_ros2_control_node-1] [INFO] [1730290899.131517410] [resource_manager]: ‘configure’ hardware ‘ur20’
[ur_ros2_control_node-1] [INFO] [1730290899.131537648] [URPositionHardwareInterface]: Starting …please wait…
[ur_ros2_control_node-1] [INFO] [1730290899.131560381] [URPositionHardwareInterface]: Initializing driver…
[ur_ros2_control_node-1] [WARN] [1730290899.132731771] [UR_Client_Library:]: Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency kernel with FIFO scheduling. See Universal_Robots_ROS_Driver/ur_robot_driver/doc/real_time.md at master · UniversalRobots/Universal_Robots_ROS_Driver · GitHub for details.
[robot_state_publisher-5] [INFO] [1730290899.137623647] [robot_state_publisher]: got segment base
[robot_state_publisher-5] [INFO] [1730290899.137798455] [robot_state_publisher]: got segment base_link
[robot_state_publisher-5] [INFO] [1730290899.137810979] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-5] [INFO] [1730290899.137819475] [robot_state_publisher]: got segment flange
[robot_state_publisher-5] [INFO] [1730290899.137827700] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-5] [INFO] [1730290899.137835415] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-5] [INFO] [1730290899.137842568] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-5] [INFO] [1730290899.137850443] [robot_state_publisher]: got segment tool0
[robot_state_publisher-5] [INFO] [1730290899.137857987] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-5] [INFO] [1730290899.137865391] [robot_state_publisher]: got segment world
[robot_state_publisher-5] [INFO] [1730290899.137873246] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-5] [INFO] [1730290899.137880610] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-5] [INFO] [1730290899.137888094] [robot_state_publisher]: got segment wrist_3_link
[spawner-9] [INFO] [1730290899.474835953] [spawner_forward_position_controller]: waiting for service /controller_manager/list_controllers to become available…
[spawner-7] [INFO] [1730290899.480560022] [spawner_scaled_joint_trajectory_controller]: waiting for service /controller_manager/list_controllers to become available…
[spawner-8] [INFO] [1730290899.483543645] [spawner_joint_state_broadcaster]: waiting for service /controller_manager/list_controllers to become available…
[rviz2-6] [INFO] [1730290899.532323217] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-6] [INFO] [1730290899.532471546] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-6] [INFO] [1730290899.545815915] [rviz2]: Stereo is NOT SUPPORTED
[ur_ros2_control_node-1] [INFO] [1730290899.656503694] [UR_Client_Library:]: Negotiated RTDE protocol version to 2.
[ur_ros2_control_node-1] [INFO] [1730290899.656748945] [UR_Client_Library:]: Setting up RTDE communication with frequency 500.000000
[ur_ros2_control_node-1] [FATAL] [1730290900.713492256] [URPositionHardwareInterface]: Variable ‘speed_slider_mask’ is currently controlled by another RTDE client. The input recipe can’t be used as configured
[ur_ros2_control_node-1] [INFO] [1730290900.713548793] [resource_manager]: Failed to ‘configure’ hardware ‘ur20’
[controller_stopper_node-3] [INFO] [1730290900.717225768] [Controller stopper]: Service available
[controller_stopper_node-3] [INFO] [1730290900.717247408] [Controller stopper]: Waiting for list controllers service to come up on controller_manager/list_controllers
[controller_stopper_node-3] [INFO] [1730290900.717258008] [Controller stopper]: Service available
[ur_ros2_control_node-1] [WARN] [1730290900.718995301] [controller_manager]: Could not enable FIFO RT scheduling policy
[ur_ros2_control_node-1] [INFO] [1730290900.730116315] [controller_manager]: Loading controller ‘forward_position_controller’
[spawner-9] [INFO] [1730290900.738230873] [spawner_forward_position_controller]: Loaded forward_position_controller
[ur_ros2_control_node-1] [INFO] [1730290900.739586869] [controller_manager]: Loading controller ‘scaled_joint_trajectory_controller’
[ur_ros2_control_node-1] [WARN] [1730290900.757964500] [scaled_joint_trajectory_controller]: [Deprecated]: “allow_nonzero_velocity_at_trajectory_end” is set to true. The default behavior will change to false.
[ur_ros2_control_node-1] [INFO] [1730290900.759342849] [controller_manager]: Loading controller ‘joint_state_broadcaster’
[spawner-7] [INFO] [1730290900.760109899] [spawner_scaled_joint_trajectory_controller]: Loaded scaled_joint_trajectory_controller
[ur_ros2_control_node-1] [INFO] [1730290900.767354303] [controller_manager]: Configuring controller ‘forward_position_controller’
[spawner-8] [INFO] [1730290900.768399636] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1730290900.768782165] [forward_position_controller]: configure successful
[ur_ros2_control_node-1] [INFO] [1730290900.769300528] [controller_manager]: Configuring controller ‘scaled_joint_trajectory_controller’
[ur_ros2_control_node-1] [INFO] [1730290900.769537363] [scaled_joint_trajectory_controller]: No specific joint names are used for command interfaces. Using ‘joints’ parameter.
[ur_ros2_control_node-1] [INFO] [1730290900.769581105] [scaled_joint_trajectory_controller]: Command interfaces are [position] and state interfaces are [position velocity].
[ur_ros2_control_node-1] [INFO] [1730290900.769641108] [scaled_joint_trajectory_controller]: Using ‘splines’ interpolation method.
[ur_ros2_control_node-1] [INFO] [1730290900.771578205] [scaled_joint_trajectory_controller]: Controller state will be published at 100.00 Hz.
[ur_ros2_control_node-1] [INFO] [1730290900.774783264] [scaled_joint_trajectory_controller]: Action status changes will be monitored at 20.00 Hz.
[ur_ros2_control_node-1] [INFO] [1730290900.781385703] [controller_manager]: Configuring controller ‘joint_state_broadcaster’
[ur_ros2_control_node-1] [INFO] [1730290900.781589736] [joint_state_broadcaster]: ‘joints’ or ‘interfaces’ parameter is empty. All available state interfaces will be published
[ur_ros2_control_node-1] [ERROR] [1730290900.785323487] [resource_manager]: Not acceptable command interfaces combination:
[ur_ros2_control_node-1] Start interfaces:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] shoulder_pan_joint/position
[ur_ros2_control_node-1] shoulder_lift_joint/position
[ur_ros2_control_node-1] elbow_joint/position
[ur_ros2_control_node-1] wrist_1_joint/position
[ur_ros2_control_node-1] wrist_2_joint/position
[ur_ros2_control_node-1] wrist_3_joint/position
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1] Stop interfaces:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1] Not available:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] shoulder_pan_joint/position
[ur_ros2_control_node-1] shoulder_lift_joint/position
[ur_ros2_control_node-1] elbow_joint/position
[ur_ros2_control_node-1] wrist_1_joint/position
[ur_ros2_control_node-1] wrist_2_joint/position
[ur_ros2_control_node-1] wrist_3_joint/position
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1]
[ur_ros2_control_node-1] [ERROR] [1730290900.785353343] [controller_manager]: Could not switch controllers since prepare command mode switch was rejected.
[spawner-7] [ERROR] [1730290900.786156021] [spawner_scaled_joint_trajectory_controller]: Failed to activate controller
[ur_ros2_control_node-1] [ERROR] [1730290900.787137434] [joint_state_broadcaster]: None of requested interfaces exist. Controller will not run.
[ur_ros2_control_node-1] [WARN] [1730290900.787173471] [joint_state_broadcaster]: Error occurred while doing error handling.
[ur_ros2_control_node-1] [ERROR] [1730290900.787208587] [controller_manager]: After activation, controller ‘joint_state_broadcaster’ is in state ‘unconfigured’ (1), expected ‘active’ (3).
[spawner-8] [INFO] [1730290900.790312276] [spawner_joint_state_broadcaster]: Configured and activated joint_state_broadcaster
[ur_ros2_control_node-1] [INFO] [1730290900.792667989] [controller_manager]: Loading controller ‘io_and_status_controller’
[spawner-8] [INFO] [1730290900.802358607] [spawner_joint_state_broadcaster]: Loaded io_and_status_controller
[ur_ros2_control_node-1] [INFO] [1730290900.804350137] [controller_manager]: Configuring controller ‘io_and_status_controller’
[ur_ros2_control_node-1] [ERROR] [1730290900.807658750] [resource_manager]: Not acceptable command interfaces combination:
[ur_ros2_control_node-1] Start interfaces:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_0
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_1
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_2
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_3
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_4
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_5
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_6
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_7
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_8
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_9
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_10
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_11
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_12
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_13
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_14
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_15
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_16
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_17
[ur_ros2_control_node-1] gpio/standard_analog_output_cmd_0
[ur_ros2_control_node-1] gpio/standard_analog_output_cmd_1
[ur_ros2_control_node-1] gpio/tool_voltage_cmd
[ur_ros2_control_node-1] gpio/io_async_success
[ur_ros2_control_node-1] speed_scaling/target_speed_fraction_cmd
[ur_ros2_control_node-1] speed_scaling/target_speed_fraction_async_success
[ur_ros2_control_node-1] resend_robot_program/resend_robot_program_cmd
[ur_ros2_control_node-1] resend_robot_program/resend_robot_program_async_success
[ur_ros2_control_node-1] payload/mass
[ur_ros2_control_node-1] payload/cog.x
[ur_ros2_control_node-1] payload/cog.y
[ur_ros2_control_node-1] payload/cog.z
[ur_ros2_control_node-1] payload/payload_async_success
[ur_ros2_control_node-1] zero_ftsensor/zero_ftsensor_cmd
[ur_ros2_control_node-1] zero_ftsensor/zero_ftsensor_async_success
[ur_ros2_control_node-1] hand_back_control/hand_back_control_cmd
[ur_ros2_control_node-1] hand_back_control/hand_back_control_async_success
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1] Stop interfaces:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1] Not available:
[ur_ros2_control_node-1] [
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_0
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_1
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_2
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_3
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_4
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_5
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_6
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_7
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_8
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_9
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_10
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_11
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_12
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_13
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_14
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_15
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_16
[ur_ros2_control_node-1] gpio/standard_digital_output_cmd_17
[ur_ros2_control_node-1] gpio/standard_analog_output_cmd_0
[ur_ros2_control_node-1] gpio/standard_analog_output_cmd_1
[ur_ros2_control_node-1] gpio/tool_voltage_cmd
[ur_ros2_control_node-1] gpio/io_async_success
[ur_ros2_control_node-1] speed_scaling/target_speed_fraction_cmd
[ur_ros2_control_node-1] speed_scaling/target_speed_fraction_async_success
[ur_ros2_control_node-1] resend_robot_program/resend_robot_program_cmd
[ur_ros2_control_node-1] resend_robot_program/resend_robot_program_async_success
[ur_ros2_control_node-1] payload/mass
[ur_ros2_control_node-1] payload/cog.x
[ur_ros2_control_node-1] payload/cog.y
[ur_ros2_control_node-1] payload/cog.z
[ur_ros2_control_node-1] payload/payload_async_success
[ur_ros2_control_node-1] zero_ftsensor/zero_ftsensor_cmd
[ur_ros2_control_node-1] zero_ftsensor/zero_ftsensor_async_success
[ur_ros2_control_node-1] hand_back_control/hand_back_control_cmd
[ur_ros2_control_node-1] hand_back_control/hand_back_control_async_success
[ur_ros2_control_node-1] ]
[ur_ros2_control_node-1]
[ur_ros2_control_node-1] [ERROR] [1730290900.807784667] [controller_manager]: Could not switch controllers since prepare command mode switch was rejected.
[spawner-8] [ERROR] [1730290900.808898338] [spawner_joint_state_broadcaster]: Failed to activate controller
[INFO] [spawner-9]: process has finished cleanly [pid 61488]
[ERROR] [spawner-7]: process has died [pid 61484, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner scaled_joint_trajectory_controller -c /controller_manager --controller-manager-timeout 10 --ros-args’].
[ERROR] [spawner-8]: process has died [pid 61486, exit code 1, cmd ‘/opt/ros/humble/lib/controller_manager/spawner --controller-manager /controller_manager --controller-manager-timeout 10 joint_state_broadcaster io_and_status_controller speed_scaling_state_broadcaster force_torque_sensor_broadcaster ur_configuration_controller --ros-args’].
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[dashboard_client-2] [INFO] [1730290908.115758479] [rclcpp]: signal_handler(signum=2)
[controller_stopper_node-3] [INFO] [1730290908.115758860] [rclcpp]: signal_handler(signum=2)
[rviz2-6] [INFO] [1730290908.115758489] [rclcpp]: signal_handler(signum=2)
[robot_state_publisher-5] [INFO] [1730290908.115757908] [rclcpp]: signal_handler(signum=2)
[ur_ros2_control_node-1] [INFO] [1730290908.115763759] [rclcpp]: signal_handler(signum=2)
[urscript_interface-4] [INFO] [1730290908.115760082] [rclcpp]: signal_handler(signum=2)
[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
[ur_ros2_control_node-1] [INFO] [1730290908.140462460] [URPositionHardwareInterface]: Stopping …please wait…
[ur_ros2_control_node-1] [INFO] [1730290908.140482528] [URPositionHardwareInterface]: System successfully stopped!
[ERROR] [controller_stopper_node-3]: process has died [pid 61476, exit code -6, cmd ‘/home/devesh/ur_moveit_ws/install/ur_robot_driver/lib/ur_robot_driver/controller_stopper_node --ros-args -r __node:=controller_stopper --params-file /tmp/launch_params_3jgarl91 --params-file /tmp/launch_params_oy7qk7xt --params-file /tmp/launch_params_9tlgmfbe’].
[INFO] [urscript_interface-4]: process has finished cleanly [pid 61478]
[INFO] [robot_state_publisher-5]: process has finished cleanly [pid 61480]
[INFO] [dashboard_client-2]: process has finished cleanly [pid 61474]
[INFO] [ur_ros2_control_node-1]: process has finished cleanly [pid 61472]
[INFO] [rviz2-6]: process has finished cleanly [pid 61482]

===============================================================================================

I checked with the command:

ros2 control list_controllers

forward_position_controller position_controllers/JointGroupPositionController inactive
scaled_joint_trajectory_controller ur_controllers/ScaledJointTrajectoryController inactive
io_and_status_controller ur_controllers/GPIOController inactive
joint_state_broadcaster joint_state_broadcaster/JointStateBroadcaster unconfigured

and tried to activate the controllers using:

ros2 control set_controller_state scaled_joint_trajectory_controller active

but I get the error:

Error activating controller, check controller_manager logs

How do I solve this problem? I want to control the UR20 from my PC using ROS