Skip to content

Eagle-Enterprises/development-environment

Repository files navigation

eagle-development-environment

Eagle Developer

This repository contains the configuration of the Eagle Enterprises Development Environment used for building UAV Simulation and Training Environments.

If there is anything wrong with this repository (documentation needed / broken things), please use the Bug Template to report the issue

Dependencies

This is mandatory to set up the Development Environment

  • Vagrant: 2.4.1

    After installing vagrant, restart the device, then install these vagrant plugins:

    • vagrant-hostmanager
      • vagrant install vagrant-hostmanager
    • vagrant-vboxguest
      • vagrant plugin install vagrant-vbguest
  • VirtualBox: 7.0.8

  • git: version 2.41.0.windows.2

  • Integrated Development Environment (of your choice)

    • VSCode (Adam's personal favorite; I have workspace settings and my extensions that I used included )
    • Eclipse
    • JetBrains
    • Notepad++(If you're up to a challenge)
    • VIM (If you're a masochist)

Set Up Guide

  1. Install Dependencies Listed Above

  2. Clone this repository to a folder on your personal computer

  3. Run the following command from within the cloned repository (i.e. /eagle-development-environment/): vagrant up

  4. Wait for the Vagrant Command to bring up the Virtual Machine

    1. It may take a few minutes, depending on your machine and internet connectivity

    2. Time snapshot of mine

      1. real 2m32.230s
      2. user 0m0.000s
      3. sys 0m0.016s
    3. For example, one machine was ready after the terminal showed the following message:

      VirtualBox Guest Additions: Building the modules for kernel 6.5.0-21-generic. update-initramfs: Generating /boot/initrd.img-6.5.0-21-generic VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted or 'rcvboxadd reload' triggered VirtualBox Guest Additions: reloading kernel modules and services VirtualBox Guest Additions: kernel modules and services 7.0.14 r161095 reloaded VirtualBox Guest Additions: NOTE: you may still consider to re-login if some user session specific services (Shared Clipboard, Drag and Drop, Seamless or Guest Screen Resize) were not restarted automatically

  5. Bring up the VirtualBox UI and click the eagle-development-environment VM.

  6. Login to the Virtual Machine

    1. uname: vagrant
    2. password: vagrant

Note You can alter the vb.memory value in the Vagrantfile based on how much RAM your personal machine has. I wouldn't give it more than %50 of what your system max is

VM Usage Guide

  1. To start the machine run the following command from within the directory of this cloned repository (i.e. /eagle-development-environment/): vagrant up
  2. To open Mission Planner:
  3. Open the Terminal
  4. Click on the "Show Apps" (grid) button on the lower left corner, which will display the apps menu.
  5. Use the search bar at the top to search for "Terminal".
  6. Click on the resulting option.
  7. Type in /opt/MissionPlanner/MissionPlanner.exe into the terminal.
  8. To shutdown the virtual machine, run the following command on a new terminal in VS Code: vagrant halt. Virtual Box should show the machine in a "Powered Off" state.

VM Mission Planner Usage Guide

  1. To open Mission Planner in the VM use the following command: sudo mono /opt/MissionPlanner/MissionPlanner.exe

Git Guide

Git Useful Commands

git clone <url> -------------------- Clones a git repository. URL can be found by clicking the green code button on the repository webpage

git status ------------------------- Shows you the status of your local

Useful Links

Vagrant Guide

Vagrant Useful Commands

vagrant up -------------------------------- Brings up the Virtual Machine according to the Vagrantfile in the Working Directory

vagrant ssh ------------------------------- Secure Shell into the Virtual Machine

vagrant halt ------------------------------ Brings down the Virtual Machine according to the Vagrantfile in the Working Directory DO THIS BEFORE SHUTTING DOWN YOUR MACHINE

vagrant reload ---------------------------- Will reload the Virtual Machine ( can pass it --provision or --no provision to force it to be provisioned, which means it will install all dependencies)

vagrant destroy --------------------------- Will destroy the Virtual Machine to be brought up with another vagrant up Any work not saved in the /vagrant directory will be lost

VS Code Extensions

This is completely optional, just if you're curious as to which I'm using:

  • In Bash: cat vs-code-extensions-list.txt | xargs -L 1 code --install-extension

  • In PowerShell: Get-Content vs-code-extensions-list.txt | ForEach-Object { code --install-extension $_ }

Troubleshooting Guide

Does VirtualBox work in M1 Macs?

  • It has been found that VirtualBox does not operate correctly in Mac PCs with an M1 chip. For more information please visit this Reddit Thread.

Error: You need to fork this repository

  • If an error occurs in GitHub or in your code editor such as "Sorry, you're not able to edit this repository directly -- You need to fork it and propose changes from there instead", please ask access to the repository by sending a direct message via Discord to the repository owner. Once access has been granted by the owner, an email will be sent with an invitation to email linked to your GitHub account. Please click the "Accept Invitation" button on the email. This should resolve the issue.

Vagrant is not working

  • If you just installed Vagrant, the device on which it was installed will need to be restarted before the software is usable.
  • Otherwise, please repair vagrant by opening the installer and clicking "Next" > "Repair".
  • You can also try to reinstall vagrant

Vagrant up is taking forever or not working

  • The time that the vagrant takes to load the virtual machine is heavily dependent on your machine's hardware. It can definitely take much longer than expected.
  • Make sure your machine has at least 4 MB available of RAM (memory) to provide to the Box. If your machine has less than that, modify the vagrant file vb.memory value to be less than 50% of your machine's RAM.

Virtual Box display seems pixelated/flickering/fuzz/static

  • For windows, follow these instructions. You may need to click aditionally on "Change high DPI settings". Then, shut down the VM as per the VM Usage Guide and restart VirtualBox.

Mission Planner does not start up or has errors

  • Ensure the VM has at least 4 processors.
    • Make sure the VM is off.
    • Go to VBox and select the "Settings" of the VM.
    • Go to System > Processor.
    • Change the number of processors to a more appropriate number.

Q & A

How does the C2 repository connect to the VM?

  • To get any repos into the VM, please clone them in the /eagle-development-environment directory corresponding to this repository on your host system (where the vagrant file is). The repository directories copied there will be bidirectionally synced to the VM.

Is the developer environment a shared environment or hosted locally?

  • The developer environment VM is local to each host device.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors