参考ROS2-rviz2显示模型
我这边用的solid works生成的urdf以及meshes,比参考的方法多了meshes
问题一:Error retrieving file [package://rm_dcr_description/meshes/leftarm_link7.STL]: Package [rm_dcr_description] does not exist
这个是urdf模型中包含的meshes路径不对,要改成当前功能包的名字,参考的博客功能包名为myrobot;我的功能包较dualrobot,修改.urdf文件中:
并把meshes文件夹放到功能包文件夹下,与urdf包同层级
问题二:Error retrieving file [file:///home/jtl/rviz_demo/install/dualrobot/share/dualrobot/meshes/leftarm_link6.STL]: Couldn't open file /home/jtl/rviz_demo/install/dualrobot/share/dualrobot/meshes/leftarm_link6.STL
在CMakeList.txt中的install中,添加meshes,整体是
RVIZ2中还不显示模型的话
Fixed Frame改成base link,然后description topic得监听robot description