小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
ros2使用colcon编译时,总是报错提示缺少一个包,安装完一个后还有另一个
-
@2519105850 在 ros2使用colcon编译时,总是报错提示缺少一个包,安装完一个后还有另一个 中说:
Command 'vcs' not found, but there are 15 similar ones.
你去看一下我的教程,你这个连vcs都没装怎么用
-
@小鱼 我现在发现好像是我rosdepc这一步错了导致 colcon错误
rosdepc install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y
运行这一步时报了 moveit_visual_tools 相关的错误(之前几次没显示这个错误)
ERROR: the following packages/stacks could not have their rosdepc keys resolved to system dependencies: moveit2_tutorials: Cannot locate rosdep definition for [moveit_visual_tools] Continuing to install resolvable dependencies... #All required rosdeps installed successfully
之前就只有成功那句
另外运行这句指令时,报了这个错误
git reset 59cf8c49bb309e2bb7f06e295f87efa36f8bb506 --hard fatal: 不能解析对象 '59cf8c49bb309e2bb7f06e295f87efa36f8bb506'。
-
@2519105850 在 ros2使用colcon编译时,总是报错提示缺少一个包,安装完一个后还有另一个 中说:
moveit_visual_tools
rosdep这个没关系,手动下载一下到src下
git clone https://github.com/ros-planning/moveit_visual_tools.git -b foxy
-
@小鱼 感觉又和之前那样
src目录下了moveit_visual_tools包后,再运行下面这个代码
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
提示我graph这个包没有,在 https://github.com/PickNikRobotics/graph_msgs.git 上下载包到src目录下再运行 colcon命令
然后提示缺少catkin
--- stderr: graph_msgs CMake Error at CMakeLists.txt:7 (find_package): By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin", but CMake did not find one. Could not find a package configuration file provided by "catkin" with any of the following names: catkinConfig.cmake catkin-config.cmake Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" to a directory containing one of the above files. If "catkin" provides a separate development package or SDK, be sure it has been installed.
我在 https://index.ros.org/ 搜索 cakin 也没找到foxy下的包,catkin也是ros1的包吧?
-
@2519105850 应该是的,你的代码到底哪来的
-
@小鱼 我开始使用的是Ubuntu18.04,然后换了20.04,就按照公众号的这篇文章
https://mp.weixin.qq.com/s/yfMKYtRpRF6xF2PjtGSFzg
(应该是一步步执行的)会不会是下载ros2的时候一些包没下上,一些需要的包没配置?我同时下了rosfoxy , noetic,前面由于我打开终端选择的是noetic然后跟着文章执行的时候colcon报了缺少各种包的错;后面我就把moveit2的那个包全删了,打开终端时选择foxy,运行到colcon时显示
[1/2 complete] (我以为这就要成功了,结果显示没 那个tool ) -
@2519105850 你可能下载的某个包并没有切换分支,还在ros上,比如你这个graph_msgs
-
@小鱼 我选择了foxy这个后那个终端就没有关了,一直接着后面操作的
我再把这个moveit2包删了,运行一步关闭一个终端选择一次foxy,但愿不报错,报错能解决也行
-
@小鱼 您好,我使用
sudo apt-get purge ros-* sudo apt-get autoremove
卸载foxy 和 neotic
为什么打开终端还有提示让我选择呢,是我没卸载干净吗
安装foxy感觉也没成功
-
@2519105850 在 ros2使用colcon编译时,总是报错提示缺少一个包,安装完一个后还有另一个 中说:
卸载foxy 和 neotic
为什么打开终端还有提示让我选择呢,是我没卸载干净吗卸载干净了,配置没有清除罢了,你先用一键安装继续装,一键安装会帮你配置好的
一键安装指令
wget http://fishros.com/install -O fishros && . fishros -
@小鱼 我从安装foxy开始从头来了一遍,到这个colcon命令这里还是过不去
zhong@ubuntu:~/moveit2/src$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release Starting >>> rviz_visual_tools Finished <<< rviz_visual_tools [1.43s] Starting >>> moveit_visual_tools --- stderr: moveit_visual_tools CMake Error at CMakeLists.txt:5 (find_package): By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin", but CMake did not find one. Could not find a package configuration file provided by "catkin" with any of the following names: catkinConfig.cmake catkin-config.cmake Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" to a directory containing one of the above files. If "catkin" provides a separate development package or SDK, be sure it has been installed. --- Failed <<< moveit_visual_tools [1.10s, exited with code 1] Summary: 1 package finished [3.01s] 1 package failed: moveit_visual_tools 1 package had stderr output: moveit_visual_tools 1 package not processed
-
@2519105850 建议你再等等吧,moveit2太不完善了,我后面会出一期教程讲的。
-
@小鱼 好的,感谢感谢