-
Notifications
You must be signed in to change notification settings - Fork 522
Description
Feature request
Feature description
Right now, if IPC cannot be enabled, you get a generic error reading
intraprocess communication is not allowed with a zero qos history depth value
It would be great if this provided us with some more information, such as the name of the interface that is throwing this, if its a publisher, subscriber, action, or service, etc. Honestly though, even just the topic name would do wonders, I'm currently searching through all interfaces in Costmap2D to find the offender and its quite the needle in the haystack
Implementation considerations
I was able to deduce that it is a publisher because of the slight variation in the error prints between publishers and subscriptions (but that seems accidental to have "zero" versus "0").
rclcpp/rclcpp/include/rclcpp/publisher.hpp
Lines 158 to 173 in 8c0161a
// Register the publisher with the intra process manager. if (qos.history() != rclcpp::HistoryPolicy::KeepLast) { throw std::invalid_argument( "intraprocess communication allowed only with keep last history qos policy"); } if (qos.depth() == 0) { throw std::invalid_argument( "intraprocess communication is not allowed with a zero qos history depth value"); } if (qos.durability() == rclcpp::DurabilityPolicy::TransientLocal) { buffer_ = rclcpp::experimental::create_intra_process_buffer< ROSMessageType, ROSMessageTypeAllocator, ROSMessageTypeDeleter>( rclcpp::detail::resolve_intra_process_buffer_type(options_.intra_process_buffer_type), qos, std::make_shared<ROSMessageTypeAllocator>(ros_message_type_allocator_)); } rclcpp/rclcpp/include/rclcpp/subscription.hpp
Lines 148 to 155 in 8c0161a
if (qos_profile.history() != rclcpp::HistoryPolicy::KeepLast) { throw std::invalid_argument( "intraprocess communication allowed only with keep last history qos policy"); } if (qos_profile.depth() == 0) { throw std::invalid_argument( "intraprocess communication is not allowed with 0 depth qos policy"); }
Can we improve this by having the logging include the topic string?