RLException: [display_mrobot_with_camera.launch] is neither a launch file等一系列错误解决办法

前提:运行$ 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.bashexport ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/catkin_ws/
3.在终端运行source ~/.bashrc
4.在终端运行echo $ROS_PACKAGE_PATH 可以在屏幕上看到你添加的路径
结果:可以打开但是显示如下RLException: [display_mrobot_with_camera.launch] is neither a launch file等一系列错误解决办法_第1张图片
错误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)

解决:

  1. 将mrobot_description功能包下launch文件夹中display_mrobot_chassis_urdf.launch这个文件里面的运行robot_state_publisher节点下的type由type="state_publisher"改为type=“robot_state_publisher”
  2. 进入rviz后将Fixed Frame的map改为base_link
  3. 点击Add,找到RobotModel,选择添加

结果:终端没错误,rviz没错误,能正常显示
RLException: [display_mrobot_with_camera.launch] is neither a launch file等一系列错误解决办法_第2张图片

你可能感兴趣的:(人工智能)