I have followed the Exercise 3.1 solution and created the launch file which in shown in the picture below:

When I launch the file, I am getting the following error:

ERROR: cannot launch node of type [unit-3-services/exercise-3-1.py]: unit-3-services
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [[1]]=/home/user/catkin_ws/src
ROS path [2]=/home/simulations/public-sim-ws/src
ROS path [3]=/opt/ros/kinetic/share

I am not sure where to place the file 'exercise-3-1.py' --- in the folder 'unit-3-services' or 'unit-3-services/src'?

I tried both, but still getting the same error.

Or, do I need to add some path?

(Note: I am using the 'dash' instead of 'underscore' in the filenames above to avoid getting italics)

alt text

asked 04 Oct, 22:33

subhabrata.ganguli%40gmail.com's gravatar image

subhabrata.g...
01
accept rate: 0%

edited 04 Oct, 22:38


Hello @subhabrata,

2 things:

  1. Try to remove the space between pkg and ="unit_3_services"
  2. Check the permissions of your executable. It may not have executable privileges. You can fix running in the terminal: chmod +x ~/catkin_ws/src/unit_3_services/scripts/exercise_3_1.py (or the correct path to your file)

Please, let me know if it worked.

permanent link

answered 05 Oct, 21:03

marcoarruda's gravatar image

marcoarruda ♦♦
1764
accept rate: 20%

Hi @marcoarruda, Please see my comment below in the answer box. Thanks.

(09 Oct, 11:59) subhabrata.g...

Hi @marcoarruda,

Thanks for your reply.

I did as you suggested - made the file permissions +x and remove the extra space. However I am still getting the same error.

 process[iri_wam_reproduce_trajectory-1]: started with pid [31037]
 ERROR: cannot launch node of type [unit_3_services/exercise_3_1.py]: unit_3_services
 ROS path [0]=/opt/ros/kinetic/share/ros
 ROS path [1]=/home/user/catkin_ws/src
 ROS path [2]=/home/simulations/public_sim_ws/src
 ROS path [3]=/opt/ros/kinetic/share
 [ INFO] [1539086154.068030068]: Waiting for action server to start.
 [ INFO] [1539086154.149503848]: Ready execute trajectories

Note: Currently I have exercise_3_1.py placed in ~/catkin-ws/src/unit_3_services/scripts/. And in the launch file I use the line type="exercise_3_1.py". Does ros automatically know if has to search in the subdir scripts?

Please see the zip file at https://github.com/suvoganguli/learning-ros for the files (folder src/unit_3_services). Thanks.

permanent link

answered 09 Oct, 11:58

subhabrata.ganguli%40gmail.com's gravatar image

subhabrata.g...
01
accept rate: 0%

edited 09 Oct, 12:10

Please see the zip file at https://github.com/suvoganguli/learning-ros for the files (folder src/unit_3_services). Thanks.

(09 Oct, 12:10) subhabrata.g...

Figured it out!

I changed the name of the folder unit3_services during the project, but forgot to update the corresponding line in package.xml!

permanent link

answered 09 Oct, 12:39

subhabrata.ganguli%40gmail.com's gravatar image

subhabrata.g...
01
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×19
×2
×1
×1
×1

question asked: 04 Oct, 22:33

question was seen: 166 times

last updated: 09 Oct, 12:39

powered by OSQA