动手4.3.2报错
-
@小鱼 不行。还是同样的报错。难道是我用的ubuntu18.04配置的ros2-eloquent这个版本和教程不一样?我看那个一键安装的ros2的脚本就只有到eloquent这个版本
-
@小鱼
如下:(pytorch) l@l-GF63-Thin-9SC:~/桌面/town_ws$ ros2 usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ... ros2 is an extensible command-line tool for ROS 2. optional arguments: -h, --help show this help message and exit Commands: action Various action related sub-commands component Various component related sub-commands daemon Various daemon related sub-commands doctor Check ROS setup and other potential issues interface Show information about ROS interfaces launch Run a launch file lifecycle Various lifecycle related sub-commands msg Various msg related sub-commands multicast Various multicast related sub-commands node Various node related sub-commands param Various param related sub-commands pkg Various package related sub-commands run Run a package specific executable security Various security related sub-commands service Various service related sub-commands srv Various srv related sub-commands topic Various topic related sub-commands wtf Use `wtf` as alias to `doctor` Call `ros2 <command> -h` for more detailed usage.
运行colcon build:
(pytorch) l@l-GF63-Thin-9SC:~/桌面/town_ws$ colcon build Starting >>> village_interfaces Starting >>> village_li Starting >>> village_wang Finished <<< village_wang [0.47s] --- stderr: village_interfaces CMake Error at /opt/ros/eloquent/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:240 (list): list index: 1 out of range (-1, 0) Call Stack (most recent call first): CMakeLists.txt:24 (rosidl_generate_interfaces) CMake Error at /opt/ros/eloquent/share/rosidl_generator_cpp/cmake/rosidl_generator_cpp_generate_interfaces.cmake:57 (message): Target dependency '/town_ws/build/village_interfaces/rosidl_adapter/village_interfaces/msg/Novel.idl' does not exist Call Stack (most recent call first): /opt/ros/eloquent/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) /opt/ros/eloquent/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:24 (rosidl_generate_interfaces) --- Failed <<< village_interfaces [0.60s, exited with code 1] Aborted <<< village_li [0.82s] Summary: 1 package finished [0.97s] 1 package failed: village_interfaces 1 package aborted: village_li 1 package had stderr output: village_interfaces
还是一样的报错,就说cmake的错,
CMake Error at /opt/ros/eloquent/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:240 (list): list index: 1 out of range (-1, 0) Call Stack (most recent call first): CMakeLists.txt:24 (rosidl_generate_interfaces)
简直头疼,不知道什么毛病。
-
@505106035 版本问题有很大可能,你用的版本已经停止维护有一段时间了。
-
@505106035 ubuntu18上没有foxy版本,只有ubuntu20才支持
-
@小鱼 我用win电脑装了个vm配置了u20。装的ros2-rolling就好使。醉了
-
@505106035 ROS2前几个版本更新的很快,所以差异比较大
-
-
此回复已被删除! -
@小鱼 鱼哥,我的系统版本是22.04.3,ROS版本是humble,和上面的问题有点类似,但感觉不太一样,应该怎么解决??
列表回复: 动手4.3.2报错
liu@liu-virtual-machine:~/桌面$ git clone https://github.com/fishros/fishbot.git -b v1.0.0 --depth=1 fatal: destination path 'fishbot' already exists and is not an empty directory. liu@liu-virtual-machine:~/桌面$ liu@liu-virtual-machine:~/桌面$ cd fishbot liu@liu-virtual-machine:~/桌面/fishbot$ rosdep install --from-paths src --ignore-src -y -r # 安装依赖 #All required rosdeps installed successfully liu@liu-virtual-machine:~/桌面/fishbot$ colcon build Starting >>> fishbot_bringup Starting >>> fishbot_cartographer Finished <<< fishbot_cartographer [0.19s] Starting >>> fishbot_description Finished <<< fishbot_bringup [0.28s] Starting >>> fishbot_interfaces --- stderr: fishbot_interfaces CMake Error at /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:240 (list): list index: 1 out of range (-1, 0) Call Stack (most recent call first): CMakeLists.txt:29 (rosidl_generate_interfaces) CMake Error at /opt/ros/humble/share/rosidl_generator_c/cmake/rosidl_generator_c_generate_interfaces.cmake:69 (message): Target dependency '/fishbot/build/fishbot_interfaces/rosidl_adapter/fishbot_interfaces/srv/FishBotConfig.idl' does not exist Call Stack (most recent call first): /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include) /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions) CMakeLists.txt:29 (rosidl_generate_interfaces) --- Failed <<< fishbot_interfaces [0.44s, exited with code 1] Aborted <<< fishbot_description [0.56s] Summary: 2 packages finished [1.20s] 1 package failed: fishbot_interfaces 1 package aborted: fishbot_description 2 packages had stderr output: fishbot_description fishbot_interfaces 1 package not processed
-
@751365166 尽量避免路径中出现中文,这会产生很多未定义行为。(ROS开发者可不会想到你会输入除英文以外的路径哈哈
-
@ganyuanzhen 我懂了!!!感谢,问题出在,我应该新建一个英文名称的文件夹,然后在新建文件中运行终端命令!而不应该直接在桌面运行终端。
liu@liu-virtual-machine:~/ROS$ git clone https://github.com/fishros/fishbot.git -b v1.0.0 --depth=1 Cloning into 'fishbot'... remote: Enumerating objects: 84, done. remote: Counting objects: 100% (84/84), done. remote: Compressing objects: 100% (69/69), done. remote: Total 84 (delta 21), reused 46 (delta 7), pack-reused 0 Receiving objects: 100% (84/84), 332.98 KiB | 422.00 KiB/s, done. Resolving deltas: 100% (21/21), done. liu@liu-virtual-machine:~/ROS$ cd fishbot liu@liu-virtual-machine:~/ROS/fishbot$ rosdep install --from-paths src --ignore-src -y -r # 安装依赖 #All required rosdeps installed successfully liu@liu-virtual-machine:~/ROS/fishbot$ colcon build Starting >>> fishbot_bringup Starting >>> fishbot_cartographer Finished <<< fishbot_cartographer [0.53s] Starting >>> fishbot_description Finished <<< fishbot_description [0.57s] Starting >>> fishbot_interfaces Finished <<< fishbot_interfaces [7.94s] Starting >>> fishbot_navigation2 Finished <<< fishbot_navigation2 [0.63s] Finished <<< fishbot_bringup [13.5s] Summary: 5 packages finished [13.9s]