Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| documentation:skiros:troubleshooting_skills [2023-03-16 09:27] – Pontus Rosqvist | documentation:skiros:troubleshooting_skills [2023-06-26 14:42] (current) – [Detect and Fix Import Error] Pontus Rosqvist | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Troubleshooting Skills ====== | ====== Troubleshooting Skills ====== | ||
| + | |||
| + | This page will refer to example skills from [[https:// | ||
| Your skill is not found by SkiROS, now what? Here are some basic things to make sure are correct before you give up on ever working with SkiROS again. | Your skill is not found by SkiROS, now what? Here are some basic things to make sure are correct before you give up on ever working with SkiROS again. | ||
| - | * Is the skill in the skill list of the launch file? | + | |
| - | + | * Is the script in a package that is imported by the launch file? | |
| - | * Is the script in a package that is imported by the launch file? | + | * Does the script end in .py? |
| - | + | * Is there an empty _ _init_ _.py file in the same directory as the script? | |
| - | * Does the script end in .py? | + | * Is there an import error in the script? |
| - | + | * Is there a syntax error in the script? | |
| - | * Is there an empty _ _init_ _.py file in the same directory as the script? | + | |
| - | + | ||
| - | * Is there an import error in the script? | + | |
| - | + | ||
| - | * Is there a syntax error in the script? | + | |
| ==== Expected File Structure ==== | ==== Expected File Structure ==== | ||
| Line 19: | Line 16: | ||
| <cli> | <cli> | ||
| └─ catkin_ws | └─ catkin_ws | ||
| - | | ├─ src | + | |
| - | | | | + | | |
| - | | | | + | | |
| - | | | | + | | |
| - | | | | + | | |
| - | | | | + | | |
| - | | | | + | | |
| - | | | + | └─ ... |
| - | └─ ... | + | |
| </ | </ | ||
| - | Where your skill lies in <skill package 1>, this package should be a ROS package which looks like the package that can be found [[https:// | + | Where your skill lies in <skill package 1>, this package should be a ROS package which looks like [[https:// |
| - | + | ||
| - | In the src file of the package the following structure is excpected | + | |
| <cli> | <cli> | ||
| Line 38: | Line 32: | ||
| ├─ <folder 1> | ├─ <folder 1> | ||
| | ├─ _ _init_ _.py | | ├─ _ _init_ _.py | ||
| - | | ├─ <file 1>.py | + | | ├─ < |
| | └─ ... | | └─ ... | ||
| ├─ <folder 2> | ├─ <folder 2> | ||
| | ├─ _ _init_ _.py | | ├─ _ _init_ _.py | ||
| - | | ├─ <file 1>.py | + | | ├─ <file 1 in folder 2>.py |
| | └─ ... | | └─ ... | ||
| └─ ... | └─ ... | ||
| Line 71: | Line 65: | ||
| ==== Detect and Fix Import Error ==== | ==== Detect and Fix Import Error ==== | ||
| - | An easy way to find import errors is to put a minimal skill in the same directory as the skill that does not get found by SkiROS, a good minimal skill can be found [[https:// | + | An easy way to find import errors is to put a minimal skill in the same directory as the skill that does not get found by SkiROS, a good minimal skill can be found in [[https:// |
| - | + | ||
| - | * Rename the minimal skill. | + | |
| - | + | ||
| - | * Add the minimal skill to the skill list '' | + | |
| - | + | ||
| - | * Run the simulation/ | + | |
| - | + | ||
| - | * * If the minimal skill does not load the _ _init_ _.py might be missing or it's something else. | + | |
| - | * * If the minimal skill loads there might be a syntax error or import error in the skill you're writing. | + | |
| + | * Add the minimal skill to the skill list before the skill that does not get loaded. | ||
| + | * Run the simulation/ | ||
| + | * If the minimal skill does not load the _ _init_ _.py might be missing or it's something else. | ||
| + | | ||
| - | To then determine | + | To then determine |