1.安装package,默认是indigo版本

sudo apt-get install ros-indigo-robot-upstart

2.执行install命令

根据自己实际工程souce下

root@RK3399:/mnt# source devel_isolated/setup.bash

安装launch

rosrun robot_upstart install cartographer_turtlebot/launch/kinco_start.launch --job kinco --logdir /root/.ros/log

cartographer_turtlebot是工程包名,kinco_start.launch是需要自动启动的launch,--job指定别名,--logdir指定log保存地址。

rosrun robot_upstart install 命令帮助

root@RK3399:/mnt# rosrun robot_upstart install -h
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 ...]Use this tool to quickly and easily create system startup jobs which run one
or more ROS launch files as a daemonized background process on your computer.
More advanced users will prefer to access the Python API from their own setup
scripts, but this exists as a simple helper, an example, and a compatibility
shim for previous versions of robot_upstart which were bash-based.positional arguments:pkg/path              Package and path to install job launch files from.Make sure the path starts with the package name (e.g.don't pass absolute path nor a path starting fromworkspace top folder etc.)optional arguments:-h, --help            show this help message and exit--job JOB             Specify job name. If unspecified, will be constructedfrom package name.--interface ethN      Specify network interface name to associate job with.--user NAME           Specify user to launch job as.--setup path/to/setup.bashSpecify workspace setup file for the job launchcontext.--rosdistro DISTRO    Specify ROS distro this is for.--master http://MASTER:11311Specify an alternative ROS_MASTER_URI for the joblaunch context.--logdir path/to/logsSpecify an a value for ROS_LOG_DIR in the job launchcontext.--augment             Bypass creating the job, and only copy user files.Assumes the job was previously created.--provider [upstart|systemd]Specify provider if the autodetect fails to identifythe correct provider--symlink             Create symbolic link to job launch files instead ofcopying them.

运行安装后

root@RK3399:/mnt# rosrun robot_upstart install cartographer_turtlebot/launch/kinco_start.launch --job kinco --logdir /root/.ros/log
/lib/systemd/systemd
Preparing to install files to the following paths:/etc/ros/kinetic/kinco.d/.installed_files/etc/ros/kinetic/kinco.d/kinco_start.launch/etc/systemd/system/multi-user.target.wants/kinco.service/lib/systemd/system/kinco.service/usr/sbin/kinco-start/usr/sbin/kinco-stop
Now calling: /usr/bin/sudo /opt/ros/kinetic/lib/robot_upstart/mutate_files
Filesystem operation succeeded.
** To complete installation please run the following command:sudo systemctl daemon-reload && sudo systemctl start kinco

3.添加systemd需要的环境变量

查看变量位置 /lib/systemd/system/kinco.service。次文件在upstart安装后会自动改变,需要安装ros launch后再修改此文件的环境变量

root@RK3399:~# systemctl status kinco
* kinco.service - "bringup kinco"Loaded: loaded (/lib/systemd/system/kinco.service; enabled; vendor preset: enabled)Active: active (running) since Fri 2016-02-12 00:28:01 CST; 2 years 7 months agoMain PID: 521 (kinco-start)

根据自己工程的实际情况修改环境变量

# THIS IS A GENERATED FILE, NOT RECOMMENDED TO EDIT.[Unit]
Description="bringup kinco"
After=network.target[Service]
Type=simple
Environment="HOME=/root"
EnvironmentFile=-/mnt/src/config/param/environ.kinco
ExecStart=/usr/sbin/kinco-start[Install]
WantedBy=multi-user.target

4.启动launch,以后开机会自动开启

root@RK3399:/mnt# systemctl daemon-reload
root@RK3399:/mnt# service kinco start

开机自动启动ros节点--robot_upstart相关推荐

  1. ROS节点开机自启动

    在开发ROS项目中我们常常想实现电脑开机以后自动运行一些节点,这里就涉及到了Ubuntu中的一些开机自启动问题,ROS节点的启动与其他脚本的自动运行不一样,不能只写使用rc.local的方式写入,这是 ...

  2. linux开机启动roscore,树莓派ubuntuMate系统中开机自启动ROS的launch文件

    0x00 为何需要开机自启动launch文件 在ROS开发后期阶段由于功能已经趋于稳定,因此就需要系统在一上电启动后就自动把ROS下的各节点程序加载运行,这样就省去了我们还得手动输入roslaunch ...

  3. 使用robot-upstart开机自启动ROS程序

    使用robot-upstart开机自启动ROS程序 1.环境 2.说明 3.安装robot-upstart 4.编写launch文件 5.添加自启动任务 6.upstart问题及其他事项 6.1 自启 ...

  4. MFC小笔记:开机自动启动

    一.需求 本文实现MFC程序的开机自动启动功能. 二.设计 开机自动启动,可以通过注册表实现.在Run节点下,新建一个字段,包括程序名称.完整的路径.如果要取消自动启动,则删除该字段即可. 三.编码 ...

  5. C#.NET Form设置/取消开机自动运行,判断程序是否已经设置成开机自动启动(转载)...

    #region//开机自动运行         private void CB_Auto_CheckedChanged(object sender, EventArgs e)         {//C ...

  6. [WinForm]写一个小程序把指定目录的程序添加到开机自动启动(无法绕过360检查)

    网友阿东提示了这样一个需求:写一个小程序把指定目录的程序添加到开机自动启动,跳过360 我就到百度上搜了一下:C# 将程序添加到启动项 (写入注册表),及从启动项中删除 - 赤狐(zcm123) - ...

  7. Udacity机器人软件工程师课程笔记(十二)-ROS-编写更复杂的ROS节点(arm_mover节点 和 look_away 节点)

    更复杂的ROS节点 1. Arm_mover节点 为了打好更好的基础,这是在Arm_mover节点还需要学习的内容 自定义消息生成 服务 参数 启动文件 为了理解上述内容,我们将编写另一个名为arm_ ...

  8. Udacity机器人软件工程师课程笔记(十一)-ROS-编写ROS节点

    编写ROS节点 1.ROS节点概述 simple_mover 只发布关节角度命令 simple_arm . 在了解用Python编写的ROS节点的一般结构之后,现在要编写另一个名为 arm_mover ...

  9. 设置Nginx开机自动启动(centos6.8上亲测可用)

    vim /etc/init.d/nginx 粘贴 #!/bin/bash # nginx Startup script for the Nginx HTTP Server # it is v.0.0. ...

最新文章

  1. 码农技术炒股之路——配置管理器、日志管理器
  2. Python 的and 运算
  3. 常见的linux命令及其翻译
  4. libspark,不懂日文怎么学……
  5. D - 最长公共子序列问题-详细过程
  6. 1. 第一个lavarel 项目
  7. Julia : 关于类型的匹配和规范建议
  8. RTKLIB_E.4GNSS卫星星历表和时钟
  9. 移动产品原型和线框图设计工具介绍
  10. Caffe windows下安装攻略
  11. Python中的运算符与表达式 1
  12. iOS 蓝牙扫描枪扫描内容不正确
  13. Java百分比格式化
  14. 实验十五 Java Swing 图形用户界面程序设计应用
  15. 热天的阅读日志,真的好热
  16. 服务器上如何查看日志记录
  17. 四、字符编码:ascii、gbk、Unicode、utf-8
  18. armbian linux装AdGuard Home 广告拦截反追踪
  19. 支持DISTINCT的通用分页存储过程(SQL2005)
  20. Centos8修改源并更新

热门文章

  1. 扫描仪 php,紫光扫描仪
  2. CentOS 7 安装 Percona XtraDB Cluster 5.7
  3. 小白玩机器学习(6)--- 基于Tensorflow.js的在线手写数字识别
  4. 跑revit计算机硬件要求,BIM软件——Revit对电脑配置的要求分析
  5. WordPress主题 wpdx 响应式CMS/Blog 开源无限制版本含用户中心主题[v3.5版]
  6. python读取多列csv文件_多列上的csvjoin
  7. OK1028A-C适配RTL8822CE wifi模块
  8. 驱动音乐律动(全局)
  9. 咸鱼崩了上热搜,网友喊话程序员回来加班
  10. 纳斯达克支持XRP流动性指数XRPLX,XRP半小时涨超3%,突破0.3美元