ros2_controllers: [Jazzy] JTC fails with - Caught exception in callback for transition 10

Describe the bug

Loading and activating a JTC fails with:

[ros2_control_node-19] [ERROR] [1732535679.279340867] [joint_trajectory_controller_top]: Caught exception in callback for transition 10
[ros2_control_node-19] [ERROR] [1732535679.279449259] [joint_trajectory_controller_top]: Original error: Resource temporarily unavailable
[ros2_control_node-19] [WARN] [1732535679.279520632] [joint_trajectory_controller_top]: Error occurred while doing error handling.
[ros2_control_node-19] [ERROR] [1732535679.279555908] [controller_manager]: After configuring, controller 'joint_trajectory_controller_top' is in state 'unconfigured' , expected inactive.

From my controllers.yaml

...
joint_trajectory_controller_top:
      type: joint_trajectory_controller/JointTrajectoryController
....

joint_trajectory_controller_top:
  ros__parameters:
    joints:
      - ur_top/shoulder_pan_joint
      - ur_top/shoulder_lift_joint
      - ur_top/elbow_joint
      - ur_top/wrist_1_joint
      - ur_top/wrist_2_joint
      - ur_top/wrist_3_joint
    command_interfaces:
      - position
    state_interfaces:
      - position
      - velocity
    state_publish_rate: 100.0
    action_monitor_rate: 20.0
    allow_partial_joints_goal: false
    constraints:
      stopped_velocity_tolerance: 0.1
      goal_time: 0.05
      ur_top/shoulder_pan_joint: { trajectory: 0.2, goal: 0.0015 }
      ur_top/shoulder_lift_joint: { trajectory: 0.2, goal: 0.0015 }
      ur_top/elbow_joint: { trajectory: 0.2, goal: 0.0015 }
      ur_top/wrist_1_joint: { trajectory: 0.2, goal: 0.0015 }
      ur_top/wrist_2_joint: { trajectory: 0.2, goal: 0.0015 }
      ur_top/wrist_3_joint: { trajectory: 0.2, goal: 0.0015 }



Everything was working mostly with a jazzy binary installation before updating it to the latest jazzy release with only this issue occurring from time to time: https://github.com/ros-controls/ros2_control/issues/1883

Environment (please complete the following information):

  • Version Jazzy, binary. controller_manager 4.20.0, JTC 4.16.0
  • UR packages are built from source. Minor changes to the ScaledJTC. But this issue also occurs with the default JTC
  • Running in a docker container on a Ubuntu 24.04 host (networking host)
  • Running with mocked hardware

EDIT: I did a bit of additional research. Looks like: Resource temporarily unavailable is usually issued by the operating system. But even after reading quite a bit of code I have no clue why this error should occur in the configure method of a controller. I am running the system with mocked hardware at the moment.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you all. I met the same problem on a raspberry pi 5 8G RAM. add lock_memory: false to ros2_control.yaml under config folder did fix the problem.

I am one step further: I can configure and activate a JTC now by disabling locked memory for the controller manager:

controller_manager:
  ros__parameters:
    update_rate: 500
    lock_memory: false

@saikishor I think you added the memlock - perhaps you have some insights ?

Thank you so much! it’s really useful, works on my system!

I found the explanation: https://stackoverflow.com/questions/34165276/malloc-setting-errno-to-eagain

Apparently EAGAIN comes from mmap which is apparently called in case malloc fails.

@firesurfer do you mind reviewing the PR on the ros2_control side and approve it. If it looks good to you

@saikishor I increased my locked memory limit not to unlimited by 64GB and it seems to work fine now.

max locked memory (kbytes, -l) 64000000

I also made sure that I removed the configuration entry from my controllers.yaml

I am one step further:

I can configure and activate a JTC now by disabling locked memory for the controller manager:

controller_manager:
  ros__parameters:
    update_rate: 500
    lock_memory: false

@saikishor I think you added the memlock - perhaps you have some insights ?