Developing mycroft_aimar - UMD-AIMAR/documentation GitHub Wiki

Opening mycroft_aimar

Recommended: Download PyCharm. You can edit the Python files with any text editor you like, but using an IDE (Integrated Development Environment) like PyCharm will make it a lot easier.

  1. Open a terminal and navigate to the skills folder inside your mycroft-core installation.
  2. Run git clone https://github.com/UMD-AIMAR/mycroft_aimar.git.
  3. Open PyCharm. From the home screen, choose Open Folder → ~/mycroft_aimar.

Once you open the project in PyCharm, you'll see a lot of errors and red lines under import statements. Follow the next section to fix these.

Setting up Python Interpreter Paths for mycroft_aimar

Go into File → Settings → Project Settings → Project Interpreter. Open the drop-down list of interpreters and click "Show All...". Then click "Show paths for the selected interpreter". This may be a small icon on the right side bar of the window.

Add the following paths:

  • ~/mycroft-core (or wherever you downloaded mycroft-core)
  • /opt/ros/dashing/lib/python3.6/site-packages/rclpy/

Installing Dependencies Inside mycroft-core venv

When running mycroft-core with mycroft_aimar added in the skills, folder, you may encounter an ImportError. mycroft-core runs inside of a virtual Python environment, which has a set of pre-installed packages. mycroft_aimar requires a few packages that don't come with pre-installed. You can install them as follows:

sudo -s
. venv-activate.sh
python -m pip install numpy opencv-python picamera
mycroft-venv-deactivate

Possible Bugs

Unable to remove read-only status

This happens if you accidentally ran mycroft-core while in a root shell. Mycroft changes ownership of all the files to the user who runs ./start-mycroft.sh. You can change ownership back to yourself by starting a fresh terminal and running ./start-mycroft.sh.