Browse Source

fix: in c++ ros2 example, too few ticks. (#1060)

It seems that too few ticks to ensure everything work correctly.

The topics and the services still not initialized, the loop has been
break and there are no responses from the `add` server.
1000 events counter is considerable for the whole program, while 20
received ticks are not so reasonable.

I'm running on an AMD 6800H Laptop with Ubuntu in Docker, whose
performance is totally enough for such a simple example.
tags/v0.3.12-fix
Haixuan Xavier Tao GitHub 6 months ago
parent
commit
60bc0cf9e3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      examples/c++-ros2-dataflow/node-rust-api/main.cc

+ 1
- 1
examples/c++-ros2-dataflow/node-rust-api/main.cc View File

@@ -73,7 +73,7 @@ int main()
std::cerr << "Unknown event type " << static_cast<int>(ty) << std::endl;
}

if (received_ticks > 20)
if (received_ticks > 20 && responses_received > 0)
{
break;
}


Loading…
Cancel
Save