Skip to content

Commit bdf1f8f

Browse files
authored
Removed deprecated methods and classes (#2575)
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
1 parent 004db2b commit bdf1f8f

24 files changed

+4
-1028
lines changed

rclcpp/include/rclcpp/callback_group.hpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -59,46 +59,6 @@ class CallbackGroup
5959
public:
6060
RCLCPP_SMART_PTR_DEFINITIONS(CallbackGroup)
6161

62-
/// Constructor for CallbackGroup.
63-
/**
64-
* Callback Groups have a type, either 'Mutually Exclusive' or 'Reentrant'
65-
* and when creating one the type must be specified.
66-
*
67-
* Callbacks in Reentrant Callback Groups must be able to:
68-
* - run at the same time as themselves (reentrant)
69-
* - run at the same time as other callbacks in their group
70-
* - run at the same time as other callbacks in other groups
71-
*
72-
* Callbacks in Mutually Exclusive Callback Groups:
73-
* - will not be run multiple times simultaneously (non-reentrant)
74-
* - will not be run at the same time as other callbacks in their group
75-
* - but must run at the same time as callbacks in other groups
76-
*
77-
* Additionally, callback groups have a property which determines whether or
78-
* not they are added to an executor with their associated node automatically.
79-
* When creating a callback group the automatically_add_to_executor_with_node
80-
* argument determines this behavior, and if true it will cause the newly
81-
* created callback group to be added to an executor with the node when the
82-
* Executor::add_node method is used.
83-
* If false, this callback group will not be added automatically and would
84-
* have to be added to an executor manually using the
85-
* Executor::add_callback_group method.
86-
*
87-
* Whether the node was added to the executor before creating the callback
88-
* group, or after, is irrelevant; the callback group will be automatically
89-
* added to the executor in either case.
90-
*
91-
* \param[in] group_type The type of the callback group.
92-
* \param[in] automatically_add_to_executor_with_node A boolean that
93-
* determines whether a callback group is automatically added to an executor
94-
* with the node with which it is associated.
95-
*/
96-
[[deprecated("Use CallbackGroup constructor with context function argument")]]
97-
RCLCPP_PUBLIC
98-
explicit CallbackGroup(
99-
CallbackGroupType group_type,
100-
bool automatically_add_to_executor_with_node = true);
101-
10262
/// Constructor for CallbackGroup.
10363
/**
10464
* Callback Groups have a type, either 'Mutually Exclusive' or 'Reentrant'

rclcpp/include/rclcpp/client.hpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ struct FutureAndRequestId
7070
/// Allow implicit conversions to `std::future` by reference.
7171
operator FutureT &() {return this->future;}
7272

73-
/// Deprecated, use the `future` member variable instead.
74-
/**
75-
* Allow implicit conversions to `std::future` by value.
76-
* \deprecated
77-
*/
78-
[[deprecated("FutureAndRequestId: use .future instead of an implicit conversion")]]
79-
operator FutureT() {return this->future;}
80-
8173
// delegate future like methods in the std::future impl_
8274

8375
/// See std::future::get().
@@ -436,15 +428,6 @@ class Client : public ClientBase
436428
{
437429
using detail::FutureAndRequestId<std::future<SharedResponse>>::FutureAndRequestId;
438430

439-
/// Deprecated, use `.future.share()` instead.
440-
/**
441-
* Allow implicit conversions to `std::shared_future` by value.
442-
* \deprecated
443-
*/
444-
[[deprecated(
445-
"FutureAndRequestId: use .future.share() instead of an implicit conversion")]]
446-
operator SharedFuture() {return this->future.share();}
447-
448431
// delegate future like methods in the std::future impl_
449432

450433
/// See std::future::share().

rclcpp/include/rclcpp/create_client.hpp

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,9 @@ create_client(
4747
const std::string & service_name,
4848
const rclcpp::QoS & qos = rclcpp::ServicesQoS(),
4949
rclcpp::CallbackGroup::SharedPtr group = nullptr)
50-
{
51-
return create_client<ServiceT>(
52-
node_base, node_graph, node_services,
53-
service_name,
54-
qos.get_rmw_qos_profile(),
55-
group);
56-
}
57-
58-
/// Create a service client with a given type.
59-
/// \internal
60-
template<typename ServiceT>
61-
typename rclcpp::Client<ServiceT>::SharedPtr
62-
create_client(
63-
std::shared_ptr<node_interfaces::NodeBaseInterface> node_base,
64-
std::shared_ptr<node_interfaces::NodeGraphInterface> node_graph,
65-
std::shared_ptr<node_interfaces::NodeServicesInterface> node_services,
66-
const std::string & service_name,
67-
const rmw_qos_profile_t & qos_profile,
68-
rclcpp::CallbackGroup::SharedPtr group)
6950
{
7051
rcl_client_options_t options = rcl_client_get_default_options();
71-
options.qos = qos_profile;
52+
options.qos = qos.get_rmw_qos_profile();
7253

7354
auto cli = rclcpp::Client<ServiceT>::make_shared(
7455
node_base.get(),
@@ -80,7 +61,6 @@ create_client(
8061
node_services->add_client(cli_base_ptr, group);
8162
return cli;
8263
}
83-
8464
} // namespace rclcpp
8565

8666
#endif // RCLCPP__CREATE_CLIENT_HPP_

rclcpp/include/rclcpp/event_handler.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ class EventHandlerBase : public Waitable
233233
size_t wait_set_event_index_;
234234
};
235235

236-
using QOSEventHandlerBase [[deprecated("Use rclcpp::EventHandlerBase")]] = EventHandlerBase;
237-
238236
template<typename EventCallbackT, typename ParentHandleT>
239237
class EventHandler : public EventHandlerBase
240238
{
@@ -311,11 +309,6 @@ class EventHandler : public EventHandlerBase
311309
ParentHandleT parent_handle_;
312310
EventCallbackT event_callback_;
313311
};
314-
315-
template<typename EventCallbackT, typename ParentHandleT>
316-
using QOSEventHandler [[deprecated("Use rclcpp::EventHandler")]] = EventHandler<EventCallbackT,
317-
ParentHandleT>;
318-
319312
} // namespace rclcpp
320313

321314
#endif // RCLCPP__EVENT_HANDLER_HPP_

rclcpp/include/rclcpp/loaned_message.hpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -82,36 +82,6 @@ class LoanedMessage
8282
}
8383
}
8484

