Installing FlytOS Lib on Mac Running Linux


#1

Hello All,

I installed FlytSim (from Docker) following the instructions and have registered my simulated drone. I believe I have everything ready to go except, I do not have the flyt_api installed on my Mac Running Linux and cannot find how to do so in the documentation.

In short,
I startup the simulation. by running the ./start.sh script… Gazebo and the flytConsole open up. Drone is connected.

I navigate to the sample app folder and run “python demoapp1.py”, as shown in the demo app video and recieve an ImportError saying “no module named flyt_python”

I go back to try to find documentation and the closest thing I could find is the following link:

http://docs.flytbase.com/docs/FlytOS/GettingStarted/InstallDepsFlytpod.html#install-dependencies-flytpod

The beginning set of instructions look like they could work on any linux running ubuntu but then it asks to download the deb package for my hardware and I am not sure if there is one. It might be one of the ones outlined at the bottom of the following link but I want to be sure - to avoid corrupting my linux.

https://my.flytbase.com/downloads/flytos/

I would appreciate any help.

Thank you in advance,
Best,

Chris


#2

I figured it out!

The python file “demoapp1.py” has to be run from within a shell of docker. I.e. in the terminal that popped up after running “./openshell.sh” (remember to be in the same directory as the file when running it.)

My questions now are:

  1. Howcome running “python demoapp1.py” works in the docker shell but not in my regular terminal?
  2. If I make my own custom app, and I want to simulate it, does it also have to be in the same workspace (flyt/flytapps/onboard) as the sample apps and opened from the docker shell?
  3. How does one navigate to the sample apps folder through terminal/regular folders? I cannot even seem to find the “flyt” folder unless I am in the docker shell.

Best regards,

Chris


#3

Hi @scherzsky,

How did you navigate to sample app folder if you were not inside Docker shell in the first place!

FlytSim is installed and running inside Docker. Outside Docker, your host-OS knows nothing about FlytSim, and that’s why you recieved the error - “no module named flyt_python”.

You should place your python script in this folder: /flyt/userapps/onboard_user/install. Click here to know more.

Since, FlytSim is installed inside Docker, there is no other way of accessing the folder than within Docker shell. For the same reason we have added a web-based IDE inside the FlytSim docker. To access it,

  • run start.sh script
  • open any browser in your laptop
  • go to URL: http://localhost:9000
  • It would open an IDE, which would ask for username and password,
    • username - flytos
    • password - flytos

You can access files and folders easily from within the IDE.