Python Roslaunch got“;没有这样的文件或目录;启动节点时

Python Roslaunch got“;没有这样的文件或目录;启动节点时,python,ros,catkin,Python,Ros,Catkin,我正在为用python编写的ROS创建自己的节点。启动节点时roslaunch contact\u charging contact\u charging.launch出现以下错误: Roslaunch got a 'No such file or directory' error while attempting to run: /home/ubuntu/catkin_ws/src/contact_charging/nodes/contact_charging.py __name:=conta

我正在为用python编写的ROS创建自己的节点。启动节点时
roslaunch contact\u charging contact\u charging.launch
出现以下错误:

Roslaunch got a 'No such file or directory' error while attempting to run:
/home/ubuntu/catkin_ws/src/contact_charging/nodes/contact_charging.py __name:=contact_charging __log:=/home/ubuntu/.ros/log/709588cc-7a39-11ea-9bb6-77211eadb622/contact_charging-5.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
启动文件/src/contact\u charging/launch/contact\u charging.launch:


Python脚本位于/src/contact\u charging/nodes/contact\u charging.py中

到目前为止,我尝试的是:

  • chmod 777/接触式充电器-R
  • 多次制作柳絮并重新启动机器/终端
  • 已在根文件夹中创建setup.py

  • pkg存在吗?您编写了
    chmod 777/contact\u charger-R
    ,但您的软件包名为
    contact\u charging
    。您可以再次检查您的可执行文件是否具有正确的权限:
    roscd contact\u;ls-l节点/联系人_charging.py
    。如果没有,请使用
    chmod+x节点/contact\u charging.py
    进行设置,然后尝试仅使用
    rosrun contact\u charging contact\u charging.py运行节点
    
    <launch>
    
        <include file="$(find magni_nav)/launch/move_basic.launch"/>
        <include file="$(find magni_description)/launch/description.launch"/>
        <include file="$(find raspicam_node)/launch/camerav2_1280x960.launch" />
    
    
        <node pkg="contact_charging" type="contact_charging.py" name="contact_charging" output="screen"></node>
    
    </launch>