ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Cannot launch node

asked 2012-12-11 05:20:05 -0600

JaRu gravatar image

updated 2012-12-11 10:21:57 -0600

Eric Perko gravatar image

Hello!

I have a problem when I launch the ar_kinect.launch file.

I programmed a Phyton code an wrote this line into the ar_kinect.launch:

<node name="kinect" pkg="ar_kinect" type="ar_kinect.py"/>

The ar_kinect.py file is stored in the bin file.

When I execute the launch file I get the following error message:

Error: cannot launch node of type [ar_kinect/ar_kinect.py]: Cannot locate node of type [ar_kinect.py] in package [ar_kinect]

What can I do?

Thanks for help.

edit retag flag offensive close merge delete

Comments

4

Are you sure the python node you wrote is executable and has the right permissions? The tutorial on subscribing and publishing explains how to make your script executable.

thebyohazard gravatar image thebyohazard  ( 2012-12-11 05:29:11 -0600 )edit
2

@tbh, I guess you should convert your comment to an answer.

Lorenz gravatar image Lorenz  ( 2012-12-11 05:40:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-12-12 03:22:02 -0600

thebyohazard gravatar image

Perhaps the python node you wrote isn't executable or doesn't have the right permissions. The tutorial on subscribing and publishing explains how to make your script executable.

Change permissions of the file with

$ chmod +x ar_kinect.py

and make sure you have the line

#!/usr/bin/env python

at the top of your python file.

edit flag offensive delete link more

Comments

1

It works. Thanks!

JaRu gravatar image JaRu  ( 2012-12-12 09:08:28 -0600 )edit

Question Tools

Stats

Asked: 2012-12-11 05:20:05 -0600

Seen: 4,270 times

Last updated: Dec 12 '12