roslaunch: add systemd unit files (resolves #224)
This commit is contained in:
parent
821427d23a
commit
69807fe6aa
|
@ -0,0 +1,4 @@
|
|||
ROS_ROOT=/usr
|
||||
ROS_PORT=11311
|
||||
ROS_MASTER_URI=http://localhost:$ROS_PORT
|
||||
CMAKE_PREFIX_PATH=$ROS_ROOT
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Launcher for the ROS master, parameter server and rosout logging node
|
||||
After=network.target ros-set-cmake-prefix
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/default/roscore
|
||||
ExecStartPre=/bin/touch ${CMAKE_PREFIX_PATH}/.catkin
|
||||
ExecStart=/usr/bin/roscore -p $ROS_PORT
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -4,9 +4,14 @@ SECTION = "devel"
|
|||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://package.xml;beginline=16;endline=16;md5=d566ef916e9dedc494f5f793a6690ba5"
|
||||
|
||||
PR = "r1"
|
||||
|
||||
require ros-comm.inc
|
||||
|
||||
SRC_URI += "file://0001-increase-rosmaster-timeout.patch"
|
||||
SRC_URI += "file://0001-increase-rosmaster-timeout.patch \
|
||||
file://roscore.service \
|
||||
file://roscore-default \
|
||||
"
|
||||
|
||||
ROS_PKG_SUBDIR = "tools"
|
||||
|
||||
|
@ -27,3 +32,24 @@ RDEPENDS_${PN} = "\
|
|||
rosout \
|
||||
rosparam \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}/${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/roscore-default ${D}/${sysconfdir}/default/roscore
|
||||
|
||||
# Install systemd unit file
|
||||
install -d ${D}${systemd_unitdir}/system/
|
||||
install -m 0644 ${WORKDIR}/roscore.service ${D}${systemd_unitdir}/system/roscore.service
|
||||
}
|
||||
|
||||
FILES_${PN}-systemd += "${sysconfdir}/default/roscore \
|
||||
"
|
||||
|
||||
CONFFILES_${PN}-systemd += "${sysconfdir}/default/roscore \
|
||||
"
|
||||
|
||||
inherit systemd
|
||||
PACKAGES += "${PN}-systemd"
|
||||
SYSTEMD_PACKAGES = "${PN}-systemd"
|
||||
SYSTEMD_SERVICE = "roscore.service \
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue