From 77d3d73468eb44e669dc9923e2958115ad211f97 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 19 Aug 2019 13:49:42 +0100 Subject: [PATCH 1/2] Add 'tf2' package --- cmake/configs/default.cmake | 1 + cmake/projects/tf2/hunter.cmake | 31 +++++++++++++++++++++++++++++++ docs/packages/pkg/tf2.rst | 23 +++++++++++++++++++++++ examples/tf2/CMakeLists.txt | 22 ++++++++++++++++++++++ examples/tf2/main.cpp | 14 ++++++++++++++ examples/tf2/package.xml | 11 +++++++++++ 6 files changed, 102 insertions(+) create mode 100644 cmake/projects/tf2/hunter.cmake create mode 100644 docs/packages/pkg/tf2.rst create mode 100644 examples/tf2/CMakeLists.txt create mode 100644 examples/tf2/main.cpp create mode 100644 examples/tf2/package.xml diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 2b3a9083db..f5e100646c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -480,6 +480,7 @@ hunter_default_version(tacopie VERSION 3.2.0-h1) hunter_default_version(taocpp-json VERSION 1.0.0-beta.11-e0895587) hunter_default_version(tcl VERSION core8.6.8) hunter_default_version(termcolor VERSION 1.0.0) +hunter_default_version(tf2 VERSION 0.6.5-p0) hunter_default_version(thread-pool-cpp VERSION 1.1.0) hunter_default_version(thrift VERSION 0.12.0-p0) hunter_default_version(tinydir VERSION 1.2-p0) diff --git a/cmake/projects/tf2/hunter.cmake b/cmake/projects/tf2/hunter.cmake new file mode 100644 index 0000000000..a703fb0021 --- /dev/null +++ b/cmake/projects/tf2/hunter.cmake @@ -0,0 +1,31 @@ +# Copyright (c) 2016-2019, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cmake_args) + +hunter_add_version( + PACKAGE_NAME + tf2 + VERSION + 0.6.5-p0 + URL + "https://github.com/hunter-packages/tf2/archive/v0.6.5-p0.tar.gz" + SHA1 + ac8e28968074c6c386be8ecd2ac5ece29f5b0e06 +) + +hunter_cmake_args( + tf2 + CMAKE_ARGS + CATKIN_ENABLE_TESTING:BOOL=OFF +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(tf2) +hunter_download(PACKAGE_NAME tf2) diff --git a/docs/packages/pkg/tf2.rst b/docs/packages/pkg/tf2.rst new file mode 100644 index 0000000000..33d64da06b --- /dev/null +++ b/docs/packages/pkg/tf2.rst @@ -0,0 +1,23 @@ +.. spelling:: + + tf2 + tf + ros + +.. index:: ROS ; tf2 + +.. _pkg.tf2: + +tf2 +=== + +- `Official `__ +- `Hunterized `__ +- `Example `__ +- Added by `Krasimir Georgiev `__ (`pr-N `__) + - Contribution partially as part of work at `SeeByte Ltd. `__ + +.. literalinclude:: /../examples/tf2/CMakeLists.txt + :language: cmake + :start-after: # DOCUMENTATION_START { + :end-before: # DOCUMENTATION_END } diff --git a/examples/tf2/CMakeLists.txt b/examples/tf2/CMakeLists.txt new file mode 100644 index 0000000000..5376477f1d --- /dev/null +++ b/examples/tf2/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download_tf2) + +# DOCUMENTATION_START { + +hunter_add_package(tf2) +find_package(catkin CONFIG REQUIRED COMPONENTS tf2_msgs + tf2 tf2_ros tf2_eigen tf2_bullet tf2_sensor_msgs) + +catkin_package() + +add_executable(main main.cpp) +target_link_libraries(main ${catkin_LIBRARIES}) +# DOCUMENTATION_END } diff --git a/examples/tf2/main.cpp b/examples/tf2/main.cpp new file mode 100644 index 0000000000..5f80df1032 --- /dev/null +++ b/examples/tf2/main.cpp @@ -0,0 +1,14 @@ +#include +#include "tf2_msgs/TFMessage.h" +#include "tf2/transform_storage.h" +#include "tf2_ros/transform_listener.h" +#include "tf2_eigen/tf2_eigen.h" +#include "tf2_bullet/tf2_bullet.h" +#include "tf2_sensor_msgs/tf2_sensor_msgs.h" + +int main() { + ros::Time::init(); + ros::Duration(3).sleep(); + std::cout << "Done" << std::endl; + return 0; +} diff --git a/examples/tf2/package.xml b/examples/tf2/package.xml new file mode 100644 index 0000000000..eff070a106 --- /dev/null +++ b/examples/tf2/package.xml @@ -0,0 +1,11 @@ + + download_tf2 + 0.0.0 + + This package provides foo capability. + + Krasimir Georgiev + BSD + + catkin + From eb20773882c4254fd75f5fdd56af3e799b172204 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 19 Aug 2019 19:53:15 +0100 Subject: [PATCH 2/2] Set Pull request number --- docs/packages/pkg/tf2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/packages/pkg/tf2.rst b/docs/packages/pkg/tf2.rst index 33d64da06b..e40a61a2a7 100644 --- a/docs/packages/pkg/tf2.rst +++ b/docs/packages/pkg/tf2.rst @@ -14,7 +14,7 @@ tf2 - `Official `__ - `Hunterized `__ - `Example `__ -- Added by `Krasimir Georgiev `__ (`pr-N `__) +- Added by `Krasimir Georgiev `__ (`pr-1932 `__) - Contribution partially as part of work at `SeeByte Ltd. `__ .. literalinclude:: /../examples/tf2/CMakeLists.txt