模型无法正常加载:
urdf中gazebo插件是否正常添加
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/</robotNamespace>
</plugin>
</gazebo>
模型显示没有pid参数
![](https://img-blog.csdnimg.cn/img_convert/4d2e32eeb980bf9c8bbd50a6e080f448.png)
ros_controller.yaml添加/gazebo_ros_control项,具体可参考:
模型与地面接触抖动
![](https://img-blog.csdnimg.cn/img_convert/2eb2d5af9dfc763d619c571a6a7483e8.png)
提高仿真中世界坐标的高度,demo_gazebo.launch 及gazebo.launch里均有可以调整x,y,z的项,
<arg name="world_pose" default="-x 0 -y 0 -z 0.780 -R 0 -P 0 -Y 0" doc="Pose to spawn the robot at"/>
思路参考:
关节ID冲突,无法切换控制器
![](https://img-blog.csdnimg.cn/img_convert/525dcff30c2fe1a19b9b08375d6a8022.png)
控制器精简到一个,每个控制器不能重复控制别的关节。
成功使用位置控制器时,发现moveit驱动gazebo到一半就停了
②如果只是为了仿真,在moveit配置时选择FollowJointController即可。
如果urdf中生成的transmission为effortJointInterface,需要切换为PositionJointInterface。
<transmission name="trans_HY_Joint">
<type>transmission_interface/SimpleTransmission</type>
<joint name="HY_Joint">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
</joint>
<actuator name="HY_Joint_motor">
<hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>