ros-navigation / navigation2_tutorials

Tutorial code referenced in https://docs.nav2.org/
180 stars 124 forks source link

Error while building tutorial source #80

Closed Zeki411 closed 7 months ago

Zeki411 commented 8 months ago

Hi everyone, I have a problem when building tutorials source as belows.

Starting >>> nav2_costmap_filters_demo Starting >>> nav2_gps_waypoint_follower_demo Starting >>> nav2_gradient_costmap_plugin
Starting >>> nav2_sms_behavior Starting >>> nav2_straightline_planner Starting >>> sam_bot_description
Finished <<< nav2_costmap_filters_demo [2.57s]
Finished <<< sam_bot_description [2.59s]
Finished <<< nav2_gradient_costmap_plugin [4.10s]
Finished <<< nav2_straightline_planner [4.34s]
--- stderr: nav2_gps_waypoint_follower_demo
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn(

Finished <<< nav2_gps_waypoint_follower_demo [4.77s] --- stderr: nav2_sms_behavior
In file included from /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:8: /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp:27:3: error: ‘ResultStatus’ does not name a type 27 | ResultStatus onRun(const std::shared_ptr command) override; | ^~~~ /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp:29:3: error: ‘ResultStatus’ does not name a type 29 | ResultStatus onCycleUpdate() override; | ^~~~ /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp:37:14: error: ‘CostmapInfoType’ in namespace ‘nav2_core’ does not name a type 37 | nav2_core::CostmapInfoType getResourceInfo() override {return nav2_core::CostmapInfoType::NONE;} | ^~~~~~~ /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:36:1: error: ‘ResultStatus’ does not name a type 36 | ResultStatus SendSms::onRun(const std::shared_ptr command) | ^~~~ /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:56:1: error: ‘ResultStatus’ does not name a type 56 | ResultStatus SendSms::onCycleUpdate() | ^~~~ In file included from /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp:57, from /opt/ros/humble/include/class_loader/class_loader/class_loader.hpp:55, from /opt/ros/humble/include/pluginlib/pluginlib/class_list_macros.hpp:40, from /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:63: /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = nav2_sms_behavior::SendSms; B = nav2_core::Behavior]’: /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp:216:7: required from here /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp:218:12: error: invalid new-expression of abstract class type ‘nav2_sms_behavior::SendSms’ 218 | return new C; | ^~~~~ In file included from /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:8: /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp:21:7: note: because the following virtual functions are pure within ‘nav2_sms_behavior::SendSms’: 21 | class SendSms : public TimedBehavior | ^~~ In file included from /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/include/nav2_sms_behavior/send_sms.hpp:11, from /workspaces/pbot_simu/nav2_simu_ws/src/navigation2_tutorials/nav2_sms_behavior/src/send_sms.cpp:8: /opt/ros/humble/include/nav2_behaviors/timed_behavior.hpp:76:18: note: ‘nav2_behaviors::Status nav2_behaviors::TimedBehavior::onRun(std::shared_ptr) [with ActionT = nav2_sms_behavior::action::SendSms; typename ActionT::Goal = nav2_sms_behavior::action::SendSmsGoal<std::allocator >]’ 76 | virtual Status onRun(const std::shared_ptr command) = 0; | ^~~~~ /opt/ros/humble/include/nav2_behaviors/timed_behavior.hpp:84:18: note: ‘nav2_behaviors::Status nav2_behaviors::TimedBehavior::onCycleUpdate() [with ActionT = nav2_sms_behavior::action::SendSms]’ 84 | virtual Status onCycleUpdate() = 0; | ^~~~~ gmake[2]: [CMakeFiles/nav2_sms_behavior_plugin.dir/build.make:76: CMakeFiles/nav2_sms_behavior_plugin.dir/src/send_sms.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:593: CMakeFiles/nav2_sms_behavior_plugin.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2

Failed <<< nav2_sms_behavior [7.14s, exited with code 2]

Summary: 5 packages finished [8.04s] 1 package failed: nav2_sms_behavior 2 packages had stderr output: nav2_gps_waypoint_follower_demo nav2_sms_behavior

Can anyone help me to solve this ? it looks like missing some files or packages ?

Thanks in advance.

SteveMacenski commented 8 months ago

This targets rolling, you appear to be using Humble

Zeki411 commented 7 months ago

Thank you