ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.51k stars 1.27k forks source link

Call to deleted constructor of 'BT::Tree'clang(ovl_deleted_init) compiled error when using `clang-15` and FIXED #2905

Closed sci-42ver closed 2 years ago

sci-42ver commented 2 years ago

Bug report

Required Info:

Steps to reproduce issue

njtech@robot-ai-1:~/RMUA_WS$ clang -v Ubuntu clang version 15.0.0-++20220309112335+52fb4f53c29e-1~exp1~20220309232347.184 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9 Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 Candidate multilib: .;@m64 Selected multilib: .;@m64


#### Expected behavior
```bash
$ colcon-build
Summary: 69 packages finished [16min 16s]                                                                                                         
  23 packages had stderr output: armor_vision costmap_converter cpp_pubsub livox_ros2_driver livox_sdk_vendor nav2_amcl nav2_behavior_tree nav2_br
ingup nav2_bt_navigator nav2_costmap_2d nav2_planner nav2_recoveries nav2_regulated_pure_pursuit_controller nav2_rotation_shim_controller nav2_sma
c_planner nav2_smoother nav2_system_tests nav2_waypoint_follower realsense2_camera roborts_sdk rplidar_sdk teb_local_planner turtlebot3_node

Actual behavior

#### Additional information
- **workaround** to comply with `// non-copyable. Only movable` comment in `behaviortree_cpp_v3/bt_factory.h` header which last modified in 
    ```diff
    diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp
    index e423afcb..faf23843 100644
    --- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp
    +++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp
    @@ -168,7 +168,7 @@ public:
        * @brief Getter function for the current BT tree
        * @return BT::Tree Current behavior tree
        */
    -  BT::Tree getTree() const
    +  const BT::Tree& getTree() const
    {
        return tree_;
    }

Feature request

Feature description

Implementation considerations

SteveMacenski commented 2 years ago

that seems reasonable to me, please open a PR and I'll merge