ros

使用ros_control控制joints时,gazebo的模型会不断晃动

在URDF模型中有三个需要控制的non-fixed joint,如下:
    <joint name="pan" type="continuous">
        <parent link="base_link"/>
        <child link="pan_link"/>
        <axis xyz="0 0 1"/>
        <origin xyz="0 0 0.30"/>
        <dynamics damping="0.7" />
    </joint>
 
    <joint name="tilt" type="revolute">
        <parent link="column_slide"/>
        <child link="camcorder_link"/>
        <limit effort="1000.0" lower="-0.5" upper="0.5" velocity="0.5"/>
        <origin rpy="0 0 ${PI/2}"  xyz="0 0 0.65"/>
        <axis xyz="0 1 0"/>
        <dynamics damping="0.7" />
    </joint>
 
    <joint name="lift" type="prismatic">
        <parent link="column"/>
        <child link="column_slide"/>
        <limit effort="1000.0" lower="0" upper="0.5" velocity="0.5"/>
        <origin xyz="0 0 0.05"/>
        <axis xyz="0 0 1"/>
        <dynamics damping="0.7" />
    </joint>
 
它们在yaml文件中的配置如下:
cambot:
  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  
  
  # Position Controllers ---------------------------------------
  pan_position_controller:
    type: effort_controllers/JointPositionController
    joint: pan
    pid: {p: 100.0, i: 0.01, d: 10.0}
  tilt_position_controller:
    type: effort_controllers/JointPositionController
    joint: tilt
    pid: {p: 100.0, i: 0.01, d: 10.0}
  lift_position_controller:
    type: effort_controllers/JointPositionController
    joint: lift
    pid: {p: 100.0, i: 0.01, d: 10.0}
 
我写了一个launch文件用于发布控制器节点:

<?xml version="1.0" encoding="utf-8"?>
<!-- Launch this file to controll the joints connected to cambot. -->
<launch> 
<!-- Load joint controller configurations from YAML file to parameter server -->  
<rosparam file="$(find cambot_description)/config/cambot_control.yaml" command="load"/>  
<!-- load the controllers -->  
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="/cambot" args="joint_state_controller lift_position_controller pan_position_controller tilt_position_controller"/>
<!-- convert joint states to TF transforms for rviz, etc -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
respawn="false" output="screen">
<remap from="/joint_states" to="/cambot/joint_states" />
</node>
</launch>
 
但是当我将模型在gazebo中生成并launch控制器文件后,三个joints对应的位置都会剧烈晃动,请问这应该如何解决?
 
已邀请:

要回复问题请先登录注册