如果出现如下图所示的问题:
我们找到设置pid的yaml文件
arm:# 你的机器人名称
joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: 50
joint1_position_controller:
type: position_controllers/JointPositionController
joint: joint1
# pid: {p: 100.0, i: 0.01, d: 10.0}
joint2_position_controller:
type: position_controllers/JointPositionController
joint: joint2
# pid: {p: 100.0, i: 0.01, d: 10.0}
joint3_position_controller:
type: position_controllers/JointPositionController
joint: joint3
# pid: {p: 100.0, i: 0.01, d: 10.0}
joint4_position_controller:
type: position_controllers/JointPositionController
joint: joint4
# pid: {p: 100.0, i: 0.01, d: 10.0}
joint5_position_controller:
type: position_controllers/JointPositionController
joint: joint5
# pid: {p: 100.0, i: 0.01, d: 10.0}
joint6_position_controller:
type: position_controllers/JointPositionController
joint: joint6
# pid: {p: 100.0, i: 0.01, d: 10.0}
finger_joint1_position_controller:
type: position_controllers/JointPositionController
joint: finger_joint1
arm/gazebo_ros_control/pid_gains:
joint1: {p: 100.0, i: 0.01, d: 10.0}
joint2: {p: 100.0, i: 0.01, d: 10.0}
joint3: {p: 100.0, i: 0.01, d: 10.0}
joint4: {p: 100.0, i: 0.01, d: 10.0}
joint5: {p: 100.0, i: 0.01, d: 10.0}
joint6: {p: 100.0, i: 0.01, d: 10.0}
finger_joint1: {p: 100.0, i: 0.01, d: 10.0}
无需将pid设置在每一段中,pid放到最后就可以。