紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
Nav2源码安装编译,nav2_mppi_controller报错
-
两台电脑编译,都是相同的错误。
-- stderr: nav2_mppi_controller /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp: In member function ‘virtual void NoiseGeneratorTest_NoiseGeneratorLifecycle_Test::TestBody()’: /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:32: error: ‘rclcpp_lifecycle’ was not declared in this scope 45 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ^~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:20: error: parse error in template argument list 45 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:64: error: no matching function for call to ‘make_shared<<expression error> >(const char [5])’ 45 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ In file included from /usr/include/c++/11/memory:77, from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:57, from /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:18: /usr/include/c++/11/bits/shared_ptr.h:875:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<_Tp> std::make_shared(_Args&& ...)’ 875 | make_shared(_Args&&... __args) | ^~~~~~~~~~~ /usr/include/c++/11/bits/shared_ptr.h:875:5: note: template argument deduction/substitution failed: /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:45:64: error: template argument 1 is invalid 45 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:47:3: error: ‘ParametersHandler’ was not declared in this scope 47 | ParametersHandler handler(node); | ^~~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:49:55: error: ‘handler’ was not declared in this scope 49 | generator.initialize(settings, false, "test_name", &handler); | ^~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp: In member function ‘virtual void NoiseGeneratorTest_NoiseGeneratorMain_Test::TestBody()’: /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:32: error: ‘rclcpp_lifecycle’ was not declared in this scope 57 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ^~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:20: error: parse error in template argument list 57 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:64: error: no matching function for call to ‘make_shared<<expression error> >(const char [5])’ 57 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ In file included from /usr/include/c++/11/memory:77, from /opt/ros/humble/src/gtest_vendor/include/gtest/gtest.h:57, from /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:18: /usr/include/c++/11/bits/shared_ptr.h:875:5: note: candidate: ‘template<class _Tp, class ... _Args> std::shared_ptr<_Tp> std::make_shared(_Args&& ...)’ 875 | make_shared(_Args&&... __args) | ^~~~~~~~~~~ /usr/include/c++/11/bits/shared_ptr.h:875:5: note: template argument deduction/substitution failed: /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:57:64: error: template argument 1 is invalid 57 | auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("node"); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:59:3: error: ‘ParametersHandler’ was not declared in this scope 59 | ParametersHandler handler(node); | ^~~~~~~~~~~~~~~~~ /home/gree/fishbot_ws/src/navigation2/nav2_mppi_controller/test/noise_generator_test.cpp:81:55: error: ‘handler’ was not declared in this scope 81 | generator.initialize(settings, false, "test_name", &handler); | ^~~~~~~ gmake[2]: *** [test/CMakeFiles/noise_generator_test.dir/build.make:76:test/CMakeFiles/noise_generator_test.dir/noise_generator_test.cpp.o] 错误 1 gmake[1]: *** [CMakeFiles/Makefile2:334:test/CMakeFiles/noise_generator_test.dir/all] 错误 2 gmake[1]: *** 正在等待未完成的任务.... gmake: *** [Makefile:146:all] 错误 2 --- Failed <<< nav2_mppi_controller [16.8s, exited with code 2]
-
@1367426346 代码版本不匹配估计
-
@小鱼 啊?我按照你的教程装的呀,就是humble版本呀
-
@1367426346 先直接二进制安装试试
-
@小鱼 二进制安装可以,但是这样就看不到代码了…
-
@1367426346 解决了么 ? 我也出现这个问题 。 还有另外一个问题就是
-
@1367426346 可以 下载源码直接 看,或者回退源码版本和系统nav2同样版本即可
-
@ws13610612715 没解决,只能二进制安装了。
-
@1367426346 二进制怎么安装navigation2啊?
-
我也遇到了相同的问题,报错信息是一样的,我是按照Nav2官方教程的Released Distribution Binaries进行的安装
source /opt/ros/<distro>/setup.bash mkdir -p ~/nav2_ws/src && cd ~/nav2_ws git clone https://github.com/ros-planning/navigation2.git --branch $ROS_DISTRO ./src/navigation2 rosdep install -y \ --from-paths ./src \ --ignore-src colcon build \ --symlink-install
现在还没解决
-
@3110379921 解决了不,我遇到同样问题。
-
@1367426346 兄弟,你解决了嘛