在ubuntu中用C语言程序控制bash脚本启动时出现“bash:rostopic command not found”
ROS相关命令所需的解释器都在/opt/ros/melodic/setup.bash里,记得在bash脚本中添加source命令,否则可能会出现"bash:rostopic command not found"的错误,同理,也可能出现“bash:roscore command not found”
例如我编写的:
gnome-terminal -t "namecustomer" -x bash -c "source /opt/ros/melodic/setup.bash;rostopic list;ro
原创
2022-04-08 09:49:10 ·
2791 阅读 ·
0 评论