小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
[FishBot教程]7. FishBot-Nav2导航测试
-
下载代码后colcon build报错,如图片所示 -
@1954923637 代码路径有中文,换个没有中文的路径
-
@565517830 同问,我也是这个报错!! file:///home/fishros/%E5%9B%BE%E7%89%87/%E6%88%AA%E5%9B%BE/%E6%88%AA%E5%9B%BE%202023-12-27%2018-58-56.png
-
无法下载cartographer和navigation源码,自己手动下载后,又无法编译cartographer源码
使用git clone --recursive https://github.com/fishros/fishbot.git -b v1.0.0 --depth=1
cd fishbot
rosdep install --from-paths src --ignore-src -y -r # 安装依赖
colcon build下载源码,无法下载cartographer和navigation源码,(我得环境是vm虚拟机+ubuntu22.04+ros2 humble版本)
报错 重定向:http://ww3.91chi.fun/?sub1=90563160-ae8f-11ee-b3d1-c2900044a4dd
fatal: 无法克隆 'https://github.91chi.fun/https://github.com/ros2/cartographer.git' 到子模组路径 '/home/zlkj/Desktop/gong_xiang/yuan_ma1/fishbot/src/cartographer_code/cartographer'
克隆 'src/cartographer_code/cartographer' 失败。按计划重试
正克隆到 '/home/zlkj/Desktop/gong_xiang/yuan_ma1/fishbot/src/cartographer_code/cartographer_ros'...
warning: 您似乎克隆了一个空仓库。
正克隆到 '/home/zlkj/Desktop/gong_xiang/yuan_ma1/fishbot/src/navigation'...
warning: 您似乎克隆了一个空仓库。
正克隆到 '/home/zlkj/Desktop/gong_xiang/yuan_ma1/fishbot/src/cartographer_code/cartographer'...
warning: 您似乎克隆了一个空仓库。
error: inflate: data stream error (incorrect header check)
error: File 2ce33a65bd4e41e3bf5af92c9275354ce7921c70 (https://github.91chi.fun/https://github.com/ros2/cartographer.git/objects/2c/e33a65bd4e41e3bf5af92c9275354ce7921c70) corrupt
error: Unable to find 2ce33a65bd4e41e3bf5af92c9275354ce7921c70 under https://github.91chi.fun/https://github.com/ros2/cartographer.git
Cannot obtain needed object 2ce33a65bd4e41e3bf5af92c9275354ce7921c70
error: 获取失败。
fatal: 获取了子模组路径 'src/cartographer_code/cartographer',但是它没有包含 2ce33a65bd4e41e3bf5af92c9275354ce7921c70。直接获取该提交失败。
fatal:
2:后续自己手动下载这里两部分源码,在编译cartographer时候,报错:home/zlkj/Desktop/gong xiang/yuan ma/fishbot/src/cartographer_code/cartographercartographer/common/thread pool,h:73:63: error:"mutexhas not been declaredvoid NotifyDependenciesCompleted(Task* task) LOCKS EXCLUDED(mutex ) ov73erride;
home/zlkj/Desktop/gong xiang/yuan ma/fishbot/src/cartographer_code/cartographercartographer/common/thread pool.h:73:48: error: ISO C++ forbids declaration ofLOCKS EXCLUDED’ with no type [-fpermissive]73void NotifyDependenciesCompleted(Task* task) LOCKS_EXCLUDED(mutex ) override;
home/zlkj/Desktop/gong xiang/yuan ma/fishbot/src/cartographer_code/cartographercartographer/common/thread poolh:73:48: error: int cartographer::common::thredPool::LOCKS EXCLUDED(int)’ cannot be overloaded with "int cartographer::common::Threadpool::LOCKS EXCLUDED(int) -
@429016267 源码版本有些老了,直接二进制安装吧
-
@小鱼 好吧,目前我就是源码编不过,其他都可以,有没有什么方案能解决下这个问题呢,大佬
-
@429016267 看d2lros2教程前面的仿真部分,根据提示重新从原来的仓库克隆
-
@小鱼 在 [FishBot教程]7. FishBot-Nav2导航测试 中说:
rosdep install --from-paths src --ignore-src -y -r # 安装依赖
在安装依赖时报错, 用的ubuntu22.04 humble版本 然后图上的网址打不开。
-
-
-
鱼哥,这是什么问题
autoliu@autoliu-LEGION-REN7000K-26IRB:~/fishbot$ rosdep install --from-paths src --ignore-src -y -r # 安装依赖
#All required rosdeps installed successfully
autoliu@autoliu-LEGION-REN7000K-26IRB:~/fishbot$ colcon build
Starting >>> fishbot_bringup
Starting >>> fishbot_cartographer
Starting >>> fishbot_description
Starting >>> fishbot_interfaces
Starting >>> fishbot_navigation2
--- stderr: fishbot_cartographer
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
The C compiler"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/autoliu/fishbot/build/fishbot_cartographer/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0c79a/fast && /usr/bin/gmake -f CMakeFiles/cmTC_0c79a.dir/build.make CMakeFiles/cmTC_0c79a.dir/build gmake[1]: 进入目录“/home/autoliu/fishbot/build/fishbot_cartographer/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_0c79a.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_0c79a.dir/testCCompiler.c.o -c /home/autoliu/fishbot/build/fishbot_cartographer/CMakeFiles/CMakeTmp/testCCompiler.c /home/autoliu/fishbot/build/fishbot_cartographer/CMakeFiles/CMakeTmp/testCCompiler.c:11:1: fatal error: error closing /tmp/cc76K2IV.s: 设备上没有空间 11 | { (void)argv; return argc-1;} | ^ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_0c79a.dir/build.make:78:CMakeFiles/cmTC_0c79a.dir/testCCompiler.c.o] 错误 1 gmake[1]: 离开目录“/home/autoliu/fishbot/build/fishbot_cartographer/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_0c79a/fast] 错误 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
Failed <<< fishbot_cartographer [0.39s, exited with code 1]
Aborted <<< fishbot_description [0.38s]
Aborted <<< fishbot_bringup [0.41s]
Aborted <<< fishbot_interfaces [0.49s]
Aborted <<< fishbot_navigation2 [0.48s]Summary: 0 packages finished [0.91s]
1 package failed: fishbot_cartographer
4 packages aborted: fishbot_bringup fishbot_description fishbot_interfaces fishbot_navigation2
4 packages had stderr output: fishbot_bringup fishbot_cartographer fishbot_interfaces fishbot_navigation2 -
鱼哥,如果我要自己写控制算法,应该在哪里改,没找到源码的控制算法在那里
-
@safereinforcementlab 我重新装了ros2,就好了
-
请问在这个程序里面,具体的控制算法程序在哪里,https://github.com/fishros/fishbot,没有看到
-
此回复已被删除! -
@小鱼
鱼哥 都做完了 最后给了小车目标之后 他只是转了个向 并没有移动 我看雷达这边报了警 是这个原因吗? 还是因为什么? -
@1147022743 这个警告没关系,是Qos 主要是你这膨胀半径太大了吧
-
@小鱼 鱼哥,我安装依赖是成功的,但是在编译的时候我也出现了这个问题,请问该怎么解决
-
@blairan121122885 解决了吗,跑了一次一键安装?
-
@192224801 同样问题解决了吗