ROS运行launch文件时出错:………urdf/turtlebot3_.urdf.xacro None None

本文详细解析了在ROS环境中运行launch文件时遇到的Nosuchfileordirectory错误,并提供了具体的解决方案,包括如何检查和修正URDF文件路径,以及如何确保正确加载xacro命令参数。

ROS运行launch文件时出错

 

错误如下:

No such file or directory: /home/dwy/catkin_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_.urdf.xacro None None
while processing /home/dwy/catkin_ws/src/turtlebot3/turtlebot3_bringup/launch/includes/description.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro --inorder '/home/dwy/catkin_ws/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_.urdf.xacro'] returned with code [2]. 

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file

 

分析:

很明显是没有运行环境

 

解决:

在终端运行下面的命令:

source ~/.bashrc

 

 

 

roslaunch learning_urdf learning_mesh.launch ... logging to /home/tanye/.ros/log/b20aa768-a9ce-11f0-9550-c3418daec497/roslaunch-tanye-ubuntu-6974.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/__init__.py", line 347, in main p.start() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 305, in start self._start_infrastructure() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 254, in _start_infrastructure self._load_config() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 156, in _load_config self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port, File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/config.py", line 461, in load_config_default loader.load(f, config, argv=args, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 763, in load self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 735, in _load_launch self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 681, in _recurse_load self._param_tag(tag, context, ros_config, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 96, in call return f(*args, **kwds) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 271, in _param_tag value = self.param_value(verbose, name, ptype, *vals) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/loader.py", line 478, in param_value with open(textfile, &#39;r&#39;) as f: FileNotFoundError: [Errno 2] No such file or directory: "/home/tanye/catkin_ws/src/learning_urdf/urdf/urdf/learning_mesh.urdf&#39;"
最新发布
10-16
shr@ubuntu:~/h_ws$ roslaunch urdf1_rviz d6_car_base.launch \... logging to /home/shr/.ros/log/1c21b9ba-660f-11f0-8c1d-e5f088e14116/roslaunch-ubuntu-5773.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/__init__.py", line 347, in main p.start() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 305, in start self._start_infrastructure() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 254, in _start_infrastructure self._load_config() File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 156, in _load_config self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port, File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/config.py", line 461, in load_config_default loader.load(f, config, argv=args, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 763, in load self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 735, in _load_launch self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 681, in _recurse_load self._param_tag(tag, context, ros_config, verbose=verbose) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 96, in call return f(*args, **kwds) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 271, in _param_tag value = self.param_value(verbose, name, ptype, *vals) File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/loader.py", line 478, in param_value with open(textfile, &#39;r&#39;) as f: FileNotFoundError: [Errno 2] No such file or directory: &#39;/home/shr/h_ws/src/urdf1_rviz/urdf/urdf/d3_sum.urdf.xacro&#39;
07-22
... logging to /home/orangepi/.ros/log/ad552cb6-9213-11f0-911c-9cb8b4f1c3ce/roslaunch-orangepi5pro-5378.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://orangepi5pro:39017/ SUMMARY ======== PARAMETERS * /gimbal/differ_pitch: 0 * /gimbal/differ_yaw: 0 * /gimbal/i2c_address: 64 * /gimbal/i2c_bus: 1 * /gimbal/id_pitch: 1 * /gimbal/id_yaw: 0 * /gimbal/range_pitch: [-28, 28] * /gimbal/range_yaw: [-90, 90] * /rosdistro: noetic * /rosversion: 1.16.0 * /usb_cam/camera_info_path: file:///home/oran... * /usb_cam/camera_name: usb_cam * /usb_cam/exposure: 0 * /usb_cam/fps: 30 * /usb_cam/height: 480 * /usb_cam/kill_switch_topic: /task * /usb_cam/pixel_format: yuyv * /usb_cam/pub_rate: 30 * /usb_cam/video_port: 0 * /usb_cam/visualize: False * /usb_cam/width: 640 NODES / gimbal_control (gimbal/gimbal_control_node.py) gimbal_test (gimbal/gimbal_test_node.py) /usb_cam/ usb_cam (usb_cam/usb_cam) auto-starting new master process[master]: started with pid [5400] ROS_MASTER_URI=http://localhost:11311 setting /run_id to ad552cb6-9213-11f0-911c-9cb8b4f1c3ce process[rosout-1]: started with pid [5418] started core service [/rosout] process[usb_cam/usb_cam-2]: started with pid [5425] process[gimbal_control-3]: started with pid [5427] RLException: Roslaunch got a &#39;No such file or directory&#39; error while attempting to run: /home/orangepi/catkin_ws/src/actuator/gimbal/scripts/gimbal_test_node.py __name:=gimbal_test __log:=/home/orangepi/.ros/log/ad552cb6-9213-11f0-911c-9cb8b4f1c3ce/gimbal_test-4.log Please make sure that all the executables in this command exist and have executable permission. This is often caused by a bad launch-prefix. The traceback for the exception was written to the log file [gimbal_test-4] killing on exit [gimbal_control-3] killing on exit Traceback (most recent call last): File "/home/orangepi/catkin_ws/src/actuator/gimbal/scripts/gimbal_control_node.py", line 6, in <module> import numpy as np File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 142, in <module> from . import core File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 17, in <module> from . import multiarray File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 78, in <module> def empty_like(prototype, dtype=None, order=None, subok=None, shape=None): File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 201, in decorator return array_function_dispatch( File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 174, in decorator source_object = compile( KeyboardInterrupt [usb_cam/usb_cam-2] killing on exit [rosout-1] killing on exit [master] killing on exit 这是什么问题
09-16
(python3.8) xzm@xzm-nb:~/zed_ws1$ source ~/cv_bridge/devel/setup.bash (python3.8) xzm@xzm-nb:~/zed_ws1$ source ~/cv_bridge/devel/setup.bash (python3.8) xzm@xzm-nb:~/zed_ws1$ source ~/cv_bridge/devel/setup.bash (python3.8) xzm@xzm-nb:~/zed_ws1$ roslaunch yolov8_tensorrt yolov8.launch RLException: [yolov8.launch] is neither a launch file in package [yolov8_tensorrt] nor is [yolov8_tensorrt] a launch file name The traceback for the exception was written to the log file (python3.8) xzm@xzm-nb:~/zed_ws1$ source devel/setup.bash (python3.8) xzm@xzm-nb:~/zed_ws1$ roslaunch yolov8_tensorrt yolov8.launch ... logging to /home/xzm/.ros/log/53d04362-61f1-11f0-89e4-26f1664424f6/roslaunch-xzm-nb-1544.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://xzm-nb:44797/ SUMMARY ======== PARAMETERS * /Parameter/node_rate: 30 * /Publisher/boundingbox_topic_name: /yolov8/bounding_... * /Publisher/detected_image_topic_name: /yolov8/detection... * /Publisher/left_boundingbox_topic_name: /yolov8/left/boun... * /Publisher/left_detected_image_topic_name: /yolov8/left/dete... * /Publisher/left_object_topic_name: /yolov8/left/foun... * /Publisher/object_topic_name: /yolov8/found_object * /Publisher/right_boundingbox_topic_name: /yolov8/right/bou... * /Publisher/right_detected_image_topic_name: /yolov8/right/det... * /Publisher/right_object_topic_name: /yolov8/right/fou... * /Subscriber/left_camera_topic_name: /zed2i/zed_node/l... * /Subscriber/right_camera_topic_name: /zed2i/zed_node/r... * /rosdistro: melodic * /rosversion: 1.14.13 NODES / yolov8_tensorrt (yolov8_tensorrt/yolov8_infer.py) ROS_MASTER_URI=http://localhost:11311 /opt/ros/melodic/lib/python2.7/dist-packages/roslib/packages.py:470: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if resource_name in files: process[yolov8_tensorrt-1]: started with pid [1578] inference begining... loading parameters... [07/16/2025-11:34:31] [TRT] [I] [MemUsageChange] Init CUDA: CPU +575, GPU +0, now: CPU 663, GPU 924 (MiB) [07/16/2025-11:34:31] [TRT] [I] Loaded engine size: 16 MiB [07/16/2025-11:34:31] [TRT] [E] 1: [stdArchiveReader.cpp::StdArchiveReader::30] Error Code 1: Serialization (Serialization assertion magicTagRead == kMAGIC_TAG failed.Magic tag does not match) [07/16/2025-11:34:31] [TRT] [E] 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.) Traceback (most recent call last): File "/home/xzm/zed_ws1/src/yolov8_tensorrt/scripts/yolov8_infer.py", line 341, in <module> trt_engine = TRT_engine("/home/xzm/yolov8/yolov8/runs/detect/train9/weights/best.engine") File "/home/xzm/zed_ws1/src/yolov8_tensorrt/scripts/yolov8_infer.py", line 56, in __init__ self.init_engine() File "/home/xzm/zed_ws1/src/yolov8_tensorrt/scripts/yolov8_infer.py", line 137, in init_engine for index in range(self.model.num_bindings): AttributeError: &#39;NoneType&#39; object has no attribute &#39;num_bindings&#39; [yolov8_tensorrt-1] process has died [pid 1578, exit code 1, cmd /home/xzm/zed_ws1/src/yolov8_tensorrt/scripts/yolov8_infer.py __name:=yolov8_tensorrt __log:=/home/xzm/.ros/log/53d04362-61f1-11f0-89e4-26f1664424f6/yolov8_tensorrt-1.log]. log file: /home/xzm/.ros/log/53d04362-61f1-11f0-89e4-26f1664424f6/yolov8_tensorrt-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done
07-17
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值