Skip to content
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
9 changes: 8 additions & 1 deletion test_tf2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ if(NOT BUILD_TESTING)
return()
endif()

set(CMAKE_CXX_STANDARD 14)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake_gtest REQUIRED)
find_package(builtin_interfaces REQUIRED)
Expand Down
14 changes: 9 additions & 5 deletions test_tf2/test/buffer_core_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ void seed_rand()
{
//Seed random number generator with current time.
srand((unsigned) time(0));
};
}

void generate_rand_vectors(double scale, uint64_t runs, std::vector<double>& xvalues, std::vector<double>& yvalues, std::vector<double>&zvalues)
{
(void)scale;
seed_rand();
for ( uint64_t i = 0; i < runs ; i++ )
{
Expand Down Expand Up @@ -680,8 +681,6 @@ TEST(BufferCore_lookupTransform, i_configuration)
tf2::BufferCore mBC;
setupTree(mBC, "i", eval_time, interpolation_space);

tf2::TimePoint eval_time_time_point = tf2_ros::fromMsg(eval_time);

geometry_msgs::msg::TransformStamped outpose = mBC.lookupTransform(source_frame, target_frame, tf2_ros::fromMsg(eval_time));

EXPECT_EQ(outpose.header.stamp, eval_time);
Expand Down Expand Up @@ -1765,7 +1764,7 @@ TEST(BufferCore_lookupTransform, invalid_arguments)
EXPECT_THROW(mBC.lookupTransform("/b", "a", eval_time_time_point), tf2::InvalidArgumentException);
EXPECT_THROW(mBC.lookupTransform("b", "/a", eval_time_time_point), tf2::InvalidArgumentException);

};
}

TEST(BufferCore_canTransform, invalid_arguments)
{
Expand All @@ -1787,7 +1786,7 @@ TEST(BufferCore_canTransform, invalid_arguments)
EXPECT_FALSE(mBC.canTransform("/b", "a", eval_time_time_point));
EXPECT_FALSE(mBC.canTransform("b", "/a", eval_time_time_point));

};
}

struct TransformableHelper
{
Expand All @@ -1801,6 +1800,11 @@ struct TransformableHelper
tf2::TimePoint time,
tf2::TransformableResult result)
{
(void)request_handle;
(void)target_frame;
(void)source_frame;
(void)time;
(void)result;
called = true;
}

Expand Down
3 changes: 3 additions & 0 deletions test_tf2/test/test_message_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,14 @@ class Notification

void notify(const geometry_msgs::msg::PointStamped::ConstSharedPtr& message)
{
(void)message;
++count_;
}

void failure(const geometry_msgs::msg::PointStamped::ConstSharedPtr& message, tf2_ros::filter_failure_reasons::FilterFailureReason reason)
{
(void)message;
(void)reason;
++failure_count_;
}

Expand Down
8 changes: 4 additions & 4 deletions test_tf2/test/test_static_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEST(StaticTransformPublisher, a_b_different_times)
executor.cancel();
spin_thread.join();
node.reset();
};
}

TEST(StaticTransformPublisher, a_c_different_times)
{
Expand Down Expand Up @@ -111,7 +111,7 @@ TEST(StaticTransformPublisher, a_c_different_times)
executor.cancel();
spin_thread.join();
node.reset();
};
}

TEST(StaticTransformPublisher, a_d_different_times)
{
Expand Down Expand Up @@ -160,7 +160,7 @@ TEST(StaticTransformPublisher, a_d_different_times)
executor.cancel();
spin_thread.join();
node.reset();
};
}

TEST(StaticTransformPublisher, multiple_parent_test)
{
Expand Down Expand Up @@ -220,7 +220,7 @@ TEST(StaticTransformPublisher, multiple_parent_test)
executor.cancel();
spin_thread.join();
node.reset();
};
}

// TODO (ahcorde) static_transform_publisher allows to load transforma from yaml files
// Revisit this test when "Load transform from yaml" is available
Expand Down
4 changes: 2 additions & 2 deletions tf2_bullet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cmake_minimum_required(VERSION 3.5)
project(tf2_bullet)

# Default to C11
# Default to C14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()


Expand Down
2 changes: 1 addition & 1 deletion tf2_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion tf2_geometry_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake_auto REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion tf2_kdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion tf2_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake)
Expand Down
2 changes: 1 addition & 1 deletion tf2_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion tf2_sensor_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra)
add_compile_options(-Wall -Wextra -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual)
endif()

find_package(ament_cmake_auto REQUIRED)
Expand Down