參考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
?