安装ROS-Academy-for-Beginners教学包时安装依赖的时候老是失败
-
如图是一本书上的教程,到了安装ROS-Academy-for-Beginners教学包中安装依赖这步,我用小鱼的办法已经将rosdep升级了:
失败结果是:
zmbsxyt@ubuntu:~$ cd ~/tutorial_ws zmbsxyt@ubuntu:~/tutorial_ws$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y ERROR: the following packages/stacks could not have their rosdepc keys resolved to system dependencies: slam_sim_demo: Cannot locate rosdep definition for [hector_mapping] robot_sim_demo: Cannot locate rosdep definition for [yocs_cmd_vel_mux] navigation_sim_demo: Cannot locate rosdep definition for [dwa_local_planner]
我的乌班图是16.04.7,安装的是Kinetic版本,目前可以正常测试ROS的吉祥物--小海龟
-
@849646037 这个是针对kinetic版本特有的错误。因为该版本已经
eol
(不在维护)了。所以进行rosdepc update时需要增加参数
--include-eol-distros
。rosdep update --include-eol-distros
之后再次调用
rosdep intstall
你先试一下,不行再反馈。当然rosdep指令也可以使用apt进行替代,比如这个包
slam_sim_demo: Cannot locate rosdep definition for [hector_mapping]
你可以使用,将
[hector_mapping]
改成hector-mapping
,加上前缀ros-kinetic-
然后使用apt进行安装也可。sudo apt install ros-kinetic-hector-mapping
最后再次帮你改了下格式,下次注意哈~,可以看看提问的智慧一文~
-
@849646037 你的图片看不到,修改一下格式哈~代码记得用代码块包裹一下。
晚点回复。 -
@849646037 这个是针对kinetic版本特有的错误。因为该版本已经
eol
(不在维护)了。所以进行rosdepc update时需要增加参数
--include-eol-distros
。rosdep update --include-eol-distros
之后再次调用
rosdep intstall
你先试一下,不行再反馈。当然rosdep指令也可以使用apt进行替代,比如这个包
slam_sim_demo: Cannot locate rosdep definition for [hector_mapping]
你可以使用,将
[hector_mapping]
改成hector-mapping
,加上前缀ros-kinetic-
然后使用apt进行安装也可。sudo apt install ros-kinetic-hector-mapping
最后再次帮你改了下格式,下次注意哈~,可以看看提问的智慧一文~
-
-
-
@小鱼
十分感谢!我按照你说的进行rosdepc update时增加了参数--include-eol-distros
,显示成功,如下:欢迎使用国内版rosdep之rosdepc 我是作者小鱼,更多ROS学习资源请关注公众号鱼香ROS 小鱼rosdepc开始为您服务--------------- reading in sources list data from /etc/ros/rosdep/sources.list.d Hit https://gitee.com/ohhuo/rosdistro/raw/master/rosdep/osx-homebrew.yaml Hit https://gitee.com/ohhuo/rosdistro/raw/master/rosdep/base.yaml Hit https://gitee.com/ohhuo/rosdistro/raw/master/rosdep/python.yaml Hit https://gitee.com/ohhuo/rosdistro/raw/master/rosdep/ruby.yaml Hit https://gitee.com/ohhuo/rosdistro/raw/master/releases/fuerte.yaml Query rosdistro index https://gitee.com/ohhuo/rosdistro/raw/master/index-v4.yaml Add distro "ardent" Add distro "bouncy" Add distro "crystal" Add distro "dashing" Add distro "eloquent" Add distro "foxy" Add distro "galactic" Add distro "groovy" Add distro "hydro" Add distro "indigo" Add distro "jade" Add distro "kinetic" Add distro "lunar" Add distro "melodic" Add distro "noetic" Add distro "rolling" updated cache in /home/zmbsxyt/.ros/rosdep/sources.cache 小鱼恭喜:rosdepc已为您完成更新---------------
随后我运行
$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
结果显示失败如下:zmbsxyt@ubuntu:~$ cd ~/tutorial_ws zmbsxyt@ubuntu:~/tutorial_ws$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y executing command [sudo -H apt-get install -y ros-kinetic-map-server] [sudo] zmbsxyt 的密码: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 将会同时安装下列软件: libasound2-dev libbullet-dev libbulletsoftbody2.83.6 libcaca-dev libpulse-dev libsdl-image1.2 libsdl-image1.2-dev libsdl1.2-dev libsdl1.2debian libslang2-dev 建议安装: libasound2-doc 下列【新】软件包将被安装: libasound2-dev libbullet-dev libbulletsoftbody2.83.6 libcaca-dev libpulse-dev libsdl-image1.2 libsdl-image1.2-dev libsdl1.2-dev libsdl1.2debian libslang2-dev ros-kinetic-map-server 升级了 0 个软件包,新安装了 11 个软件包,要卸载 0 个软件包,有 39 个软件包未被升级。 需要下载 2,651 kB 的归档。 解压缩后会消耗 12.0 MB 的额外空间。 【警告】:下列软件包不能通过认证! ros-kinetic-map-server E: 存在未认证的软件包同时使用了 -y 选项,然而未搭配 --allow-unauthenticated ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y ros-kinetic-map-server] failed
我进行的尝试为:
将之前安装失败的三个包:slam_sim_demo: Cannot locate rosdep definition for [hector_mapping] robot_sim_demo: Cannot locate rosdep definition for [yocs_cmd_vel_mux] navigation_sim_demo: Cannot locate rosdep definition for [dwa_local_planner]
采用您说的将[hector_mapping]改成hector-mapping,加上前缀ros-kinetic-然后使用apt进行安装。
sudo apt install ros-kinetic-hector-mapping
三个包均如此安装之后,显示成功(证据为我再次安装提升已经是最新版)。随后我回到catkin_ws下编译:$ cd ~/tutorial_ws $ catkin_make
其出现一大段文字,我看不懂,但是最后出现了一个错误如下:
-- Configuring incomplete, errors occurred! See also "/home/zmbsxyt/tutorial_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/zmbsxyt/tutorial_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
随后我进行编译:
$ rospack profile $ roslaunch robot_sim_demo robot_spawn.launch
结果失败,显示
[robot_spawn.launch] is neither a launch file in package [robot_sim_demo] nor is [robot_sim_demo] a launch file name The traceback for the exception was written to the log file
请问现在该如何解决呢?万分感谢
-
@849646037 通过catkin_make返回的信息可以看出,你应该是make失败的,才导致后面找不到相关的程序运行,失败的原因需要进一步定位,请将catkin_make的结果完整贴出。
-
@小鱼 您好,catkin_make完整结果是:
zmbsxyt@ubuntu:~/tutorial_ws$ catkin_make Base path: /home/zmbsxyt/tutorial_ws Source space: /home/zmbsxyt/tutorial_ws/src Build space: /home/zmbsxyt/tutorial_ws/build Devel space: /home/zmbsxyt/tutorial_ws/devel Install space: /home/zmbsxyt/tutorial_ws/install #### #### Running command: "cmake /home/zmbsxyt/tutorial_ws/src -DCATKIN_DEVEL_PREFIX=/home/zmbsxyt/tutorial_ws/devel -DCMAKE_INSTALL_PREFIX=/home/zmbsxyt/tutorial_ws/install -G Unix Makefiles" in "/home/zmbsxyt/tutorial_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/zmbsxyt/tutorial_ws/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic -- This workspace overlays: /opt/ros/kinetic -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2") -- Using PYTHON_EXECUTABLE: /usr/bin/python2 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/zmbsxyt/tutorial_ws/build/test_results -- Found gtest sources under '/usr/src/gmock': gtests will be built -- Found gmock sources under '/usr/src/gmock': gmock will be built -- Found PythonInterp: /usr/bin/python2 (found version "2.7.12") -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.29 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 15 packages in topological order: -- ~~ - ros_academy_for_beginners (metapackage) -- ~~ - name_demo -- ~~ - orbslam2_demo -- ~~ - param_demo -- ~~ - rtabmap_demo -- ~~ - service_demo -- ~~ - topic_demo -- ~~ - action_demo -- ~~ - msgs_demo -- ~~ - navigation_sim_demo -- ~~ - robot_sim_demo -- ~~ - slam_sim_demo -- ~~ - tf_demo -- ~~ - tf_follower -- ~~ - urdf_demo -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin metapackage: 'ros_academy_for_beginners' -- ==> add_subdirectory(ROS-Academy-for-Beginners/ros_academy_for_beginners) -- +++ processing catkin package: 'name_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/name_demo) -- +++ processing catkin package: 'orbslam2_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/orbslam2_demo) -- +++ processing catkin package: 'param_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/param_demo) -- +++ processing catkin package: 'rtabmap_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/rtabmap_demo) -- +++ processing catkin package: 'service_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/service_demo) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- service_demo: 0 messages, 1 services -- +++ processing catkin package: 'topic_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/topic_demo) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- topic_demo: 1 messages, 0 services -- +++ processing catkin package: 'action_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/action_demo) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- Generating .msg files for action action_demo/DoDishes /home/zmbsxyt/tutorial_ws/src/ROS-Academy-for-Beginners/action_demo/action/DoDishes.action -- action_demo: 7 messages, 0 services -- +++ processing catkin package: 'msgs_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/msgs_demo) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Generating .msg files for action msgs_demo/AutoDocking /home/zmbsxyt/tutorial_ws/src/ROS-Academy-for-Beginners/msgs_demo/action/AutoDocking.action -- Generating .msg files for action msgs_demo/AddTwoInts /home/zmbsxyt/tutorial_ws/src/ROS-Academy-for-Beginners/msgs_demo/action/AddTwoInts.action -- Generating .msg files for action msgs_demo/GetMap /home/zmbsxyt/tutorial_ws/src/ROS-Academy-for-Beginners/msgs_demo/action/GetMap.action -- Generating .msg files for action msgs_demo/MoveBase /home/zmbsxyt/tutorial_ws/src/ROS-Academy-for-Beginners/msgs_demo/action/MoveBase.action -- msgs_demo: 42 messages, 9 services -- +++ processing catkin package: 'navigation_sim_demo' -- ==> add_subdirectory(ROS-Academy-for-Beginners/navigation_sim_demo) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "controller_manager" with any of the following names: controller_managerConfig.cmake controller_manager-config.cmake Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or set "controller_manager_DIR" to a directory containing one of the above files. If "controller_manager" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package) -- Could not find the required component 'controller_manager'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "controller_manager" with any of the following names: controller_managerConfig.cmake controller_manager-config.cmake Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or set "controller_manager_DIR" to a directory containing one of the above files. If "controller_manager" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package) -- Configuring incomplete, errors occurred! See also "/home/zmbsxyt/tutorial_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/zmbsxyt/tutorial_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
-
@849646037 仔细看一下你的错误提示,找不到
control_manager
,所以手动安装以下就好了。Could not find a package configuration file provided by "controller_manager" with any of the following names: controller_managerConfig.cmake controller_manager-config.cmake Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or set "controller_manager_DIR" to a directory containing one of the above files. If "controller_manager" provides a separate development package or SDK, be sure it has been installed.
sudo apt install ros-<version>-controller-manager
-
@小鱼 谢谢小鱼!