前提:运行$ roslaunch mrobot_description display_mrobot_chassis_urdf.launch
有误
错误1:rviz直接打不开
错误显示:
RLException: [display_mrobot_with_camera.launch] is neither a launch file in package [mrobot_description] nor is [mrobot_description] a launch file name The traceback for the exception was written to the log file
🎄解决:
1.在终端先运行sudo gedit ~/.bashrc
2.然后在打开的文档最后添加source ~/catkin_ws/devel/setup.bash
和export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/catkin_ws/
3.在终端运行source ~/.bashrc
4.在终端运行echo $ROS_PACKAGE_PATH
可以在屏幕上看到你添加的路径
🎄结果:可以打开但是显示如下
错误2:rviz中global status显示红色错误并在终端有错误提示
错误显示:
ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: Cannot locate node of type [state_publisher] in package [robot_state_publisher]. Make sure file exists in package path and permission is set to executable (chmod +x)
🎄解决:
- 将mrobot_description功能包下launch文件夹中display_mrobot_chassis_urdf.launch这个文件里面的运行robot_state_publisher节点下的type由
type="state_publisher"
改为type=“robot_state_publisher”
- 进入rviz后将Fixed Frame的map改为base_link
- 点击Add,找到RobotModel,选择添加
🎄结果:终端没错误,rviz没错误,能正常显示
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)