summaryrefslogtreecommitdiff
blob: 73c327abe9436116e62658307372970cb144e229 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
ROS_REPO_URI="https://github.com/ros-planning/navigation"
ROS_SUBDIR=${PN}
KEYWORDS="~amd64 ~arm"
CATKIN_HAS_MESSAGES=yes
CATKIN_MESSAGES_TRANSITIVE_DEPS="dev-ros/std_msgs dev-ros/geometry_msgs dev-ros/map_msgs"

inherit ros-catkin

DESCRIPTION="Creates a 2D costmap from sensor data"
LICENSE="BSD"
SLOT="0"
IUSE=""
REQUIRED_USE="ros_messages_cxx"
DATA="simple_driving_test_indexed.bag willow-full-0.025.pgm"
for i in ${DATA}; do
	SRC_URI="${SRC_URI}
		http://download.ros.org/data/costmap_2d/${i} -> ${P}-${i}"
done

RDEPEND="
	dev-ros/dynamic_reconfigure[${PYTHON_SINGLE_USEDEP}]
	dev-ros/laser_geometry
	dev-ros/message_filters
	>=dev-ros/pluginlib-1.13.0-r1
	dev-ros/roscpp
	dev-ros/tf2
	dev-ros/tf2_ros
	dev-ros/voxel_grid

	dev-libs/boost:=[threads(+)]
	dev-libs/tinyxml2:=
	dev-libs/console_bridge:=
"
DEPEND="${RDEPEND}
	dev-cpp/eigen:3
	dev-ros/nav_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
	dev-ros/sensor_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
	dev-ros/visualization_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
	dev-ros/tf2_geometry_msgs[${CATKIN_MESSAGES_CXX_USEDEP}]
	dev-ros/tf2_sensor_msgs
	test? (
		dev-ros/map_server
		dev-ros/rosbag
		dev-ros/rostest[${PYTHON_SINGLE_USEDEP}]
		dev-cpp/gtest
		dev-ros/rosunit
	)"
BDEPEND="
	dev-ros/cmake_modules
"

src_prepare() {
	ros-catkin_src_prepare
	for i in ${DATA}; do
		cp "${DISTDIR}/${P}-${i}" "${S}/${i}" || die
	done
	sed -e "s#http://download.ros.org/data/costmap_2d/#file://${S}/#" -i CMakeLists.txt || die
}

src_test() {
	export ROS_PACKAGE_PATH="${S}:${ROS_PACKAGE_PATH}"
	export CATKIN_PREFIX_PATH="${BUILD_DIR}/devel/:${CATKIN_PREFIX_PATH}"
	ros-catkin_src_test
}