🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
机械臂开机自动调用了gauss-ros-start命令。 1、查看开机启动脚本 gauss-ros-start ```bash gauss@gauss-ros:~$ which gauss-ros-start ​/usr/local/bin/gauss-ros-start gauss@gauss-ros:~$ cat /usr/local/bin/gauss-ros-start ​ #!/bin/bash​ #log info "gauss-ros: Using workspace setup file /home/gauss/Project/gauss_ws/devel/setup.bash" ​ source /home/gauss/Project/gauss_ws/devel/setup.bash​ export ROS_HOSTNAME=$(hostname)​ export ROS_MASTER_URI=http://127.0.1.1:11311​ roslaunch gauss_bringup rpi_setup.launch ``` 2、查看启动脚本gauss-ros-start是否被设置为开机自动 ```bash gauss@gauss-ros:~$ systemctl list-unit-files | grep gauss gauss-ros.service enabled pm2-gauss.service enabled ``` 3、启动脚本的启动和停止 停止开机启动 ```bash gauss@gauss-ros:~$ systemctl disable gauss-ros.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files === Authentication is required to manage system service or unit files. Authenticating as: jeremy,,, (gauss) Password: ==== AUTHENTICATION COMPLETE === Removed symlink /etc/systemd/system/multi-user.target.wants/gauss-ros.service. ==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: jeremy,,, (gauss) Password: ==== AUTHENTICATION COMPLETE === gauss@gauss-ros:~$ systemctl list-unit-files | grep gauss gauss-ros.service disabled pm2-gauss.service enabled ``` 设置开机启动 ```bash gauss@gauss-ros:~$ systemctl enable gauss-ros.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files === Authentication is required to manage system service or unit files. Authenticating as: jeremy,,, (gauss) Password: ==== AUTHENTICATION COMPLETE === Created symlink from /etc/systemd/system/multi-user.target.wants/gauss-ros.service to /lib/systemd/system/gauss-ros.service. ==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon === Authentication is required to reload the systemd state. Authenticating as: jeremy,,, (gauss) Password: ==== AUTHENTICATION COMPLETE === gauss@gauss-ros:~$ systemctl list-unit-files | grep gauss gauss-ros.service enabled pm2-gauss.service enabled ``` 4、kill 掉所有的 ros 节点 ``` rosnode kill -a ``` 5、一键启动机械臂的软件 ``` gauss-ros-start ```