Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style fixup in tf2_ros. #325

Merged
merged 1 commit into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tf2_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,18 @@ install(DIRECTORY include/${PROJECT_NAME}/

# Tests
if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)

ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify(LANGUAGE "c++")

find_package(ament_cmake_gtest REQUIRED)

ament_add_gtest(test_buffer test/test_buffer.cpp)
ament_target_dependencies(test_buffer
${dependencies}
Expand Down
29 changes: 15 additions & 14 deletions tf2_ros/include/tf2_ros/async_buffer_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,24 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef TF2_ROS__ASYNC_BUFFER_INTERFACE_H
#define TF2_ROS__ASYNC_BUFFER_INTERFACE_H
#ifndef TF2_ROS__ASYNC_BUFFER_INTERFACE_H_
#define TF2_ROS__ASYNC_BUFFER_INTERFACE_H_

#include <functional>
#include <future>
#include <tf2_ros/visibility_control.h>
#include <tf2/time.h>
#include <tf2/transform_datatypes.h>

#include <geometry_msgs/msg/transform_stamped.hpp>

#include <tf2_ros/visibility_control.h>
#include <tf2/transform_datatypes.h>
#include <functional>
#include <future>
#include <string>

namespace tf2_ros
{

using TransformStampedFuture = std::shared_future<geometry_msgs::msg::TransformStamped>;
using TransformReadyCallback = std::function<void(const TransformStampedFuture&)>;
using TransformReadyCallback = std::function<void (const TransformStampedFuture &)>;

/**
* \brief Abstract interface for asynchronous operations on a `tf2::BufferCoreInterface`.
Expand All @@ -55,8 +57,7 @@ class AsyncBufferInterface
virtual
~AsyncBufferInterface() = default;

/**
* \brief Wait for a transform between two frames to become available.
/** \brief Wait for a transform between two frames to become available.
* \param target_frame The frame into which to transform.
* \param source_frame The frame from which to tranform.
* \param time The time at which to transform.
Expand All @@ -69,13 +70,13 @@ class AsyncBufferInterface
TF2_ROS_PUBLIC
virtual TransformStampedFuture
waitForTransform(
const std::string& target_frame,
const std::string& source_frame,
const tf2::TimePoint& time,
const tf2::Duration& timeout,
const std::string & target_frame,
const std::string & source_frame,
const tf2::TimePoint & time,
const tf2::Duration & timeout,
TransformReadyCallback callback) = 0;
}; // class AsyncBufferInterface

} // namespace tf2_ros

#endif // TF2_ROS__ASYNC_BUFFER_INTERFACE_H
#endif // TF2_ROS__ASYNC_BUFFER_INTERFACE_H_
Loading