summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-09-22 15:31:50 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-09-22 16:36:25 +0200
commit9cb741106d916dd9fc6941cac21332169739eff2 (patch)
treead1262078ab639c7be367a21008adfebff018d9b
parentdev-ros/rospy: Install test nodes since tests of other packages need it. (diff)
downloadgentoo-9cb741106d916dd9fc6941cac21332169739eff2.tar.gz
gentoo-9cb741106d916dd9fc6941cac21332169739eff2.tar.bz2
gentoo-9cb741106d916dd9fc6941cac21332169739eff2.zip
dev-ros/roslaunch: Initial import. Ebuild by me.
Package-Manager: portage-2.2.21
-rw-r--r--dev-ros/roslaunch/Manifest1
-rw-r--r--dev-ros/roslaunch/files/40roslaunch4
-rw-r--r--dev-ros/roslaunch/files/roscore.confd1
-rwxr-xr-xdev-ros/roslaunch/files/roscore.initd25
-rw-r--r--dev-ros/roslaunch/files/roscore.xml.in13
-rw-r--r--dev-ros/roslaunch/files/roslaunch.confd2
-rwxr-xr-xdev-ros/roslaunch/files/roslaunch.initd38
-rw-r--r--dev-ros/roslaunch/files/timeout.patch18
-rw-r--r--dev-ros/roslaunch/metadata.xml5
-rw-r--r--dev-ros/roslaunch/roslaunch-1.11.14.ebuild60
-rw-r--r--dev-ros/roslaunch/roslaunch-9999.ebuild60
11 files changed, 227 insertions, 0 deletions
diff --git a/dev-ros/roslaunch/Manifest b/dev-ros/roslaunch/Manifest
new file mode 100644
index 000000000000..84bda7639707
--- /dev/null
+++ b/dev-ros/roslaunch/Manifest
@@ -0,0 +1 @@
+DIST ros_comm-1.11.14.tar.gz 945041 SHA256 8e7beff35711b1918501c69cca4f29648d4d4207878edab069bcd59d515c78f3 SHA512 be768faa0a2f45c464e963934a95dc617cac6c3fcec2388602a27846774c25b882b5139099ce10d1d051a21d5938819942e079836d14618071bc7ad90ee78bab WHIRLPOOL e047ce984086655294c20dbf0715cc29f51ec358f075f02de80c5de0d4ef8059990dc8312d78d7a7fa91c4a974dc21cba15d6eacafe02fd3df527770e50f75a5
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'
+
diff --git a/dev-ros/roslaunch/metadata.xml b/dev-ros/roslaunch/metadata.xml
new file mode 100644
index 000000000000..c42ea5b15cf6
--- /dev/null
+++ b/dev-ros/roslaunch/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ros</herd>
+</pkgmetadata>
diff --git a/dev-ros/roslaunch/roslaunch-1.11.14.ebuild b/dev-ros/roslaunch/roslaunch-1.11.14.ebuild
new file mode 100644
index 000000000000..a7e99135f6b8
--- /dev/null
+++ b/dev-ros/roslaunch/roslaunch-1.11.14.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+ROS_REPO_URI="https://github.com/ros/ros_comm"
+KEYWORDS="~amd64 ~arm"
+ROS_SUBDIR=tools/${PN}
+PYTHON_COMPAT=( python2_7 )
+
+inherit ros-catkin user
+
+DESCRIPTION="Tool for easily launching multiple ROS nodes"
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ dev-ros/roslib[${PYTHON_USEDEP}]
+ dev-python/rospkg[${PYTHON_USEDEP}]
+ dev-ros/rosclean[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-ros/rosgraph_msgs[${CATKIN_MESSAGES_PYTHON_USEDEP}]
+ dev-ros/rosparam[${PYTHON_USEDEP}]
+ dev-ros/rosmaster[${PYTHON_USEDEP}]
+ dev-ros/rosout
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-util/rosdep[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-ros/test_rosmaster
+ )"
+PATCHES=( "${FILESDIR}/timeout.patch" )
+
+src_test() {
+ rosdep update
+ ros-catkin_src_test
+}
+
+src_install() {
+ ros-catkin_src_install
+
+ dodir /etc/ros
+ sed -e "s/@PKG_VERSION@/${PV}/" "${FILESDIR}/roscore.xml.in" > "${ED}/etc/ros/roscore.xml" || die
+
+ newinitd "${FILESDIR}/roscore.initd" roscore
+ newconfd "${FILESDIR}/roscore.confd" roscore
+
+ newinitd "${FILESDIR}/roslaunch.initd" roslaunch
+ newconfd "${FILESDIR}/roslaunch.confd" roslaunch
+
+ doenvd "${FILESDIR}/40roslaunch"
+}
+
+pkg_preinst() {
+ enewgroup ros
+ enewuser ros -1 -1 /home/ros ros
+}
diff --git a/dev-ros/roslaunch/roslaunch-9999.ebuild b/dev-ros/roslaunch/roslaunch-9999.ebuild
new file mode 100644
index 000000000000..a7e99135f6b8
--- /dev/null
+++ b/dev-ros/roslaunch/roslaunch-9999.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+ROS_REPO_URI="https://github.com/ros/ros_comm"
+KEYWORDS="~amd64 ~arm"
+ROS_SUBDIR=tools/${PN}
+PYTHON_COMPAT=( python2_7 )
+
+inherit ros-catkin user
+
+DESCRIPTION="Tool for easily launching multiple ROS nodes"
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+
+RDEPEND="
+ dev-ros/roslib[${PYTHON_USEDEP}]
+ dev-python/rospkg[${PYTHON_USEDEP}]
+ dev-ros/rosclean[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-ros/rosgraph_msgs[${CATKIN_MESSAGES_PYTHON_USEDEP}]
+ dev-ros/rosparam[${PYTHON_USEDEP}]
+ dev-ros/rosmaster[${PYTHON_USEDEP}]
+ dev-ros/rosout
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-util/rosdep[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-ros/test_rosmaster
+ )"
+PATCHES=( "${FILESDIR}/timeout.patch" )
+
+src_test() {
+ rosdep update
+ ros-catkin_src_test
+}
+
+src_install() {
+ ros-catkin_src_install
+
+ dodir /etc/ros
+ sed -e "s/@PKG_VERSION@/${PV}/" "${FILESDIR}/roscore.xml.in" > "${ED}/etc/ros/roscore.xml" || die
+
+ newinitd "${FILESDIR}/roscore.initd" roscore
+ newconfd "${FILESDIR}/roscore.confd" roscore
+
+ newinitd "${FILESDIR}/roslaunch.initd" roslaunch
+ newconfd "${FILESDIR}/roslaunch.confd" roslaunch
+
+ doenvd "${FILESDIR}/40roslaunch"
+}
+
+pkg_preinst() {
+ enewgroup ros
+ enewuser ros -1 -1 /home/ros ros
+}