Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Accumulate DDS errors during cleanup and return error code from wait() function  #265

@dejanpan

Description

@dejanpan

Bug report

In #263 we provided a quick fix for when DDS returns errors which does not guarantee a complete clean up. To quote @wjwwood

You'd need to accumulate the errors during clean up and then return an error return code if there are any accumulated (and also find a way to communicate all of the issues encountered or else decide to just log errors that are being "overwritten" by new ones).

To recap, we are talking about the code in this function. The call graph for this function is as follows:

rmw_ret_t wait() is used in:

  • rmw_connext/rmw_connext_dynamic_cpp/src/functions.cpp => rmw_ret_t rmw_wait()
  • rmw_connext/rmw_connext_cpp/src/rmw_wait.cpp => rmw_ret_t rmw_wait()

rmw_ret_t rmw_wait() is used in:

  • rcl/rcl/src/rcl/wait.c => rcl_ret_t rcl_wait()

rcl_ret_t rcl_wait() is used in:

  • rclcpp/rclcpp/src/rclcpp/executor.cpp => wait_for_work()

wait_for_work() is used in:

  • AnyExecutable::SharedPtr Executor::get_next_executable(std::chrono::nanoseconds timeout)

get_next_executable() is used in:

  • spin_once()
  • spin_some()

spin_once() or spin_some() is used directly in the application

I would first need to understand what is meant by the complete clean up. Can someone maybe fill me in a bit?

Would we need to set all

rmw_subscriptions_t * subscriptions,
rmw_guard_conditions_t * guard_conditions,
rmw_services_t * services,
rmw_clients_t * clients,
rmw_waitset_t * waitset,

to null and then also catch and handle this in rcl/rcl/src/rcl/wait.c => rcl_ret_t rcl_wait()?

Required Info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions