Ubuntu14.04
A lot of information on the internet says that adding a script to the/etc/rc.local is completely useless after the experiment. The system version may be incorrect.
Solve:
Ubuntu14.04 Boot Item Command: gnome-session-properties
Click "Add"
Name: Names
Command: Commands, Eg:gnome-terminal-x your_command.sh
Note: The permissions of the SH file must be operational and the path is an absolute path.
sudo chmod +x your_command.sh
Comment: Notes
Exit, reboot.
Script File start.sh
#! /bin/bash
source/opt/ros/indigo/setup.sh
source/home/server/catkin_ws/devel/setup.bash
roslaunch/ Home/server/catkin_ws/src/nodelet_tutorial_math/launch/plus.launch
After the boot, the results have been automatically run.
Firefly
The final product we can not use a computer as a processor, so we need to have a development board, we are using Firefly rk3288. The system is Ubuntu14.04. Because the system is a colleague, the details are not clear. In Firefly, there is no gnome-session-properties this command, which means that the previous method is not available. It's time for Robot_upstart to play.
http://docs.ros.org/jade/api/robot_upstart/html/index.html#
Installation: sudo apt-get install Ros-indigo-robot-upstart
Install command: The launch file to start, the default name is "Myrobot", or you can use –job to specify the work name, which is the project name (the part before the underscore) by default.
Start command:
$ sudo service nodelet start
After shutdown restart, at this time, our terminal will not automatically start, but the ROS node has been activated, open the terminal, verify the execution
$rosnode List
$rostopic list
As you can see, the ROS node is already running.
Stop command:
sudo service Nodelet stop
Uninstall command:
Rosrun Robot_upstart Uninstall Nodelet
This will be canceled from the start. The big pit of the encounter
Our board needs to take a lot of equipment, such as base, camera, Arduino and so on. The USB port on the board interface is obviously not enough. In addition, the serial port identification, equipment identification and so on is very unstable. So it is most important for these devices to be stably identified when the board is powered on. No good solutions have been found at the moment, and then updated later.
2016-12-30 Update
Before about the device interface and the serial port is not recognized to solve the problem, say the solution to the idea. You can create a new node, use launch to start, and set this launch to start from. This node will run when the power is powered on. In this node, for a period of time, call the C + + system function to execute the Linux command and start the launch that contains the camera and other devices.
System ("Roslaunch pkg xxx.launch")
In short, the system after the identification of the device interface, and then to start our launch, we can guarantee that there will be no serial or equipment problems.