Nishida-Lab / forest_robot_project

9 stars 3 forks source link

wheel hardware interface looks not working well #28

Closed AriYu closed 8 years ago

AriYu commented 8 years ago

I tried rocker_bogie_controller on real robot. I add new fr01_bringup pkg for start up all necessary nodes, plugins and so on. Then, I commanded following

roslaunch fr01_bringup fr01_bringup.launch 

I succeeded to control steering joints. But wheel joints had not moved. I sought ERROR or WARN on screen messages and found following message

........
[ INFO] [1458821773.685239176]: id: 3
[ INFO] [1458821773.686747237]: Registered joint 'wheel_left_front_joint ' in the VelocityJointInterface
[ INFO] [1458821773.686843818]: Registered joint 'wheel_left_middle_joint ' in the VelocityJointInterface
[ INFO] [1458821773.686888245]: Registered joint 'wheel_left_back_joint ' in the VelocityJointInterface
[ INFO] [1458821773.686929655]: Registered joint 'wheel_right_front_joint ' in the VelocityJointInterface
[ INFO] [1458821773.686971095]: Registered joint 'wheel_right_middle_joint ' in the VelocityJointInterface
[ INFO] [1458821773.687012482]: Registered joint 'wheel_right_back_joint ' in the VelocityJointInterface
[ INFO] [1458821773.687055222]: Registered joint 'steer_left_front_joint ' in the PositionJointInterface
[ INFO] [1458821773.687094893]: Registered joint 'steer_left_back_joint ' in the PositionJointInterface
[ INFO] [1458821773.687133019]: Registered joint 'steer_right_front_joint ' in the PositionJointInterface
[ INFO] [1458821773.687175075]: Registered joint 'steer_right_back_joint ' in the PositionJointInterface
[ WARN] [1458821773.687236808]: Replacing previously registered interface 'hardware_interface::JointStateInterface'.
[ INFO] [1458821773.689524046]: joint_name: joint_2
[ INFO] [1458821773.694015663]: min_angle: -200
...........

So, they say Replacing previously registered interface 'hardware_interface::JointStateInterface'.. I don't know why this is caused, but I suspect to need independent controller manager for every joint type. Now, velocity joint interface and position joint interface are into one Robot::HW. Do you have any other ideas about cause of this problem ?

MoriKen254 commented 8 years ago

@AriYu If you are using master or use_diff_drive_controller branch now, forest_robot_project/fr01_control/launch/fr01_sim_control.launch looks wrong.

Specifically, you don't need to spawn steer_hogehoge_position_controllers if rocker_bogie_controller is spawned. They are already spawned in rocker_bogie_controller. That's why the console says something like previously registered or replacing.

    <!-- load the controllers -->
    <node name="controller_spawner" pkg="controller_manager"
        type="spawner" respawn="false"
        output="screen" 
        args="fr01_diff_drive_controller
              joint_state_controller
              steer_right_front_joint_position_controller
              steer_right_back_joint_position_controller
              steer_left_front_joint_position_controller
              steer_left_back_joint_position_controller
              " />

See the launch file below in add_fr01_rocker_bogie_controller https://github.com/Nishida-Lab/forest_robot_project/blob/add_fr01_rocker_bogie_controller/fr01_control/fr01_control/launch/fr01_sim_control.launch

Here is the right one.

    <node name="controller_spawner" pkg="controller_manager"
        type="spawner" respawn="false"
        output="screen" 
        args="fr01_rocker_bogie_controller
        joint_state_controller
        " />

Maybe some configurations under fr01_control directory doesn't seem to inherit ones in add_fr01_rocker_bogie_controller, Please check it out and fix it.

Thanks.

AriYu commented 8 years ago

@MoriKen254 Thank you for your comments.

Sorry, I forgot to notify using branch. The testing branch is fix-fr01control-launch. I already had fixed fr01_sim_control.launch you pointed out.

Thank you.

MoriKen254 commented 8 years ago

@AriYu Ok, excuse me.

Next, didn't you somehow register joint_state_controller twice? Basically, 'hardware_interface::JointStateInterfaceis only used injoint_state_controller` and the console says the one is replaced.

AriYu commented 8 years ago

@MoriKen254 I overlooked hardware_interface::Joint **State** Interface. I will try to rewrite some codes.

Thank you !!