ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Okay.. I ran through the entire tutorial... and I can reproduce your error when my package path doesn't include the controller.. This is the error

[ERROR] [1300151311.132418409, 151.906000000]: Could not load class MyControllerPlugin: According to the loaded plugin descriptions the class MyControllerPlugin with base class type pr2_controller_interface::Controller does not exist. Declared types are  CartesianTrajectoryController ethercat_trigger_controllers/MultiTriggerController ethercat_trigger_controllers/ProjectorController ethercat_trigger_controllers/TriggerController joint_qualification_controllers/CheckoutController joint_qualification_controllers/CounterbalanceTestController joint_qualification_controllers/HeadPositionController joint_qualification_controllers/HysteresisController joint_qualification_controllers/JointLimitCalibrationController joint_qualification_controllers/MotorJointCalibrationController joint_qualification_controllers/WristDifferenceController pr2_calibration_controllers/CasterCalibrationController pr2_calibration_controllers/FakeCalibrationController pr2_calibration_controllers/GripperCalibrationController pr2_calibration_controllers/JointCalibrationController pr2_calibration_controllers/WristCalibrationController pr2_controller_manager/TestController pr2_gripper_sensor_controller/PR2GripperSensorController pr2_mechanism_controllers/CasterController pr2_mechanism_controllers/CasterControllerNode pr2_mechanism_controllers/LaserScannerTrajController pr2_mechanism_controllers/Pr2BaseController pr2_mechanism_controllers/Pr2BaseController2 pr2_mechanism_controllers/Pr2GripperController pr2_mechanism_controllers/Pr2Odometry robot_mechanism_controllers/CartesianPoseController robot_mechanism_controllers/CartesianTwistController robot_mechanism_controllers/CartesianWrenchController robot_mechanism_controllers/JointEffortController robot_mechanism_controllers/JointPositionController robot_mechanism_controllers/JointSplineTrajectoryController robot_mechanism_controllers/JointTrajectoryActionController robot_mechanism_controllers/JointVelocityController tff_controller/TFFController
[ERROR] [1300151311.132503256, 151.907000000]: Could not load controller 'my_controller_name' because controller type 'MyControllerPlugin' does not exist

Make sure that you have your path setup correctly in EVERY terminal window. This means you can roscd to the controller package in every terminal. If you don't have you path setup correctly you will get the error.

Okay.. I ran through the entire tutorial... and I can reproduce your error when my package path doesn't include the controller.. This is the error

[ERROR] [1300151311.132418409, 151.906000000]: Could not load class MyControllerPlugin: According to the loaded plugin descriptions the class MyControllerPlugin with base class type pr2_controller_interface::Controller does not exist. Declared types are  CartesianTrajectoryController ethercat_trigger_controllers/MultiTriggerController ethercat_trigger_controllers/ProjectorController ethercat_trigger_controllers/TriggerController joint_qualification_controllers/CheckoutController joint_qualification_controllers/CounterbalanceTestController joint_qualification_controllers/HeadPositionController joint_qualification_controllers/HysteresisController joint_qualification_controllers/JointLimitCalibrationController joint_qualification_controllers/MotorJointCalibrationController joint_qualification_controllers/WristDifferenceController pr2_calibration_controllers/CasterCalibrationController pr2_calibration_controllers/FakeCalibrationController pr2_calibration_controllers/GripperCalibrationController pr2_calibration_controllers/JointCalibrationController pr2_calibration_controllers/WristCalibrationController pr2_controller_manager/TestController pr2_gripper_sensor_controller/PR2GripperSensorController pr2_mechanism_controllers/CasterController pr2_mechanism_controllers/CasterControllerNode pr2_mechanism_controllers/LaserScannerTrajController pr2_mechanism_controllers/Pr2BaseController pr2_mechanism_controllers/Pr2BaseController2 pr2_mechanism_controllers/Pr2GripperController pr2_mechanism_controllers/Pr2Odometry robot_mechanism_controllers/CartesianPoseController robot_mechanism_controllers/CartesianTwistController robot_mechanism_controllers/CartesianWrenchController robot_mechanism_controllers/JointEffortController robot_mechanism_controllers/JointPositionController robot_mechanism_controllers/JointSplineTrajectoryController robot_mechanism_controllers/JointTrajectoryActionController robot_mechanism_controllers/JointVelocityController tff_controller/TFFController
[ERROR] [1300151311.132503256, 151.907000000]: Could not load controller 'my_controller_name' because controller type 'MyControllerPlugin' does not exist

Make sure that you have your path setup correctly in EVERY terminal window. This means you can roscd to the controller package in every terminal. If you don't have you your path setup correctly you will get the error.

Okay.. I ran through the entire tutorial... and I can reproduce your error when my package path doesn't include the controller.. This is the error

[ERROR] [1300151311.132418409, 151.906000000]: Could not load class MyControllerPlugin: According to the loaded plugin descriptions the class MyControllerPlugin with base class type pr2_controller_interface::Controller does not exist. Declared types are  CartesianTrajectoryController ethercat_trigger_controllers/MultiTriggerController ethercat_trigger_controllers/ProjectorController ethercat_trigger_controllers/TriggerController joint_qualification_controllers/CheckoutController joint_qualification_controllers/CounterbalanceTestController joint_qualification_controllers/HeadPositionController joint_qualification_controllers/HysteresisController joint_qualification_controllers/JointLimitCalibrationController joint_qualification_controllers/MotorJointCalibrationController joint_qualification_controllers/WristDifferenceController pr2_calibration_controllers/CasterCalibrationController pr2_calibration_controllers/FakeCalibrationController pr2_calibration_controllers/GripperCalibrationController pr2_calibration_controllers/JointCalibrationController pr2_calibration_controllers/WristCalibrationController pr2_controller_manager/TestController pr2_gripper_sensor_controller/PR2GripperSensorController pr2_mechanism_controllers/CasterController pr2_mechanism_controllers/CasterControllerNode pr2_mechanism_controllers/LaserScannerTrajController pr2_mechanism_controllers/Pr2BaseController pr2_mechanism_controllers/Pr2BaseController2 pr2_mechanism_controllers/Pr2GripperController pr2_mechanism_controllers/Pr2Odometry robot_mechanism_controllers/CartesianPoseController robot_mechanism_controllers/CartesianTwistController robot_mechanism_controllers/CartesianWrenchController robot_mechanism_controllers/JointEffortController robot_mechanism_controllers/JointPositionController robot_mechanism_controllers/JointSplineTrajectoryController robot_mechanism_controllers/JointTrajectoryActionController robot_mechanism_controllers/JointVelocityController tff_controller/TFFController
[ERROR] [1300151311.132503256, 151.907000000]: Could not load controller 'my_controller_name' because controller type 'MyControllerPlugin' does not exist

Make sure that you have your path setup correctly in EVERY terminal window. This means you can roscd to the controller package in every terminal. If you don't have your path setup correctly you will get the error.

OR

I can reproduce the error when the controller_plugin.xml does not reflect the actual code as you have in your question. Your namespace is my_controller_ns but you call out in the controller_plugins.xml that the namespace is joint_controller_ns. This is the error

[ERROR] [1300214922.756787931, 74.340000000]: Could not load class my_controller_pkg/MyControllerPlugin: The class my_controller_pkg/MyControllerPlugin could not be loaded. Error: Not found: joint_controller_ns::MyControllerClass
[ERROR] [1300214922.756846627, 74.340000000]: Could not load controller 'my_controller_name' because controller type 'my_controller_pkg/MyControllerPlugin' does not exist

Update your controller_plugin.xml to reflect the actual controller and it should run.