magazino / move_base_flex

Move Base Flex: a backwards-compatible replacement for move_base
https://uos.github.io/mbf_docs/
BSD 3-Clause "New" or "Revised" License
422 stars 154 forks source link

why we need `for( auto& node: tree.nodes)` inside `mbf_behavior_tree.cpp` node file? #302

Open MortezaAliyari opened 1 year ago

MortezaAliyari commented 1 year ago

Hi, I'm using mbf tutorial package. everything works fine. My issue is for loop inside the mbf_behavior_tree.CPP node file. when I comment the for loop inside the main function the robot skipped moving toward the goals. why this loop is necessary? and what is the meaning of conditions inside the loop? if( auto attempt_next = dynamic_cast<AttemptNext*>( node.get() )) thanks for your support.