Skip to content

Add launch_testing-based integration tests covering all AGNOCAST_PUBLIC APIs #1203

@Koichi98

Description

@Koichi98

Background

All functions, classes, and methods annotated with AGNOCAST_PUBLIC constitute the stable public API of agnocastlib. Currently, there is no systematic guarantee that every public API symbol is exercised at least once in the sample application or test code. This means:

  1. Breaking changes to a public API may go undetected until downstream users report them.
  2. The sample application does not serve as a reliable reference for users exploring the full API surface.

Proposal

Create launch_testing-based integration tests (using launch_testing) that exercise every AGNOCAST_PUBLIC symbol at least once. These tests serve a dual purpose:

  • Regression guard: CI will catch any breaking change to public API signatures or behavior.
  • Living reference: Users can read the test code as working examples for each API.

Public API checklist

The following is the full list of AGNOCAST_PUBLIC symbols extracted from the headers. Each must be exercised at least once in a launch_testing test.

Free functions (agnocast.hpp)

  • agnocast::create_publisher<MessageT>(node, topic, QoS, options)
  • agnocast::create_publisher<MessageT>(node, topic, history_depth, options)
  • agnocast::create_subscription<MessageT>(node, topic, QoS, callback, options)
  • agnocast::create_subscription<MessageT>(node, topic, history_depth, callback, options)
  • agnocast::create_subscription<MessageT>(node, topic, history_depth) (polling)
  • agnocast::create_subscription<MessageT>(node, topic, QoS) (polling)
  • agnocast::create_timer(node, clock, period, callback, group, autostart)

Publisher (agnocast_publisher.hpp)

  • PublisherOptions struct
  • Publisher<MessageT>::borrow_loaned_message()
  • Publisher<MessageT>::publish(ipc_shared_ptr&&)
  • Publisher<MessageT>::get_subscription_count()
  • Publisher<MessageT>::get_gid()
  • Publisher<MessageT>::get_intra_subscription_count()
  • Publisher<MessageT>::get_topic_name()

Subscription (agnocast_subscription.hpp)

  • SubscriptionOptions struct (incl. callback_group, ignore_local_publications)
  • TakeSubscription<MessageT>::take(allow_same_message)
  • PollingSubscriber<MessageT>::take_data()

Smart pointer (agnocast_smart_pointer.hpp)

  • ipc_shared_ptr<T> default constructor
  • ipc_shared_ptr<T> copy constructor / copy assignment
  • ipc_shared_ptr<T> move constructor / move assignment
  • ipc_shared_ptr<T> converting constructors (T -> const T)
  • ipc_shared_ptr<T>::operator*() / operator->()
  • ipc_shared_ptr<T>::operator bool()
  • ipc_shared_ptr<T>::get()
  • ipc_shared_ptr<T>::reset()

Timer (agnocast_timer.hpp)

  • TimerBase::is_steady()
  • TimerBase::get_clock()
  • GenericTimer<FunctorT> (via create_timer)
  • WallTimer<FunctorT> (via create_wall_timer)

Stage 1 Executors (with rclcpp::Node)

  • SingleThreadedAgnocastExecutor constructor + spin()
  • MultiThreadedAgnocastExecutor constructor + spin()
  • CallbackIsolatedAgnocastExecutor constructor + spin()
  • CallbackIsolatedAgnocastExecutor::cancel()
  • CallbackIsolatedAgnocastExecutor::add_node() / remove_node()
  • CallbackIsolatedAgnocastExecutor::add_callback_group() / remove_callback_group()
  • CallbackIsolatedAgnocastExecutor::get_all_callback_groups()
  • CallbackIsolatedAgnocastExecutor::get_manually_added_callback_groups()
  • CallbackIsolatedAgnocastExecutor::get_automatically_added_callback_groups_from_nodes()

agnocast::Node (node/agnocast_node.hpp)

  • Node(name) / Node(name, namespace)
  • Node::get_name() / get_namespace() / get_fully_qualified_name()
  • Node::get_logger()
  • Node::create_callback_group()
  • Node::for_each_callback_group()
  • Node::create_publisher<MessageT>(topic, QoS)
  • Node::create_publisher<MessageT>(topic, queue_size)
  • Node::create_subscription<MessageT>(topic, QoS, callback)
  • Node::create_subscription<MessageT>(topic, queue_size, callback)
  • Node::create_subscription<MessageT>(topic, history_depth) (polling)
  • Node::create_subscription<MessageT>(topic, QoS) (polling)
  • Node::create_wall_timer(period, callback)
  • Node::create_timer(period, callback)
  • Node::declare_parameter() (all overloads)
  • Node::has_parameter() / undeclare_parameter()
  • Node::get_parameter() (all overloads) / get_parameters()
  • Node::set_parameter() / set_parameters() / set_parameters_atomically()
  • Node::describe_parameter() / describe_parameters()
  • Node::get_parameter_types() / list_parameters()
  • Node::add_on_set_parameters_callback() / remove_on_set_parameters_callback()
  • Node::get_clock() / now()
  • Node::count_publishers() / count_subscribers()

Stage 2 Executors (with agnocast::Node)

  • AgnocastOnlyExecutor::cancel()
  • AgnocastOnlyExecutor::add_node() / remove_node()
  • AgnocastOnlyExecutor::add_callback_group() / remove_callback_group()
  • AgnocastOnlyExecutor::get_all_callback_groups()
  • AgnocastOnlyExecutor::get_manually_added_callback_groups()
  • AgnocastOnlyExecutor::get_automatically_added_callback_groups_from_nodes()
  • AgnocastOnlySingleThreadedExecutor constructor + spin()
  • AgnocastOnlyMultiThreadedExecutor constructor + spin()
  • AgnocastOnlyCallbackIsolatedExecutor constructor + spin() + cancel()
  • AgnocastOnlyCallbackIsolatedExecutor::add_node()

Context (node/agnocast_context.hpp)

  • agnocast::init(argc, argv)

Message Filters

  • message_filters::PassThrough (constructor, connectInput, add)
  • message_filters::Subscriber (constructor variants, subscribe, unsubscribe, getTopic, getSubscriber)
  • message_filters::Synchronizer (constructor variants, connectInput, registerCallback, getName/setName, getPolicy)
  • message_filters::sync_policies::ApproximateTime (constructor, registerCallback, setAgePenalty, setInterMessageLowerBound, setMaxIntervalDuration)
  • message_filters::sync_policies::ExactTime (constructor, registerCallback, registerDropCallback)
  • message_filters::SimpleFilter::registerCallback / getName / setName
  • message_filters::MessageEvent (constructors, getMessage, getConstMessage, getReceiptTime, comparison operators)

Out of scope

  • Service/Client APIs (agnocast::Client, agnocast::Service) are currently commented out with // AGNOCAST_PUBLIC and excluded from this issue.
  • Internal APIs (non-AGNOCAST_PUBLIC) are intentionally excluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions