Ask Your Question
0

Why doesn't the pr2_controller_manager see my controller?

asked 2014-08-21 21:36:19 -0500

mpan gravatar image

Hi,

I'm trying to run though the tutorials using ROS Groovy: http://wiki.ros.org/pr2_mechanism/Tutorials/Writing%20a%20realtime%20joint%20controller http://wiki.ros.org/pr2_mechanism/Tutorials/Running%20a%20realtime%20joint%20controller

However, I'm having problems with the step where I check to see if the command lists the controller.

rosrun pr2_controller_manager pr2_controller_manger list-types

Here's the output:

JointGravityController
JointPendulumController
ethercat_trigger_controllers/MultiTriggerController
ethercat_trigger_controllers/ProjectorController
ethercat_trigger_controllers/TriggerController
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_manipulation_controllers/CartesianTrajectoryController
pr2_manipulation_controllers/JTTaskController
pr2_manipulation_controllers/JinvExperimentalController7
pr2_manipulation_controllers/JinvTeleopController7
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/JTCartesianController
robot_mechanism_controllers/JointEffortController
robot_mechanism_controllers/JointPositionController
robot_mechanism_controllers/JointSplineTrajectoryController
robot_mechanism_controllers/JointTrajectoryActionController
robot_mechanism_controllers/JointVelocityController

In short, I don't see the controller that I've made. I checked that roscd is able to get to the my_controller_pkg, and I also updated the plugin macro and descriptor file as described here: http://wiki.ros.org/pluginlib, such that the my_controller_file.cpp has:

PLUGINLIB_EXPORT_CLASS(my_controller_ns::MyControllerClass, pr2_controller_interface::Controller)

and the descriptor file has:

<library path="lib/libmy_controller_lib">
   <class type="my_controller_ns::MyControllerClass"        
          base_class_type="pr2_controller_interface::Controller" />
</library>

Everything else was written exactly as instructed by the tutorial and compiles. I'm wondering what exactly could be wrong, or what am I missing? Thanks in advance!

Other Info:

I am able to see the plugin when using the rospack plugins --attrib=plugin pr2_controller_interface command. Output:

pr2_calibration_controllers /opt/ros/groovy/stacks/pr2_controllers/pr2_calibration_controllers/controller_plugins.xml
pr2_gripper_sensor_controller /opt/ros/groovy/stacks/pr2_object_manipulation/manipulation/pr2_gripper_sensor_controller/controller_plugins.xml
pr2_controller_manager /opt/ros/groovy/stacks/pr2_mechanism/pr2_controller_manager/test/controller_plugin.xml
pr2_mechanism_controllers /opt/ros/groovy/stacks/pr2_controllers/pr2_mechanism_controllers/controller_plugins.xml
pr2_manipulation_controllers /opt/ros/groovy/stacks/pr2_object_manipulation/manipulation/pr2_manipulation_controllers/controller_plugins.xml
ethercat_trigger_controllers /opt/ros/groovy/stacks/pr2_controllers/ethercat_trigger_controllers/controller_plugins.xml
my_controller_pkg /home/mpan/rosbuild_workspace/joint_controller_tutorial/my_controller_pkg/controller_plugins.xml
robot_mechanism_controllers /opt/ros/groovy/stacks/pr2_controllers/robot_mechanism_controllers/controller_plugins.xml
pr2_gazebo_benchmarks /opt/ros/groovy/stacks/pr2_simulator/pr2_gazebo_benchmarks/gazebo_physics_controller_plugins.xml
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-22 10:19:06 -0500

mpan gravatar image

As soon as I posted this question, I immediately answered it. Silly me.

Because I was working on an actual PR2, I had forgotten to claim the robot under my user account...thus, any controllers I had made would not be seen.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-08-21 21:36:19 -0500

Seen: 74 times

Last updated: Aug 22 '14