|
template<typename MessageT , typename AllocatorT , typename PublisherT > |
std::shared_ptr< PublisherT > | create_publisher (rclcpp::node_interfaces::NodeTopicsInterface *node_topics, const std::string &topic_name, const rmw_qos_profile_t &qos_profile, bool use_intra_process_comms, std::shared_ptr< AllocatorT > allocator) |
|
template<typename MessageT , typename CallbackT , typename AllocatorT , typename SubscriptionT > |
rclcpp::subscription::Subscription< MessageT, AllocatorT >::SharedPtr | create_subscription (rclcpp::node_interfaces::NodeTopicsInterface *node_topics, const std::string &topic_name, CallbackT &&callback, const rmw_qos_profile_t &qos_profile, rclcpp::callback_group::CallbackGroup::SharedPtr group, bool ignore_local_publications, bool use_intra_process_comms, typename rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, AllocatorT >::SharedPtr msg_mem_strat, typename std::shared_ptr< AllocatorT > allocator) |
|
void | spin_some (rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr) |
| Create a default single-threaded executor and execute any immediately available work. More...
|
|
void | spin_some (rclcpp::node::Node::SharedPtr node_ptr) |
|
void | spin (rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr) |
| Create a default single-threaded executor and spin the specified node. More...
|
|
void | spin (rclcpp::node::Node::SharedPtr node_ptr) |
|
template<typename FutureT , typename TimeT = std::milli> |
rclcpp::executor::FutureReturnCode | spin_until_future_complete (rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, std::shared_future< FutureT > &future, std::chrono::duration< int64_t, TimeT > timeout=std::chrono::duration< int64_t, TimeT >(-1)) |
|
template<typename NodeT = rclcpp::node::Node, typename FutureT , typename TimeT = std::milli> |
rclcpp::executor::FutureReturnCode | spin_until_future_complete (std::shared_ptr< NodeT > node_ptr, std::shared_future< FutureT > &future, std::chrono::duration< int64_t, TimeT > timeout=std::chrono::duration< int64_t, TimeT >(-1)) |
|
std::string | expand_topic_or_service_name (const std::string &name, const std::string &node_name, const std::string &namespace_, bool is_service=false) |
| Expand a topic or service name and throw if it is not valid. More...
|
|
template<typename MessageT , typename Alloc , typename PublisherT > |
PublisherFactory | create_publisher_factory (std::shared_ptr< Alloc > allocator) |
| Return a PublisherFactory with functions setup for creating a PublisherT<MessageT, Alloc>. More...
|
|
template<typename Callable > |
ScopeExit< Callable > | make_scope_exit (Callable callable) |
|
template<typename MessageT , typename CallbackT , typename Alloc , typename SubscriptionT > |
SubscriptionFactory | create_subscription_factory (CallbackT &&callback, typename rclcpp::message_memory_strategy::MessageMemoryStrategy< MessageT, Alloc >::SharedPtr msg_mem_strat, std::shared_ptr< Alloc > allocator) |
| Return a SubscriptionFactory with functions for creating a SubscriptionT<MessageT, Alloc>. More...
|
|
std::string rclcpp::expand_topic_or_service_name |
( |
const std::string & |
name, |
|
|
const std::string & |
node_name, |
|
|
const std::string & |
namespace_, |
|
|
bool |
is_service = false |
|
) |
| |
Expand a topic or service name and throw if it is not valid.
This function can be used to "just" validate a topic or service name too, since expanding the topic name is required to fully validate a name.
If the name is invalid, then InvalidTopicNameError is thrown or InvalidServiceNameError if is_service is true.
This function can take any form of a topic or service name, i.e. it does not have to be a fully qualified name. The node name and namespace are used to expand it if necessary while validating it.
Expansion is done with rcl_expand_topic_name. The validation is doen with rcl_validate_topic_name and rmw_validate_full_topic_name, so details about failures can be found in the documentation for those functions.
- Parameters
-
name | the topic or service name to be validated |
node_name | the name of the node associated with the name |
namespace_ | the namespace of the node associated with the name |
is_service | if true InvalidServiceNameError is thrown instead |
- Returns
- expanded (and validated) topic name
- Exceptions
-
InvalidTopicNameError | if name is invalid and is_service is false |
InvalidServiceNameError | if name is invalid and is_service is true |
std::bad_alloc | if memory cannot be allocated |
RCLError | if an unexpect error occurs |