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

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 

 

 

(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、付费专栏及课程。

余额充值