Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1932 from kgeorgiev93/pr.tf2
Browse files Browse the repository at this point in the history
Add 'tf2' package
  • Loading branch information
ruslo authored Aug 20, 2019
2 parents ceb1bbe + eb20773 commit 5527457
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
31 changes: 31 additions & 0 deletions cmake/projects/tf2/hunter.cmake
Original file line number Diff line number Diff line change
@@ -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)
23 changes: 23 additions & 0 deletions docs/packages/pkg/tf2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. spelling::

tf2
tf
ros

.. index:: ROS ; tf2

.. _pkg.tf2:

tf2
===

- `Official <https://github.com/ros/geometry2>`__
- `Hunterized <https://github.com/hunter-packages/tf2>`__
- `Example <https://github.com/ruslo/hunter/blob/master/examples/tf2/CMakeLists.txt>`__
- Added by `Krasimir Georgiev <https://github.com/kgeorgiev93>`__ (`pr-1932 <https://github.com/ruslo/hunter/pull/1932>`__)
- Contribution partially as part of work at `SeeByte Ltd. <http://www.seebyte.com>`__

.. literalinclude:: /../examples/tf2/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
22 changes: 22 additions & 0 deletions examples/tf2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 }
14 changes: 14 additions & 0 deletions examples/tf2/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#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;
}
11 changes: 11 additions & 0 deletions examples/tf2/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<package format="2">
<name>download_tf2</name>
<version>0.0.0</version>
<description>
This package provides foo capability.
</description>
<maintainer email="[email protected]">Krasimir Georgiev</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
</package>

0 comments on commit 5527457

Please sign in to comment.