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:
William Woodall 2020-04-23 15:28:45 -07:00 committed by GitHub
parent 52ae3e0337
commit df3c2ffa8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 716 additions and 563 deletions

View file

@ -46,11 +46,11 @@ create_client(
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr node_logging_interface,
rclcpp::node_interfaces::NodeWaitablesInterface::SharedPtr node_waitables_interface,
const std::string & name,
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr)
rclcpp::CallbackGroup::SharedPtr group = nullptr)
{
std::weak_ptr<rclcpp::node_interfaces::NodeWaitablesInterface> weak_node =
node_waitables_interface;
std::weak_ptr<rclcpp::callback_group::CallbackGroup> weak_group = group;
std::weak_ptr<rclcpp::CallbackGroup> weak_group = group;
bool group_is_null = (nullptr == group.get());
auto deleter = [weak_node, weak_group, group_is_null](Client<ActionT> * ptr)
@ -102,9 +102,9 @@ typename Client<ActionT>::SharedPtr
create_client(
NodeT node,
const std::string & name,
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr)
rclcpp::CallbackGroup::SharedPtr group = nullptr)
{
return create_client<ActionT>(
return rclcpp_action::create_client<ActionT>(
node->get_node_base_interface(),
node->get_node_graph_interface(),
node->get_node_logging_interface(),

View file

@ -65,11 +65,11 @@ create_server(
typename Server<ActionT>::CancelCallback handle_cancel,
typename Server<ActionT>::AcceptedCallback handle_accepted,
const rcl_action_server_options_t & options = rcl_action_server_get_default_options(),
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr)
rclcpp::CallbackGroup::SharedPtr group = nullptr)
{
std::weak_ptr<rclcpp::node_interfaces::NodeWaitablesInterface> weak_node =
node_waitables_interface;
std::weak_ptr<rclcpp::callback_group::CallbackGroup> weak_group = group;
std::weak_ptr<rclcpp::CallbackGroup> weak_group = group;
bool group_is_null = (nullptr == group.get());
auto deleter = [weak_node, weak_group, group_is_null](Server<ActionT> * ptr)
@ -137,7 +137,7 @@ create_server(
typename Server<ActionT>::CancelCallback handle_cancel,
typename Server<ActionT>::AcceptedCallback handle_accepted,
const rcl_action_server_options_t & options = rcl_action_server_get_default_options(),
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr)
rclcpp::CallbackGroup::SharedPtr group = nullptr)
{
return create_server<ActionT>(
node->get_node_base_interface(),

View file

@ -49,7 +49,7 @@ protected:
request->goal_id.uuid = uuid;
auto future = client->async_send_request(request);
if (
rclcpp::executor::FutureReturnCode::SUCCESS !=
rclcpp::FutureReturnCode::SUCCESS !=
rclcpp::spin_until_future_complete(node, future))
{
throw std::runtime_error("send goal future didn't complete succesfully");
@ -69,7 +69,7 @@ protected:
request->goal_info.goal_id.uuid = uuid;
auto future = cancel_client->async_send_request(request);
if (
rclcpp::executor::FutureReturnCode::SUCCESS !=
rclcpp::FutureReturnCode::SUCCESS !=
rclcpp::spin_until_future_complete(node, future))
{
throw std::runtime_error("cancel goal future didn't complete succesfully");
@ -132,7 +132,7 @@ TEST_F(TestServer, handle_goal_called)
auto future = client->async_send_request(request);
ASSERT_EQ(
rclcpp::executor::FutureReturnCode::SUCCESS,
rclcpp::FutureReturnCode::SUCCESS,
rclcpp::spin_until_future_complete(node, future));
ASSERT_EQ(uuid, received_uuid);
@ -744,7 +744,7 @@ TEST_F(TestServer, get_result)
// Wait for the result request to be received
ASSERT_EQ(
rclcpp::executor::FutureReturnCode::SUCCESS,
rclcpp::FutureReturnCode::SUCCESS,
rclcpp::spin_until_future_complete(node, future));
auto response = future.get();