[ROS2, Navigation2] Is Costmap2DROS thread-safe? [closed]

asked 2019-03-18 01:17:46 -0500

vinnam.kim gravatar image

I'm looking at Navigation2 codes. But, I'm confused about whether Costmap2DROS is thread-safe or not. It seems there exist two threads in Costmap2DROS as follows.

Thread 1) ROS2 Node -> callbacks executed

Thread 2) Map update loop -> map update executed in each layers

It seems there are conflicting evaluations. For example, StaticLayer::has_updated_data_ is written by Thread 1(StaticLayer::incomingMap), also is written by Thread 2(StaticLayer::updateBounds). Am I wrong? Since I'm newbie on multi-threading, I really appreciate for anyone's help

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by vinnam.kim
close date 2019-03-26 01:40:26.346168