1. Install package, default is Indigo version
sudo apt-get install Ros-indigo-robot-upstart
2. I believe you have installed a lot of ROS package, I do not have a new package here, using the Turtlebot_navigation
Create a file in the Turtlebot_navigation/launch directory Start.launch
Start.launch
<launch>
<!--kobuki-->
<include file= "$ (find Turtlebot_bringup)/launch/ Minimal.launch "/>
<include file=" $ (find turtlebot_navigation)/launch/hokuyo_gmapping_demo.launch "/>
</launch>
3. Execute Install Command
Rosrun Robot_upstart Install Turtlebot_navigation/launch/start.launch
command to create a new folder under/etc/ros/indigo/turtlebot.d, copy Start.launch to the inside, and execute. ‘
If you want to modify start.launch in the future, to/etc/ros/indigo/this directory, if the Turtlebot_navigation/launch under the modification is not used
4. Open/Close Service
$sudo service Turtlebot start
[sudo] password for ubuntu:
turtlebot start/running, Process 12335
$ sudo service turtlebot stop
Turtlebot stop/waiting
As can be seen from the command, Ros Robot_upstart the startup script as a system service, similar to Samba,udev,network.
Remember when we adapted the Hokuyo laser, modified the serial port properties, so that the command to be effective is also
sudo service udev restart
Note: The name of the service here should be Turtlebot_navigation "_" before the part
If the package is Robot_autoup then the service name created is robot, the corresponding folder name is ROBOT.D
5. View Log
sudo tail-f/var/log/upstart/turtlebot.log
Log at startup and log of nodes running in this area
Analysis of 6.robot_upstart install startup command parameters
Usage:install [-h] [--job job] [--interface ethn] [--user NAME]
[--setup path/to/setup.bash] [--rosdistro DISTRO]
[--master http://MASTER:11311] [--logdir path/to/logs]
[--augment] [--provider [UPSTART|SYSTEMD]] [--symlink]
Pkg/path [Pkg/path ...]
--job Specify the Job (service) name, and if not, use a portion of the package
--interface Specify the network interface
--user Specify user startup launch script
--setup Specifies the use of Setup.bash documents under special projects.
--rosdistro Specify the release version of Ros
--master Specify Ros_master_uri
--logdir Specify the log file directory
-- Augment=false does not create a job, it simply copies user files. The default job has created the package and path name of the successful Pkg/path installation job launch, keeping the path beginning with the package name (not using the absolute or Workspace top path)
--provider Specifies that provider
--symlink=false create soft links rather than copy startup scripts when the correct provider cannot be automatically detected.