roslaunch turtlebot_rviz_launchers view_navigation.launch --screen
[view_navigation.launch] is neither a launch file in package [turtlebot_rviz_launchers] nor is [turtlebot_rviz_launchers] a launch file name
The traceback for the exception was written to the log file
解决:
cd turtlebot
source devel/setuo.bash
这个方法不能彻底解决,有时候需要source两次或更多。
稳定解决方法:
编辑
/home/isi/turtlebot/src/turtlebot_interactions/turtlebot_rviz_launchers/launch/view_navigation.launch
内容如下:
<!--
Used for visualising the turtlebot while building a map or navigating with the ros navistack.
-->
<launch>
<node name="rviz" pkg="rviz" type="rviz" respawn="true" args="-d $(find turtlebot_rviz_launchers)/rviz/navigation.rviz"/>
</launch>
然后如果出现启动失败,打开新终端单独运行:
roslaunch turtlebot_rviz_launchers view_navigation.launch
说明:
respawn="true"
在一个launch文件中的节点,
1.要求重生(request respawning)
开启所有nodes后,roslaunch会监视每个node,记录那些仍然活动的nodes。对于每个node,当其终止后,我们可以要求roslaunch重启该node,通过使用respawn属性。
respawn=”true”
2.必需的nodes
required属性与respawn相反,不能同时对同一个node使用。
required=”true”
当一个required node终止后,所有其他的nodes都会终止,并退出。这种命令有时很有用。比如,当一个很重要的node失败后,整个会话都会被扔掉,那些加上了respawn属性的nodes也会停止。