本人所用的是ubuntu20.04,Noetic
在《ROS机器人开发实践》的P130中
运行如下命令,在rviz中查看安装有摄像头的机器人模型:
$ roslaunch mrobot_description display_mrobot_with_camera.launch
出现:
例如:Failed to build tree: parent link [base_2_link] of joint [camera_joint] not found. 并且小车显示不出来。
解决方案:
在mrobot_with_camera.urdf.xacro 中添加
<xacro:mrobot_body/> 即可
再次运行:
$ roslaunch mrobot_description display_mrobot_with_camera.launch
运行结果正常: