Skip to content

Adapt rolling pose2d deprecated #5343

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

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
16 changes: 8 additions & 8 deletions nav2_amcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ add_library(motions_lib SHARED
target_include_directories(motions_lib
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(motions_lib PUBLIC
pf_lib
pluginlib::pluginlib
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
)

add_library(sensors_lib SHARED
Expand All @@ -81,11 +81,11 @@ add_library(sensors_lib SHARED
target_include_directories(sensors_lib
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(sensors_lib PUBLIC
pf_lib
map_lib
nav2_ros_common::nav2_ros_common
)

set(executable_name amcl)
Expand All @@ -101,12 +101,12 @@ endif()
target_include_directories(${library_name}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(${library_name} PUBLIC
${geometry_msgs_TARGETS}
message_filters::message_filters
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
${sensor_msgs_TARGETS}
${std_srvs_TARGETS}
pluginlib::pluginlib
Expand All @@ -129,10 +129,10 @@ add_executable(${executable_name}
target_include_directories(${executable_name}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(${executable_name} PRIVATE
${library_name}
nav2_ros_common::nav2_ros_common
)

rclcpp_components_register_nodes(${library_name} "nav2_amcl::AmclNode")
Expand Down
10 changes: 5 additions & 5 deletions nav2_behavior_tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ add_library(${library_name} SHARED
target_include_directories(${library_name}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(${library_name} PUBLIC
${action_msgs_TARGETS}
behaviortree_cpp::behaviortree_cpp
${geometry_msgs_TARGETS}
${nav_msgs_TARGETS}
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_action::rclcpp_action
rclcpp_lifecycle::rclcpp_lifecycle
Expand Down Expand Up @@ -249,8 +249,7 @@ foreach(bt_plugin ${plugin_libs})
target_include_directories(${bt_plugin}
PRIVATE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(${bt_plugin} PUBLIC
behaviortree_cpp::behaviortree_cpp
${geometry_msgs_TARGETS}
Expand Down Expand Up @@ -285,9 +284,10 @@ add_executable(generate_nav2_tree_nodes_xml src/generate_nav2_tree_nodes_xml.cpp
target_link_libraries(generate_nav2_tree_nodes_xml PRIVATE
behaviortree_cpp::behaviortree_cpp
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
)
# allow generate_nav2_tree_nodes_xml to find plugins_list.hpp
target_include_directories(generate_nav2_tree_nodes_xml PRIVATE ${GENERATED_DIR} "$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>")
target_include_directories(generate_nav2_tree_nodes_xml PRIVATE ${GENERATED_DIR})
install(TARGETS generate_nav2_tree_nodes_xml DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY include/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "rclcpp/rclcpp.hpp"
#include "tf2/LinearMath/Matrix3x3.hpp"
#include "tf2/LinearMath/Quaternion.hpp"
#include "tf2/utils.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"

#include "behaviortree_cpp/bt_factory.h"

Expand Down
32 changes: 16 additions & 16 deletions nav2_behavior_tree/test/test_bt_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TEST(PointPortTest, test_wrong_syntax)

BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<geometry_msgs::msg::Point>>("PointPort");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -68,7 +68,7 @@ TEST(PointPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(PointPortTest, test_correct_syntax)
Expand Down Expand Up @@ -105,7 +105,7 @@ TEST(QuaternionPortTest, test_wrong_syntax)
BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<geometry_msgs::msg::Quaternion>>("QuaternionPort");

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -115,7 +115,7 @@ TEST(QuaternionPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(QuaternionPortTest, test_correct_syntax)
Expand Down Expand Up @@ -152,7 +152,7 @@ TEST(PoseStampedPortTest, test_wrong_syntax)

BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<geometry_msgs::msg::PoseStamped>>("PoseStampedPort");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -162,7 +162,7 @@ TEST(PoseStampedPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(PoseStampedPortTest, test_correct_syntax)
Expand Down Expand Up @@ -206,7 +206,7 @@ TEST(PoseStampedVectorPortTest, test_wrong_syntax)
BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<std::vector<geometry_msgs::msg::PoseStamped>>>(
"PoseStampedVectorPortTest");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -216,7 +216,7 @@ TEST(PoseStampedVectorPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(PoseStampedVectorPortTest, test_correct_syntax)
Expand Down Expand Up @@ -270,7 +270,7 @@ TEST(GoalsArrayPortTest, test_wrong_syntax)
BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<nav_msgs::msg::Goals>>(
"GoalsArrayPortTest");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -280,7 +280,7 @@ TEST(GoalsArrayPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(GoalsArrayPortTest, test_correct_syntax)
Expand Down Expand Up @@ -334,7 +334,7 @@ TEST(PathPortTest, test_wrong_syntax)
BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<nav_msgs::msg::Path>>(
"PathPortTest");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -344,7 +344,7 @@ TEST(PathPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(PathPortTest, test_correct_syntax)
Expand Down Expand Up @@ -399,7 +399,7 @@ TEST(WaypointStatusPortTest, test_wrong_syntax)

BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<nav2_msgs::msg::WaypointStatus>>("WaypointStatusPort");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -409,7 +409,7 @@ TEST(WaypointStatusPortTest, test_wrong_syntax)
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(WaypointStatusPortTest, test_correct_syntax)
Expand Down Expand Up @@ -455,7 +455,7 @@ TEST(WaypointStatusVectorPortTest, test_wrong_syntax) {
BT::BehaviorTreeFactory factory;
factory.registerNodeType<TestNode<std::vector<nav2_msgs::msg::WaypointStatus>>>(
"WaypointStatusVectorPort");
EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);

xml_txt =
R"(
Expand All @@ -465,7 +465,7 @@ TEST(WaypointStatusVectorPortTest, test_wrong_syntax) {
</BehaviorTree>
</root>)";

EXPECT_THROW(factory.createTreeFromText(xml_txt), std::exception);
EXPECT_THROW({auto unused = factory.createTreeFromText(xml_txt);}, std::exception);
}

TEST(WaypointStatusVectorPortTest, test_correct_syntax)
Expand Down
12 changes: 6 additions & 6 deletions nav2_behaviors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ target_include_directories(nav2_spin_behavior
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(nav2_spin_behavior PUBLIC
${geometry_msgs_TARGETS}
Expand All @@ -40,6 +39,7 @@ target_link_libraries(nav2_spin_behavior PUBLIC
nav2_costmap_2d::nav2_costmap_2d_core
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
tf2::tf2
Expand All @@ -57,14 +57,14 @@ target_include_directories(nav2_wait_behavior
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(nav2_wait_behavior PUBLIC
${geometry_msgs_TARGETS}
nav2_core::nav2_core
nav2_costmap_2d::nav2_costmap_2d_core
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
tf2::tf2
Expand All @@ -78,14 +78,14 @@ target_include_directories(nav2_drive_on_heading_behavior
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(nav2_drive_on_heading_behavior PUBLIC
${geometry_msgs_TARGETS}
nav2_core::nav2_core
nav2_costmap_2d::nav2_costmap_2d_core
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
tf2::tf2
Expand All @@ -102,14 +102,14 @@ target_include_directories(nav2_back_up_behavior
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(nav2_back_up_behavior PUBLIC
${geometry_msgs_TARGETS}
nav2_core::nav2_core
nav2_costmap_2d::nav2_costmap_2d_core
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
tf2::tf2
Expand All @@ -126,14 +126,14 @@ target_include_directories(nav2_assisted_teleop_behavior
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(nav2_assisted_teleop_behavior PUBLIC
${geometry_msgs_TARGETS}
nav2_core::nav2_core
nav2_costmap_2d::nav2_costmap_2d_core
${nav2_msgs_TARGETS}
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
${std_msgs_TARGETS}
Expand All @@ -154,13 +154,13 @@ target_include_directories(${library_name}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
"$<BUILD_INTERFACE:${nav2_ros_common_INCLUDE_DIRS}>"
)
target_link_libraries(${library_name} PUBLIC
nav2_core::nav2_core
nav2_costmap_2d::nav2_costmap_2d_client
nav2_costmap_2d::nav2_costmap_2d_core
nav2_util::nav2_util_core
nav2_ros_common::nav2_ros_common
pluginlib::pluginlib
rclcpp_lifecycle::rclcpp_lifecycle
tf2_ros::tf2_ros
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class AssistedTeleop : public TimedBehavior<AssistedTeleopAction>
* @param twist velocity to project pose by
* @param projection_time time to project by
*/
geometry_msgs::msg::Pose2D projectPose(
const geometry_msgs::msg::Pose2D & pose,
geometry_msgs::msg::Pose projectPose(
const geometry_msgs::msg::Pose & pose,
const geometry_msgs::msg::Twist & twist,
double projection_time);

Expand Down
Loading
Loading