PR2: Running a Realtime joint controller problem
hello...
i'm trying to realize the "Runing a Realtime joint controller" tutorial, i did everything how the tutorial said, i think that my probnlem is with the controller name, but in another question @Lorenz tells me that isn't my problem...
what i do was the following:
i opened the gazebo with the PR2 and open the rxconsole, later i wrote:
$ rosparam set my_controller_name/type MyControllerPlugin
$ rosrun pr2_controller_manager pr2_controller_manager list-joints
Waiting for mechanism statistics message...
Actuators:
0 bl_caster_l_wheel_motor
1 bl_caster_r_wheel_motor
2 bl_caster_rotation_motor
3 br_caster_l_wheel_motor
4 br_caster_r_wheel_motor
5 br_caster_rotation_motor
6 fl_caster_l_wheel_motor
7 fl_caster_r_wheel_motor
8 fl_caster_rotation_motor
9 fr_caster_l_wheel_motor
10 fr_caster_r_wheel_motor
11 fr_caster_rotation_motor
12 head_pan_motor
13 head_tilt_motor
14 l_elbow_flex_motor
15 l_forearm_roll_motor
16 l_gripper_motor
17 l_shoulder_lift_motor
18 l_shoulder_pan_motor
19 l_upper_arm_roll_motor
20 l_wrist_l_motor
21 l_wrist_r_motor
22 laser_tilt_mount_motor
23 r_elbow_flex_motor
24 r_forearm_roll_motor
25 r_gripper_motor
26 r_shoulder_lift_motor
27 r_shoulder_pan_motor
28 r_upper_arm_roll_motor
29 r_wrist_l_motor
30 r_wrist_r_motor
31 torso_lift_motor
Joints:
0 fl_caster_rotation_joint
1 fl_caster_l_wheel_joint
2 fl_caster_r_wheel_joint
3 fr_caster_rotation_joint
4 fr_caster_l_wheel_joint
5 fr_caster_r_wheel_joint
6 bl_caster_rotation_joint
7 bl_caster_l_wheel_joint
8 bl_caster_r_wheel_joint
9 br_caster_rotation_joint
10 br_caster_l_wheel_joint
11 br_caster_r_wheel_joint
12 torso_lift_joint
13 torso_lift_motor_screw_joint
14 head_pan_joint
15 head_tilt_joint
16 laser_tilt_mount_joint
17 r_upper_arm_roll_joint
18 r_shoulder_pan_joint
19 r_shoulder_lift_joint
20 r_forearm_roll_joint
21 r_elbow_flex_joint
22 r_wrist_flex_joint
23 r_wrist_roll_joint
24 r_gripper_joint
25 r_gripper_l_finger_joint
26 r_gripper_r_finger_joint
27 r_gripper_r_finger_tip_joint
28 r_gripper_l_finger_tip_joint
29 r_gripper_motor_screw_joint
30 r_gripper_motor_slider_joint
31 l_upper_arm_roll_joint
32 l_shoulder_pan_joint
33 l_shoulder_lift_joint
34 l_forearm_roll_joint
35 l_elbow_flex_joint
36 l_wrist_flex_joint
37 l_wrist_roll_joint
38 l_gripper_joint
39 l_gripper_l_finger_joint
40 l_gripper_r_finger_joint
41 l_gripper_r_finger_tip_joint
42 l_gripper_l_finger_tip_joint
43 l_gripper_motor_screw_joint
44 l_gripper_motor_slider_joint
$ rosparam set my_controller_name/joint_name r_shoulder_pan_joint
$ rosparam get -p my_controller_name
and i obtain :
joint_name: r_shoulder_pan_joint
type: MyControllerPlugin
$ rosrun pr2_controller_manager pr2_controller_manager list
base_controller ( running )
base_odometry ( running )
head_traj_controller ( running )
l_arm_controller ( running )
l_gripper_controller ( running )
laser_tilt_controller ( running )
r_arm_controller ( running )
r_gripper_controller ( running )
torso_controller ( running )
in this case i don't stop any controller (i have to?)
$rosrun pr2_controller_manager pr2_controller_manager list-types
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_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
$rosrun pr2_controller_manager pr2_controller_manager load my_controller_name
and i obtain the first error:
Error when loading my_controller_name
if i continue i obtain the following lines:
$rosrun pr2_controller_manager pr2_controller_manager list
base_controller ( running )
base_odometry ( running )
head_traj_controller ( running )
l_arm_controller ( running )
l_gripper_controller ( running )
laser_tilt_controller ( running )
r_arm_controller ( running )
r_gripper_controller ( running )
torso_controller ( running )
i try to:
$rosparam set my_controller_name/type my_controller_pkg/MyControllerPlugin
but the problem persist.
If anyone could help me i gonna thank you....
the output of
rospack plugins --attrib=plugin pr2_controller_interface
pr2_controller_manager /opt/ros/fuerte/stacks/pr2_mechanism/pr2_controller_manager/test/controller_plugin.xml
pr2_gazebo_benchmarks /opt/ros/fuerte/stacks/pr2_simulator/pr2_gazebo_benchmarks/gazebo_physics_controller_plugins.xml
pr2_mechanism_controllers /opt/ros/fuerte/stacks/pr2_controllers/pr2_mechanism_controllers/controller_plugins.xml
my_controller_pkg /home/jose/ros_pkg_tutorials/my_controller_pkg/controller_plugins.xml
ethercat_trigger_controllers /opt/ros/fuerte/stacks/pr2_controllers/ethercat_trigger_controllers/controller_plugins.xml
pr2_calibration_controllers /opt/ros/fuerte/stacks/pr2_controllers/pr2_calibration_controllers/controller_plugins.xml
robot_mechanism_controllers /opt/ros/fuerte/stacks/pr2_controllers/robot_mechanism_controllers/controller_plugins.xml
this is the contents of the controller_plugin.xml:
<library path="lib/libmy_controller_lib">
<class name="my_controller_pkg/MyControllerPlugin"
type="my_controller_ns::MyControllerClass"
base_class_type="pr2_controller_interface::Controller" />
</library>
well here ...