deprecate redundant namespaces (#1083)
* deprecate redundant namespaces, move classes to own files, rename some classes Signed-off-by: William Woodall <william@osrfoundation.org> * fixup Signed-off-by: William Woodall <william@osrfoundation.org> * address review comments Signed-off-by: William Woodall <william@osrfoundation.org> * fix ups since rebase Signed-off-by: William Woodall <william@osrfoundation.org> * avoid deprecation warnings from deprecated functions Signed-off-by: William Woodall <william@osrfoundation.org> * more fixes Signed-off-by: William Woodall <william@osrfoundation.org> * another fixup, after another rebase Signed-off-by: William Woodall <william@osrfoundation.org>
This commit is contained in:
parent
52ae3e0337
commit
df3c2ffa8a
74 changed files with 716 additions and 563 deletions
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
RCLCPP_COMPONENTS_PUBLIC
|
||||
ComponentManager(
|
||||
std::weak_ptr<rclcpp::executor::Executor> executor,
|
||||
std::weak_ptr<rclcpp::Executor> executor,
|
||||
std::string node_name = "ComponentManager",
|
||||
const rclcpp::NodeOptions & node_options = rclcpp::NodeOptions());
|
||||
|
||||
|
@ -103,7 +103,7 @@ protected:
|
|||
std::shared_ptr<ListNodes::Response> response);
|
||||
|
||||
private:
|
||||
std::weak_ptr<rclcpp::executor::Executor> executor_;
|
||||
std::weak_ptr<rclcpp::Executor> executor_;
|
||||
|
||||
uint64_t unique_id_ {1};
|
||||
std::map<std::string, std::unique_ptr<class_loader::ClassLoader>> loaders_;
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace rclcpp_components
|
|||
{
|
||||
|
||||
ComponentManager::ComponentManager(
|
||||
std::weak_ptr<rclcpp::executor::Executor> executor,
|
||||
std::weak_ptr<rclcpp::Executor> executor,
|
||||
std::string node_name,
|
||||
const rclcpp::NodeOptions & node_options)
|
||||
: Node(std::move(node_name), node_options),
|
||||
|
|
|
@ -59,7 +59,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, true);
|
||||
EXPECT_EQ(result.get()->error_message, "");
|
||||
EXPECT_EQ(result.get()->full_node_name, "/test_component_foo");
|
||||
|
@ -73,7 +73,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, true);
|
||||
EXPECT_EQ(result.get()->error_message, "");
|
||||
EXPECT_EQ(result.get()->full_node_name, "/test_component_bar");
|
||||
|
@ -89,7 +89,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, true);
|
||||
EXPECT_EQ(result.get()->error_message, "");
|
||||
EXPECT_EQ(result.get()->full_node_name, "/test_component_baz");
|
||||
|
@ -106,7 +106,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, true);
|
||||
EXPECT_EQ(result.get()->error_message, "");
|
||||
EXPECT_EQ(result.get()->full_node_name, "/ns/test_component_bing");
|
||||
|
@ -121,7 +121,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, false);
|
||||
EXPECT_EQ(result.get()->error_message, "Failed to find class with the requested plugin name.");
|
||||
EXPECT_EQ(result.get()->full_node_name, "");
|
||||
|
@ -136,7 +136,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, false);
|
||||
EXPECT_EQ(result.get()->error_message, "Could not find requested resource in ament index");
|
||||
EXPECT_EQ(result.get()->full_node_name, "");
|
||||
|
@ -166,7 +166,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
auto request = std::make_shared<composition_interfaces::srv::ListNodes::Request>();
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
auto node_names = result.get()->full_node_names;
|
||||
auto unique_ids = result.get()->unique_ids;
|
||||
|
||||
|
@ -197,7 +197,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, true);
|
||||
EXPECT_EQ(result.get()->error_message, "");
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(result.get()->success, false);
|
||||
EXPECT_EQ(result.get()->error_message, "No node found with unique_id: 1");
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ TEST_F(TestComponentManager, components_api)
|
|||
auto request = std::make_shared<composition_interfaces::srv::ListNodes::Request>();
|
||||
auto result = client->async_send_request(request);
|
||||
auto ret = exec->spin_until_future_complete(result, 5s); // Wait for the result.
|
||||
EXPECT_EQ(ret, rclcpp::executor::FutureReturnCode::SUCCESS);
|
||||
EXPECT_EQ(ret, rclcpp::FutureReturnCode::SUCCESS);
|
||||
auto node_names = result.get()->full_node_names;
|
||||
auto unique_ids = result.get()->unique_ids;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue