ros2 / ros2/rclcpp

Component container fail unexpected

Open
#1,866 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

I encounter this problem/bug with the component CLI not sure what cause the issue so the title may not be correct.

Bug report

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • foxy
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rclcpp
Steps to reproduce issue

The issue can be reproduce with the demo code of rclcpp_component. When execute following command:
1st terminal: ros2 run rclcpp_components component_container
2nd terminal:

ros2 component load /ComponentManager demo_nodes_cpp demo_nodes_cpp::Talker
ros2 component unload /ComponentManager 1
ros2 component load /ComponentManager demo_nodes_cpp demo_nodes_cpp::Talker
ros2 component unload /ComponentManager 2
Expected behavior

The component should load and unload as normal

Actual behavior

From the instance the 2nd component load in the ComponentManager seem to just fail and all service is unavailable (e.g component list,, load, unload)

Additional information

But if skip the first unload then the ComponentManager will kept running without issue and all service exist.
Terminal output of both error and working case:
Screenshot 2022-01-14 16:11:06

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the rclcpp_components component_container and the documented ros2 component load/unload commands on Ubuntu 20.04 with Foxy and Fast-RTPS. Trace the component manager and load/unload entry points to determine why the second load leaves its services unavailable. Done means the manager remains usable after the unload, load, and second unload sequence, with coverage for the failing sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.