Quick Start

This guide will help you set up your programming environment to successfully command and control Fourier Smart Actuator (FSA) using the FSA Python SDK.

System setup

System requirements

The FSA Python SDK works with most operating systems including:

  • Linux Ubuntu 18.04 LTS

  • Windows 10

  • MacOS 10.14 (Mojave)

Python requirements

FSA Python SDK works with Python 3.8 and above.

Downloads and instructions for installing Python can be found at https://www.python.org/.

Verify your python install is the correct version. Open a command prompt or start your python IDE:

$ python --version
Python 3.12.1

Windows users: There are two common methods for starting the Python interpreter on the command line. First, launch a terminal: Start > Command Prompt. At the command prompt, enter either:

> python.exe

or

> py.exe

The former will directly call the python.exe that is highest priority in the PATH environment variable. (Note you could also supply a full pathname c:\path\to\install\python.exe to directly call the executable).

The latter uses the Python launcher, which by default starts the most recent version of Python installed. You can also optionally pass arguments to the launcher to control what version of python to launch:

py.exe -3.8 (launches Python 3.8)

py.exe -3.12 (launches Python 3.12)

Manage multiple Python environments with virtualenv

This section is optional, but recommended.

Users with multiple python versions, anaconda, etc., are responsible for maintaining separation between those installs. Common failures include using the wrong version of python, installing python packages to the wrong python, or using pip associated with the wrong python. One way to improve the stability of your FSA code and your pre-existing python code is to keep them separate using virtual environments. Here are some tips to working with virtualenv.

  • Install virtualenv.

  • Create a virtualenv, being careful to point at the proper python executable.

  • Activate the virtualenv.

  • Install packages as needed, including FSA SDK.

$ python3 -m pip install virtualenv
$ python3 -m virtualenv --python=/usr/bin/python3 my_fsa_env
$ source my_fsa_env/bin/activate
$ (install packages including fsa SDK, code, edit, execute, etc.)

To exit virtualenv…

$ deactivate

Note: Please ensure the virtualenv was created and uses the correct version of python by starting python after activating the virtual environment.

(my_fsa_env) user@yourcomputer:~/user $ python
Python 3.6.9 (default, Oct  8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Windows users:

> py.exe -3 -m pip install virtualenv
> py.exe -3 -m virtualenv my_fsa_env
> .\my_fsa_env\Scripts\activate.bat
> (install packages including FSA SDK, code, edit, execute, etc.)

Install FSA Python packages

The FSA Python SDK package is available at https://gitee.com/FourierIntelligence/wiki-fsa.

Users can either:

  • git clone https://gitee.com/FourierIntelligence/wiki-fsa.git (recommended)

  • Download a zipfile distribution:

    • Select “Clone or download” from the webpage.

    • Select “Download ZIP”.

    • Unzip the file to your home directory.

Get FSA Run

OK, now that we have properly installed the python packages, successfully used those packages to communicate with FSA, and have downloaded the distribution, let’s get the FSA run.