ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
For other noobs like me: I was having trouble even using a class defined in another module of the _same_ package. This is what worked;
[catkin_ws_path]/src/my_package/src/my_package/__init__.py
[catkin_ws_path]/src/my_package/src/my_package/file_checker.py
[catkin_ws_path]/src/my_package/src/my_package/script_im_trying_to_run.py
script_im_trying_to_run.py contains
....
import file_checker.py
....
....
an_instance = ConfigLoader('~/config.txt')
....
2 | No.2 Revision |
For other noobs like me: I was having trouble even using a class defined in another module of the _same_ package. This is what worked;
[catkin_ws_path]/src/my_package/src/my_package/__init__.py
[catkin_ws_path]/src/my_package/src/my_package/\__init__.py
[catkin_ws_path]/src/my_package/src/my_package/file_checker.py
[catkin_ws_path]/src/my_package/src/my_package/file_checker.py
[catkin_ws_path]/src/my_package/src/my_package/script_im_trying_to_run.py
script_im_trying_to_run.py contains
....
import file_checker.py
....
....
an_instance = ConfigLoader('~/config.txt')
....