diff options
author | Alexis Ballier <aballier@gentoo.org> | 2015-09-22 15:31:50 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2015-09-22 16:36:25 +0200 |
commit | 9cb741106d916dd9fc6941cac21332169739eff2 (patch) | |
tree | ad1262078ab639c7be367a21008adfebff018d9b /dev-ros/roslaunch/files | |
parent | dev-ros/rospy: Install test nodes since tests of other packages need it. (diff) | |
download | gentoo-9cb741106d916dd9fc6941cac21332169739eff2.tar.gz gentoo-9cb741106d916dd9fc6941cac21332169739eff2.tar.bz2 gentoo-9cb741106d916dd9fc6941cac21332169739eff2.zip |
dev-ros/roslaunch: Initial import. Ebuild by me.
Package-Manager: portage-2.2.21
Diffstat (limited to 'dev-ros/roslaunch/files')
-rw-r--r-- | dev-ros/roslaunch/files/40roslaunch | 4 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/roscore.confd | 1 | ||||
-rwxr-xr-x | dev-ros/roslaunch/files/roscore.initd | 25 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/roscore.xml.in | 13 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/roslaunch.confd | 2 | ||||
-rwxr-xr-x | dev-ros/roslaunch/files/roslaunch.initd | 38 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/timeout.patch | 18 |
7 files changed, 101 insertions, 0 deletions
diff --git a/dev-ros/roslaunch/files/40roslaunch b/dev-ros/roslaunch/files/40roslaunch new file mode 100644 index 000000000000..49bb4265eba8 --- /dev/null +++ b/dev-ros/roslaunch/files/40roslaunch @@ -0,0 +1,4 @@ +CATKIN_PREFIX_PATH=/usr +ROS_ROOT=/usr/share/ros +ROS_PACKAGE_PATH=/usr/share +ROS_MASTER_URI="http://localhost:11311/" diff --git a/dev-ros/roslaunch/files/roscore.confd b/dev-ros/roslaunch/files/roscore.confd new file mode 100644 index 000000000000..3c689cd9bd81 --- /dev/null +++ b/dev-ros/roslaunch/files/roscore.confd @@ -0,0 +1 @@ +LC_ALL=C diff --git a/dev-ros/roslaunch/files/roscore.initd b/dev-ros/roslaunch/files/roscore.initd new file mode 100755 index 000000000000..7efd846af88e --- /dev/null +++ b/dev-ros/roslaunch/files/roscore.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + after net +} + +start() { + ebegin "Starting ROS server roscore" + start-stop-daemon --start \ + --user ros --group ros \ + -m --pidfile /var/run/roscore.pid \ + --exec "/usr/bin/roscore" --background + eend $? "Failed to start roscore" +} + +stop() { + ebegin "Stopping roscore" + start-stop-daemon --stop \ + --pidfile /var/run/roscore.pid \ + --exec "/usr/bin/roscore" + eend $? "Failed to stop roscore" +} diff --git a/dev-ros/roslaunch/files/roscore.xml.in b/dev-ros/roslaunch/files/roscore.xml.in new file mode 100644 index 000000000000..1730d4259781 --- /dev/null +++ b/dev-ros/roslaunch/files/roscore.xml.in @@ -0,0 +1,13 @@ +<!-- + ROS Core Stack definition + + Before making any modifications to this file, please read: + http://ros.org/wiki/roscore + --> +<launch> + <group ns="/"> + <param name="rosversion" value="@PKG_VERSION@" /> + <param name="rosdistro" value="Gentoo" /> + <node pkg="rosout" type="rosout" name="rosout" respawn="true"/> + </group> +</launch> diff --git a/dev-ros/roslaunch/files/roslaunch.confd b/dev-ros/roslaunch/files/roslaunch.confd new file mode 100644 index 000000000000..4d7bd633546b --- /dev/null +++ b/dev-ros/roslaunch/files/roslaunch.confd @@ -0,0 +1,2 @@ +LC_ALL=C +ROSLAUNCH_FILE="/etc/ros/ros.launch" diff --git a/dev-ros/roslaunch/files/roslaunch.initd b/dev-ros/roslaunch/files/roslaunch.initd new file mode 100755 index 000000000000..3a15bbc5ad08 --- /dev/null +++ b/dev-ros/roslaunch/files/roslaunch.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need roscore +} + +checkconfig() { + [ -f "${ROSLAUNCH_FILE}" ] + eend $? "You need to define ROSLAUNCH_FILE and point it to a correct location (${ROSLAUNCH_FILE} does not exist)" +} + +start() { + checkconfig || exit 1 + ebegin "Waiting for roscore" + + val=${ROS_MASTER_URI#http://} + dest=$(echo ${val%/} | tr ':' ' ') + while ! echo exit | nc ${dest} &> /dev/null; do sleep 1; done + + ebegin "Starting ROS via roslaunch" + start-stop-daemon --start \ + --user ros --group ros \ + -m --pidfile /var/run/roslaunch.pid \ + --exec "/usr/bin/roslaunch" --background \ + -- ${ROSLAUNCH_FILE} + eend $? "Failed to start ROS" +} + +stop() { + ebegin "Stopping roslaunch" + start-stop-daemon --stop \ + --pidfile /var/run/roslaunch.pid \ + --exec "/usr/bin/roslaunch" + eend $? "Failed to stop roslaunch" +} diff --git a/dev-ros/roslaunch/files/timeout.patch b/dev-ros/roslaunch/files/timeout.patch new file mode 100644 index 000000000000..169b12813c70 --- /dev/null +++ b/dev-ros/roslaunch/files/timeout.patch @@ -0,0 +1,18 @@ +Slow HW like the raspberry pi easily hit this timeout over NFS. +Increase it to 1 min. + +diff --git a/tools/roslaunch/src/roslaunch/launch.py b/tools/roslaunch/src/roslaunch/launch.py +index 9a3b931..8e33c0c 100644 +--- a/tools/roslaunch/src/roslaunch/launch.py ++++ b/tools/roslaunch/src/roslaunch/launch.py +@@ -57,8 +57,8 @@ from roslaunch.pmon import start_process_monitor, ProcessListener + + from roslaunch.rlutil import update_terminal_name + +-_TIMEOUT_MASTER_START = 10.0 #seconds +-_TIMEOUT_MASTER_STOP = 10.0 #seconds ++_TIMEOUT_MASTER_START = 60.0 #seconds ++_TIMEOUT_MASTER_STOP = 60.0 #seconds + + _ID = '/roslaunch' + |