Adlink-ROS / neuronbot2

NeuronBot2 is the newest version of NeuronBot made by Adlink, which fully supports ROS1 and ROS2.
Apache License 2.0
103 stars 42 forks source link

BT_ros2 update to Galactic (Control with Behavior Tree demo is bugged) #26

Closed ljaniec closed 2 years ago

ljaniec commented 2 years ago

Hello,

I would like to know if there are any plans to update this BT_ros2 repository with the ROS Galaxy version?

Right now I'm having trouble building everything without any deeper changes (e.g. error: ‘rclcpp::executor’ has not been declared).

Package bt_ros2 failed to build:

--- stderr: bt_ros2                               
/home/lj/ros2_ws/src/BT_ros2/src/send_goal.cpp: In function ‘int main(int, char**)’:
/home/lj/ros2_ws/src/BT_ros2/src/send_goal.cpp:35:21: error: ‘rclcpp::executor’ has not been declared
   35 |             rclcpp::executor::FutureReturnCode::SUCCESS)
      |                     ^~~~~~~~
/home/lj/ros2_ws/src/BT_ros2/src/send_goal.cpp:51:21: error: ‘rclcpp::executor’ has not been declared
   51 |             rclcpp::executor::FutureReturnCode::SUCCESS)
      |                     ^~~~~~~~
In file included from /home/lj/ros2_ws/src/BT_ros2/src/bt_ros2.cpp:1:
/home/lj/ros2_ws/src/BT_ros2/src/nav2_client.hpp: In member function ‘virtual BT::NodeStatus Nav2Client::tick()’:
/home/lj/ros2_ws/src/BT_ros2/src/nav2_client.hpp:98:25: error: ‘rclcpp::executor’ has not been declared
   98 |                 rclcpp::executor::FutureReturnCode::SUCCESS)
      |                         ^~~~~~~~
/home/lj/ros2_ws/src/BT_ros2/src/nav2_client.hpp:114:25: error: ‘rclcpp::executor’ has not been declared
  114 |                 rclcpp::executor::FutureReturnCode::SUCCESS)
      |                         ^~~~~~~~
In file included from /home/lj/ros2_ws/src/BT_ros2/src/bt_ros2.cpp:3:
/home/lj/ros2_ws/src/BT_ros2/src/snapshot_client.hpp: In member function ‘virtual BT::NodeStatus SnapshotClient::tick()’:
/home/lj/ros2_ws/src/BT_ros2/src/snapshot_client.hpp:36:85: error: ‘rclcpp::executor’ has not been declared
   36 |             if (rclcpp::spin_until_future_complete(node_, result_future) != rclcpp::executor::FutureReturnCode::SUCCESS)
      |                                                                                     ^~~~~~~~
make[2]: *** [CMakeFiles/send_goal.dir/build.make:63: CMakeFiles/send_goal.dir/src/send_goal.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/send_goal.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/bt_ros2.dir/build.make:63: CMakeFiles/bt_ros2.dir/src/bt_ros2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/bt_ros2.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< bt_ros2 [8.92s, exited with code 2]

I have followed this part of README.

Best regards Łukasz Janiec

QQting commented 2 years ago

Thank you for reporting this issue, I will try to fix this.

QQting commented 2 years ago

Fixed! See https://github.com/Adlink-ROS/BT_ros2/commit/a8e31d1e5fccb2d34b8a5646529fc442d1b566b5