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

Revision history [back]

In order to complement @alee answer, the best practice (up to my knowledge) is:

  • Scripts should go in a scripts folder.
  • Python code (classes, etc) which are not scripts should go into src/<pkg_name>/. Then, in your scripts (or python code) which are not necessarily in the same package, you can import using from <pkg_name> import foo.