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

Error starting .py with roslaunch

asked 2013-09-19 00:29:44 -0500

mike.sru gravatar image

updated 2014-01-28 17:18:00 -0500

ngrennan gravatar image

Hi,

I am trying to start a python script to allow keyboard control of two dynamixel MX28T servo motors.

But when I try

roslaunch pantilt pt_keyboard.py

I get the following error message.

"Invalid roslaunch XML syntax: not well-formed (invalid token): line 1, column 1"

I thought first I could not run a .py file with roslaunch. But I saw another guy doing it. I already googled for a solution, but haven't found the answer for my specific problem.

Anybody who has an Idea?

Thanks for helping!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-09-19 01:56:51 -0500

roslaunch is supposed to be used with XML launch files. However you attempting to launch a Python script.

To run Python scripts and binary executables use rosrun instead. It also might be necessary to add 'executable' flag to that script with:

$ chmod a+x pt_keyboard.py

Otherwise rosrun will not run the script.

edit flag offensive delete link more
-1

answered 2013-09-19 02:44:59 -0500

mike.sru gravatar image

Thanks a lot! That's it ;).

edit flag offensive delete link more

Comments

Great :) But please use Answer form only if you have an answer for your own question. For everything else please use comments.

Boris gravatar image Boris  ( 2013-09-19 02:48:36 -0500 )edit

ok, sorry, I'll pay attention next time.

mike.sru gravatar image mike.sru  ( 2013-09-20 03:56:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-19 00:29:44 -0500

Seen: 495 times

Last updated: Dec 16 '13