Resource conflict on joint when tried to run 2 different controller [ROS Noetic]
I am running the code using ROS Noetic in Ubuntu 20.04.5 LTS 64-bit with kernel 5.15.0-69-generic.
I tried to run 2 different controllers that are using the same joint at the same time. The design is the controller yumiqpcontrol running on top of abbrobotdriver, so they are using the same resource/joint.
Here is somethings that I have tried,
rosservice call /yumi/enter code hererws/sm_addin/start_egm_joint "{}"
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [joint_group_velocity_controller]
stop_controllers: ['']
strictness: 1
start_asap: false
timeout: 0.0"
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [left_arm_vel_controller]
stop_controllers: ['joint_group_velocity_controller']
strictness: 2
start_asap: false
timeout: 0.0"
But the robot is not moving at all.
If I change the rosservice call into below,
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [left_arm_vel_controller]
stop_controllers: ['']
strictness: 2
start_asap: false
timeout: 0.0"
it will display this error
[ERROR] [1680864226.949310717]: Could not stop controller with name '' because no controller with this name exists
And I change the rosservice call into below,
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [left_arm_vel_controller]
stop_controllers: ['']
strictness: 1
start_asap: false
timeout: 0.0"
it will display this error
[ WARN] [1680864437.090463978]: Resource conflict on [yumi_robl_joint_1]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090508604]: Resource conflict on [yumi_robl_joint_2]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090524328]: Resource conflict on [yumi_robl_joint_3]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090536224]: Resource conflict on [yumi_robl_joint_4]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090550623]: Resource conflict on [yumi_robl_joint_5]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090560171]: Resource conflict on [yumi_robl_joint_6]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ WARN] [1680864437.090570276]: Resource conflict on [yumi_robl_joint_7]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
[ERROR] [1680864437.090600722]: Could not switch controllers, due to resource conflict
Asked by Louis on 2023-04-16 17:47:11 UTC
Answers
My immediate response would be to say it appears everything is working exactly as it should: you are asking two controllers to claim the same set of joints, which is a situation which can not work, and therefore the controller manager will refuse to execute your request.
I tried to run 2 different controllers that are using the same joint at the same time.
exactly. That can't work.
Perhaps you could explain why you want to do this?
Edit:
The purpose is to combine the abb_robot_driver and the yumi_qp_control to make the yumi robot move smoother and looks more natural.
The yumi_qp_control is based on ur_qp_control
that has been modified for yumi robot
I would expect the same to happen with ur_robot_driver
, as it also doesn't allow multiple controllers to claim the same set of joints (resources really) at the same time.
The main cause of your problem is you're trying to have both the joint_group_velocity_controller
and the left_arm_vel_controller
active at the same time, and that's not allowed, and thus not supported.
You'll have to determine which controller you want/need active, and only activate that one (and stop the other one).
Asked by gvdhoorn on 2023-04-17 03:15:00 UTC
Comments
The purpose is to combine the abb_robot_driver and the yumi_qp_control to make the yumi robot move smoother and looks more natural.
The yumi_qp_control is based on ur_qp_control
that has been modified for yumi robot
Edit:
You'll have to determine which controller you want/need active, and only activate that one (and stop the other one).
hmm didn't by doing this, it mean that I already determine which controller that will be activate?
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [joint_group_velocity_controller]
stop_controllers: ['']
strictness: 1
start_asap: false
timeout: 0.0"
rosservice call /yumi/egm/controller_manager/switch_controller "start_controllers: [left_arm_vel_controller]
stop_controllers: ['joint_group_velocity_controller']
strictness: 2
start_asap: false
timeout: 0.0"
Asked by Louis on 2023-04-17 04:05:35 UTC
and also when i tried to run move the robot using the rviz, it show that it was failed and showing this instead
[WARN] [1680864437.090463978]: Resource conflict on [yumi_robl_joint_1]. Controllers = [left_arm_vel_controller, joint_group_velocity_controller, ]
...
[ERROR] [1680864437.090600722]: Could not switch controllers, due to resource conflict
Asked by Louis on 2023-04-18 04:27:58 UTC
You appear to only start controllers. You'll have to stop whatever is currently claiming those joint
s first.
If joint_group_velocity_controller
is already started, you can not also start left_arm_vel_controller
. You must first stop joint_group_velocity_controller
. Only then can you start left_arm_vel_controller
.
and also when i tried to run move the robot using the rviz
I guess you mean MoveIt? MoveIt can't work with a JointGroupVelocityController
. MoveIt basically only supports JointTrajectoryController
s (it's more complicated than that, but that's basically what's supported).
Asked by gvdhoorn on 2023-04-18 05:47:18 UTC
Comments