summaryrefslogtreecommitdiff
blob: 8849ecad4f2e4d03a1ca5264be0d0e68e6e99150 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
ROS_REPO_URI="https://github.com/ros/robot_state_publisher"
KEYWORDS="~amd64 ~arm"

inherit ros-catkin

DESCRIPTION="Package for publishing the state of a robot to tf"
LICENSE="BSD"
SLOT="0"
IUSE=""
DATA="joint_states_indexed.bag"
for i in ${DATA}; do
	SRC_URI="${SRC_URI}
		http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=${i} -> ${P}-${i}"
done

RDEPEND="
	dev-ros/kdl_parser
	dev-cpp/eigen:3
	sci-libs/orocos_kdl:=
	dev-ros/roscpp
	dev-ros/rosconsole
	dev-ros/rostime
	dev-ros/tf2_ros
	dev-ros/tf2_kdl
	dev-ros/kdl_conversions
	dev-ros/sensor_msgs
	dev-ros/tf
	dev-ros/urdf
	dev-libs/boost:=
"
DEPEND="${RDEPEND}
	test? (
		dev-cpp/gtest
		dev-ros/rostest[${PYTHON_SINGLE_USEDEP}]
		dev-ros/rosbag[${PYTHON_SINGLE_USEDEP}]
	)
"

src_prepare() {
	ros-catkin_src_prepare
	for i in ${DATA}; do
		cp "${DISTDIR}/${P}-${i}" "${S}/${i}" || die
	done
	sed -e "s#http://wiki.ros.org/robot_state_publisher/data?action=AttachFile&do=get&target=#file://${S}#" -i CMakeLists.txt || die
}

src_test() {
	export ROS_PACKAGE_PATH="${S}:${ROS_PACKAGE_PATH}"
	ros-catkin_src_test
}