1、安装robot-upstart,命令如下
sudo apt-get install ros-melodic-robot-upstart
2、安装成功后,直接运行如下指令
rosrun robot_upstart install prometheus_detection/launch/web_cam0.launch
其中prometheus_detection是ros的功能包,launch/web_cam0.launch是运行文件的路径
3 、运行完第2步以后终端会显示如下图所示信息
然后在终端中输入途中框起来的内容,即
sudo systemctl daemon-reload && sudo systemctl start prometheus
到此就配置完成了,简单测试下,在终端输入ps -aux | grep prometheus_detection
amov@siki:~$ ps -aux | grep prometheus_detection
amov 2371 0.2 1.3 1015912 71492 ? Ssl 16:57 0:02 /home/amov/Prometheus/devel/lib/prometheus_detection/web_cam __name:=web_cam __log:=/tmp/e9492566-4e96-11ec-a391-455b058e8f53/web_cam-2.log
amov 2986 0.0 0.0 16188 1096 pts/0 S+ 17:15 0:00 grep --color=auto prometheus_detection
已经可以查到该进程了
4、重启计算机,重启后,打开终端输入rosnode list,如图,自启动完成
5、启动&停止
sudo service pibot start
sudo service pibot stop