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

actionlib error

asked 2012-06-04 21:46:58 -0500

Damien90 gravatar image

updated 2012-06-05 05:49:31 -0500

dornhege gravatar image

Hello, I'm new to ROS and am having problems with the actionlib tutorials. After making the directory ./action/move_arm.action with this as the action file;

#goal definition
int32 goalState
---
#result definition
int32[] resultState
---
#feedback definition
int32[] feedbackState

attempting to generate the appropriate files using the command line prompt

$ rosrun actionlib_msgs genaction.py . move_arm.action

I get the following traceback error:

Traceback (most recent call last):
  File "/opt/ros/fuerte/share/actionlib_msgs/scripts/genaction.py", line 133, in <module>
    if __name__ == '__main__': main()
  File "/opt/ros/fuerte/share/actionlib_msgs/scripts/genaction.py", line 72, in main
    os.makedirs(output_dir)
  File "/usr/lib/python2.7/os.py", line 145, in makedirs
    head, tail = path.split(name)
  File "/usr/lib/python2.7/posixpath.py", line 83, in split
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

Is this a python problem? Should it be updated somehow?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2012-06-05 05:13:01 -0500

This is a bug in actionlib_msgs, and you should report it here with a link to this question. It seems the output_dir has no sensible default and/or the -o option is mandatory, but it is never checked whether the user supplies this option. Also, the genaction.py call in the linked tutorial is wrong.

I could make it work with the following command (run inside package learning_actionlib:

rosrun actionlib_msgs genaction.py -o msg/ action/move_arm.action

(BTW, actions use CamelCase by convention, so MoveArm.action would be a better name.)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-04 21:46:58 -0500

Seen: 1,543 times

Last updated: Jun 05 '12