xiaoqiang tutorial (2) Bluewhale Robot Open source code repository usage and ROS startup task configuration
Some of Xiaoqiang's software source code is shared with Bluewhale Robot's open source code repository，Anybody can freely download or use it for futher development.
For Xiaoqiang users, the software in the open source Code repository can be directly git cloned into Xiaoqiang's ROS working directory, and then can be compiled and used directly with ROS's
catkin_make. Xiaoqiang's ROS working directory is:
The following will use the startup package in the open source repository as an example to demonstrate the complete use of the open source repository
After the Xiaoqiang host starts up, it will automatically start the Linux service script named startup. When the service script runs, it will start the replica which is registered in ubuntu system by
startup.launch file. Therefore, by modifying the
startup.launch file in the startup package, and then registering this file as a startup service in the ubuntu system, we can control the booting tasks of the Xiaoqiang host.
a. In the local remote control terminal ssh connection Xiaoqiang host, refer to the configuration of the previous tutorial
b. Enter Xiaoqiang's ROS working directory to see if there is a startup folder
cd Documents/ros/src/ ls
If it exists, it indicates that the startup package has been installed. You can directly perform the following third step. If you want to update the startup package synchronously with the open source repository, enter the following command:
cd startup git stash git pull cd ..
Using the vscode editor installed in the previous tutorial, Edit this file directly on the local machine（If you need to remotely access Xiaoqiang's host file directory, please refer to the previous basic operation tutorial to configure.）
In the arrow area above, add or delete the ROS launch file and ROS node that you need to launch. These items will be added to the boot of the Xiaoqiang host in the following. Xiaoqiang will automatically run these items when booted next time. Finally, save and exit.
Please continue to enter in the ssh window in the second section above.
a. First stop and delete the previously registered startup service
sudo service startup stop rosrun robot_upstart uninstall startup
b. Re-register startup service
rosrun robot_upstart install startup/launch/startup.launch sudo systemctl daemon-reload && sudo systemctl start startup
Then enter the ssh window above
a. Send a reboot command
sudo shutdown -r now
b. Start a new ssh connection
c. Check the status of the startup service
sudo service startup status
Normally, it will show startup start/running as shown in the figure below.
d. You can also further see if the related topic has been published