85-
/// Constructor of the LoanedMessage class.
86-
/**
87-
* The constructor of this class allocates memory for a given message type
88-
* and associates this with a given publisher.
89-
*
90-
* Given the publisher instance, a case differentiation is being performaned
91-
* which decides whether the underlying middleware is able to allocate the appropriate
92-
* memory for this message type or not.
93-
* In the case that the middleware can not loan messages, the passed in allocator instance
94-
* is being used to allocate the message within the scope of this class.
95-
* Otherwise, the allocator is being ignored and the allocation is solely performaned
96-
* in the underlying middleware with its appropriate allocation strategy.
97-
* The need for this arises as the user code can be written explicitly targeting a middleware
98-
* capable of loaning messages.
99-
* However, this user code is ought to be usable even when dynamically linked against
100-
* a middleware which doesn't support message loaning in which case the allocator will be used.
101-
*
102-
* \param[in] pub rclcpp::Publisher instance to which the memory belongs
103-
* \param[in] allocator Allocator instance in case middleware can not allocate messages
104-
* \throws anything rclcpp::exceptions::throw_from_rcl_error can throw.
105-
*/
106-
[[
107-
deprecated("used the LoanedMessage constructor that does not use a shared_ptr to the allocator")
108-
]]
109-
LoanedMessage(
110-
const rclcpp::PublisherBase * pub,
111-
std::shared_ptr<std::allocator<MessageT>> allocator)
112-
: LoanedMessage(*pub, *allocator)
113-
{}
114-
11585
/// Move semantic for RVO
11686
LoanedMessage(LoanedMessage<MessageT> && other)
11787
: pub_(std::move(other.pub_)),

rclcpp/include/rclcpp/node.hpp

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -257,22 +257,6 @@ class Node : public std::enable_shared_from_this<Node>
257257
CallbackT callback,
258258
rclcpp::CallbackGroup::SharedPtr group = nullptr);
259259

