8000 Question about conditional statements in graph.c file · Issue #934 · ros2/rcl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Question about conditional statements in graph.c file #934
Closed
@YoungJin-gurum

Description

@YoungJin-gurum

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • from source
  • Version or commit hash:
    • 3.2.0(master)
  • DDS implementation:
    • GurumDDS(after 2.7.2774), rmw_gurumdds_cpp(rolling, galactic)
  • Client library (if applicable):
    • rcl

Steps to reproduce issue

Execute test of rcl (colcon test) with gurumdds, rmw_gurumdds_cpp.

Expected behavior

rcl test_graph_query_functions
At check_graph_state after subscription fini
expected_in_tnat result passed (expect topic isn't in tnat)

Actual behavior

failed

Additional information

I have a question about the code at line 491 and 548 of <graph.c>

  if (expected_count <= count) {
    *success = true;
    return RCL_RET_OK;
  }

Variable count is result of count_entities_func.
After entity fini, if it has not yet received signal of deleted entity, count will be 1.
Then the condition is satisfied (expected_count 0 <= count 1).
So it will return OK immediately, then rcl_get_topic_names_and_types gets topic_cahce.
As I think, condition should be changed to

 expected_count == count

I think that makes waitset operate normally until the graph changes.
If there is a valid reason for the inequality sign in the conditional statement, please let me know.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0