2

I'm creating my own node for ROS that is written in python. When I start the node roslaunch contact_charging contact_charging.launch I get this error:

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

launch file /src/contact_charging/launch/contact_charging.launch:

<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>

Python script is located in /src/contact_charging/nodes/contact_charging.py

What I tried so far:

  1. chmod 777 /contact_charger -R
  2. Catkin_make several times and restarted the machine/terminal
  3. Created setup.py in root folder
KiKiPOV
  • 21
  • 1
  • 2
  • Does the pkg exist? Have sourced it? – question_1 Apr 09 '20 at 10:34
  • You wrote `chmod 777 /contact_charger -R` but your package is called `contact_charging`. You can double check that your executable has the correct permissions: `roscd contact_charging; ls -l nodes/contact_charging.py`. If not, set them with `chmod +x nodes/contact_charging.py` , then try to run the node only with `rosrun contact_charging contact_charging.py` – al-dev Apr 09 '20 at 11:46

0 Answers0