260-
/// Create and return a Client.
261-
/**
262-
* \param[in] service_name The topic to service on.
263-
* \param[in] qos_profile rmw_qos_profile_t Quality of service profile for client.
264-
* \param[in] group Callback group to call the service.
265-
* \return Shared pointer to the created client.
266-
* \deprecated use rclcpp::QoS instead of rmw_qos_profile_t
267-
*/
268-
template<typename ServiceT>
269-
[[deprecated("use rclcpp::QoS instead of rmw_qos_profile_t")]]
270-
typename rclcpp::Client<ServiceT>::SharedPtr
271-
create_client(
272-
const std::string & service_name,
273-
const rmw_qos_profile_t & qos_profile,
274-
rclcpp::CallbackGroup::SharedPtr group = nullptr);
275-
276260
/// Create and return a Client.
277261
/**
278262
* \param[in] service_name The name on which the service is accessible.
@@ -287,24 +271,6 @@ class Node : public std::enable_shared_from_this<Node>
287271
const rclcpp::QoS & qos = rclcpp::ServicesQoS(),
288272
rclcpp::CallbackGroup::SharedPtr group = nullptr);
289273

290-
/// Create and return a Service.
291-
/**
292-
* \param[in] service_name The topic to service on.
293-
* \param[in] callback User-defined callback function.
294-
* \param[in] qos_profile rmw_qos_profile_t Quality of service profile for client.
295-
* \param[in] group Callback group to call the service.
296-
* \return Shared pointer to the created service.
297-
* \deprecated use rclcpp::QoS instead of rmw_qos_profile_t
298-
*/
299-
template<typename ServiceT, typename CallbackT>
300-
[[deprecated("use rclcpp::QoS instead of rmw_qos_profile_t")]]
301-
typename rclcpp::Service<ServiceT>::SharedPtr
302-
create_service(
303-
const std::string & service_name,
304-
CallbackT && callback,
305-
const rmw_qos_profile_t & qos_profile,
306-
rclcpp::CallbackGroup::SharedPtr group = nullptr);
307-
308274
/// Create and return a Service.
309275
/**
310276
* \param[in] service_name The topic to service on.
@@ -1015,8 +981,6 @@ class Node : public std::enable_shared_from_this<Node>
1015981
rclcpp::node_interfaces::OnSetParametersCallbackHandle;
1016982
using OnSetParametersCallbackType =
1017983
rclcpp::node_interfaces::NodeParametersInterface::OnSetParametersCallbackType;
1018-
using OnParametersSetCallbackType [[deprecated("use OnSetParametersCallbackType instead")]] =
1019-
OnSetParametersCallbackType;
1020984

1021985
using PostSetParametersCallbackHandle =
1022986
rclcpp::node_interfaces::PostSetParametersCallbackHandle;

rclcpp/include/rclcpp/node_impl.hpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,6 @@ Node::create_client(
154154
group);
155155
}
156156

157-
template<typename ServiceT>
158-
typename Client<ServiceT>::SharedPtr
159-
Node::create_client(
160-
const std::string & service_name,
161-
const rmw_qos_profile_t & qos_profile,
162-
rclcpp::CallbackGroup::SharedPtr group)
163-
{
164-
return rclcpp::create_client<ServiceT>(
165-
node_base_,
166-
node_graph_,
167-
node_services_,
168-
extend_name_with_sub_namespace(service_name, this->get_sub_namespace()),
169-
qos_profile,
170-
group);
171-
}
172-
173157
template<typename ServiceT, typename CallbackT>
174158
typename rclcpp::Service<ServiceT>::SharedPtr
175159
Node::create_service(
@@ -187,23 +171,6 @@ Node::create_service(
187171
group);
188172
}
189173

190-
template<typename ServiceT, typename CallbackT>
191-
typename rclcpp::Service<ServiceT>::SharedPtr
192-
Node::create_service(
193-
const std::string & service_name,
194-
CallbackT && callback,
195-
const rmw_qos_profile_t & qos_profile,
196-
rclcpp::CallbackGroup::SharedPtr group)
197-
{
198-
return rclcpp::create_service<ServiceT, CallbackT>(
199-
node_base_,
200-
node_services_,
201-
extend_name_with_sub_namespace(service_name, this->get_sub_namespace()),
202-
std::forward<CallbackT>(callback),
203-
qos_profile,
204-
group);
205-
}
206-
207174
template<typename AllocatorT>
208175
std::shared_ptr<rclcpp::GenericPublisher>
209176
Node::create_generic_publisher(

rclcpp/include/rclcpp/node_interfaces/node_parameters_interface.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ struct OnSetParametersCallbackHandle
5252
std::function<
5353
rcl_interfaces::msg::SetParametersResult(
5454
const std::vector<rclcpp::Parameter> &)>;
55-
using OnParametersSetCallbackType [[deprecated("use OnSetParametersCallbackType instead")]] =
56-
OnSetParametersCallbackType;
5755

5856
OnSetParametersCallbackType callback;
5957
};

0 commit comments

Comments
 (0)