gazebo加载插件后无法发布出主题
·
解决思路
1、例如 下面是一个模型文件libhector_gazebo_ros_gps.so 是一个gazebo插件,但是加载后没有任何主题发布。
<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com)
Commit Version: 1.6.0-1-g15f4949 Build Version: 1.6.7594.29634
For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
name="hunter2_base">
<link
---省略
<gazebo>
<plugin name="gps" filename="libhector_gazebo_ros_gps.so">
<updateRate>10.0</updateRate>
<topicName>ackerman/gpsfix</topicName>
<gaussianNoise>0.0 0.0 0.0</gaussianNoise>
<offset>0 0 0</offset>
<velocityGaussianNoise>0 0 0</velocityGaussianNoise>
<frameId>hunter_base_link</frameId>
</plugin>
</gazebo>
</robot>
2、解决办法
2.1 下载libhector_gazebo_ros_gps.so 的ros功能包。
在catkin_ws/src 下下载功能包
git clone https://github.com/tu-darmstadt-ros-pkg/hector_gazebo.git
2.2 catkin_make 此工作空间
2.3 在catkin_ws/devel/lib 下找到此功能包。
2.4 将libhector_gazebo_ros_gps.so文件拷贝到
/opt/ros/melodic/lib
sudo cp libhector_gazebo_ros_gps.so /opt/ros/melodic/lib
2.5 完成。
更多推荐

所有评论(0)