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

Running cob_script_server

asked 2011-04-28 21:13:09 -0600

weissenrosen gravatar image

updated 2011-04-29 04:24:16 -0600

kwc gravatar image

Hi all..

I've been following closely the cob python script tutorial on this site.

However, I always get this error when i run it:

rosrun cob_script_server

/opt/ros/diamondback/stacks/cob_apps/cob_script_server/scripts/ line 5: syntax error near unexpected token 'cob_script_server'' /opt/ros/diamondback/stacks/cob_apps/cob_script_server/scripts/ line 5: roslib.load_manifest('cob_script_server')'

Can someone tell me what is going on and how can i fix this?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-04-28 22:01:45 -0600

As it is a syntax error I suggest you copy-paste the source into your question.

I also notice you seem to be editing files in /opt/ros when you should work somewhere in your home directory. Create a directory somewhere in your home and add export ROS_PACKAGE_PATH=~/the_dir_you_created:$ROS_PACKAGE_PATH to the end of your ~/.bashrc. However, this is probably not the source of the problem.

edit flag offensive delete link more

answered 2011-04-29 04:25:18 -0600

kwc gravatar image

updated 2011-04-29 04:25:27 -0600

Looks to me like your script is probably missing

#!/usr/bin/env python

as the first line. I would also look at Felix's answer for suggestions on where to do these tutorials.

edit flag offensive delete link more

Question Tools


Asked: 2011-04-28 21:13:09 -0600

Seen: 398 times

Last updated: Apr 29 '11