Skip to content
Snippets Groups Projects
Commit 69807fe6 authored by Esteve Fernandez's avatar Esteve Fernandez Committed by Esteve Fernandez
Browse files

roslaunch: add systemd unit files (resolves #224)

parent 821427d2
No related branches found
No related tags found
No related merge requests found
ROS_ROOT=/usr
ROS_PORT=11311
ROS_MASTER_URI=http://localhost:$ROS_PORT
CMAKE_PREFIX_PATH=$ROS_ROOT
[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 \
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment