Difference between revisions of "Installation/Windows10"
m |
|||
(11 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
This page describes the installation of paparazzi on Microsoft Windows10.<br /> | This page describes the installation of paparazzi on Microsoft Windows10.<br /> | ||
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's ''' | There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's '''less efficient''' to use paparazzi on Windows OS but it could be helpful in some cases.<br /> | ||
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.<br /> | Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.<br /> | ||
=Installing Ubuntu on windows= | =Installing Ubuntu on windows= | ||
First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version. | First you need to install Ubuntu on Windows 10. (Ensure you are using a '''64-bit''' version of windows 10, since it cannot be run on a 32-bit version. | ||
Start an Administrator PowerShell, and run this command: | |||
wsl --install | |||
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install | |||
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.<br /> | Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.<br /> | ||
Line 42: | Line 29: | ||
With this step complete, you'll find yourself at the Ubuntu bash command line.<br /> | With this step complete, you'll find yourself at the Ubuntu bash command line.<br /> | ||
=Installing Paparazzi= | |||
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html | |||
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide. | |||
=Graphical Interface= | |||
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:<br /> | |||
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you | |||
Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”) | Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”) | ||
[[File:Gtk error.png|450px]] | [[File:Gtk error.png|450px]] | ||
It is because it wants to run the graphical Paparazzi Center. | It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less. | ||
* '''Step One: Install an X server''' | * '''Step One: Install an X server''' | ||
There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] | There are several different X servers you could install on Windows, [https://sourceforge.net/projects/xming/ Xming] and [https://sourceforge.net/projects/vcxsrv/ vcxsrv] are both recommended. | ||
You may prefer [https://sourceforge.net/projects/vcxsrv/ Vcxsrv] as the applications looks better on it. | |||
Download it and install it on your Windows 10 PC.<br /> | |||
After the installation, launch it <strong>with the access control disabled</strong>. It won't work otherwise.<br /> | |||
<span style="color:#FF0000">'''Hint:'''</span> Every time you want to run a graphical interface from Ubuntu, make sure that Vcxsrv (or Xming) is running. <br /> | |||
<span style="color:#FF0000">'''Hint:'''</span> Every time you want to run a graphical interface from Ubuntu, make sure that Xming is running. <br /> | |||
Line 74: | Line 58: | ||
To do this, run the following command in the Bash environment: | To do this, run the following command in the Bash environment: | ||
export DISPLAY=:0 | export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0 | ||
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.<br /> | This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.<br /> | ||
You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses. | You can also install [https://wiki.gnome.org/Apps/Gedit gedit], to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses. | ||
sudo apt-get install gedit | sudo apt-get install gedit | ||
<br /> | <br /> | ||
After that you can launch Paparazzi. (Or use the [[Paparazzi_Center/Evolutions#New_Paparazzi_Center|new Paparazzi center]] which works seamless on windows) | |||
cd ~/paparazzi && ./paparazzi | |||
[[File:Paparazzi on windows.png|700px]]<br /> | [[File:Paparazzi on windows.png|700px]]<br /> | ||
Line 96: | Line 81: | ||
[[File:Stop windows.png|700px]]<br /> | [[File:Stop windows.png|700px]]<br /> | ||
=Programming Autopilot= | =Programming Autopilot= | ||
Line 113: | Line 97: | ||
ST-Link Utility.png|ST-Link Utility | ST-Link Utility.png|ST-Link Utility | ||
</gallery> | </gallery> | ||
= A Better Terminal = | |||
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, '''very useful''' great terminal. | |||
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701 | |||
=Using Telemetry= | =Using Telemetry= | ||
After you connect your telemetry to the PC, usually it's recognized under COMx in | After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.<br /> | ||
In the Ubuntu, you can access it by "''/dev/ttySx''". For example, COM15 on windows can be accessed on "''/dev/ttyS15''" on Ubuntu.<br /> | In the Ubuntu, you can access it by "''/dev/ttySx''". For example, COM15 on windows can be accessed on "''/dev/ttyS15''" on Ubuntu.<br /> | ||
Latest revision as of 04:19, 26 April 2022
Intro
This page describes the installation of paparazzi on Microsoft Windows10.
There are many Windows users who like to use paparazzi on this popular OS. Be-aware it's less efficient to use paparazzi on Windows OS but it could be helpful in some cases.
Since Microsoft introduced the possibility of installing Ubuntu on windows 10, you can run Paparazzi on it with some little efforts.
Installing Ubuntu on windows
First you need to install Ubuntu on Windows 10. (Ensure you are using a 64-bit version of windows 10, since it cannot be run on a 32-bit version. Start an Administrator PowerShell, and run this command:
wsl --install
Get more details in the microsoft documentation if needed: https://docs.microsoft.com/windows/wsl/install
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.
When launched for the first time, Ubuntu will inform you that it's ‘Installing' and you'll need to wait a few moments.
When complete, you'll be asked for a username and password specific to your Ubuntu installation. These don't need to be the same as your Windows 10 credentials.
With this step complete, you'll find yourself at the Ubuntu bash command line.
Installing Paparazzi
You can now install Paparazzi with the regular procedure: https://paparazzi-uav.readthedocs.io/en/latest/quickstart/install.html
It should now works if you have Windows 10 build 21364 or higher. If you don't, continue reading this guide.
Graphical Interface
Ubuntu on windows 10 is only command line and there is no GUI. So after finishing this step, you likly get an error like this:
Fatal error: exception Gtk.Error(“GtkMain.init: initialization failed\nml_gtk_init: initialization falied”)
It is because it wants to run the graphical Paparazzi Center, but there is no GUI on the Ubuntu for Windows at that moment. Lucky us, there is a way to have Graphical interface non the less.
- Step One: Install an X server
There are several different X servers you could install on Windows, Xming and vcxsrv are both recommended.
You may prefer Vcxsrv as the applications looks better on it.
Download it and install it on your Windows 10 PC.
After the installation, launch it with the access control disabled. It won't work otherwise.
Hint: Every time you want to run a graphical interface from Ubuntu, make sure that Vcxsrv (or Xming) is running.
- Step Two: Set Your Display Environment Variable
Now, you’ll need to set the “DISPLAY” environment variable to point at the X server running on your Windows 10 PC. If you don’t do this, graphical applications will simply fail to launch.
To do this, run the following command in the Bash environment:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0
This setting only applies to your current Bash session. If you close the window, Bash will forget it. You’ll have to run this command each time you reopen Bash and want to run a graphical application.
You can also install gedit, to be able to edit your aircraft files (airframe, flight plan, etc) from within the center, since it is the default app that Paparazzi center uses.
sudo apt-get install gedit
After that you can launch Paparazzi. (Or use the new Paparazzi center which works seamless on windows)
cd ~/paparazzi && ./paparazzi
Right now you can use Paparazzi for Simulation.
When you build for an aircraft, the processes will end, but it may not automatically remove the indicator. You may need to press “Stop/Remove All Processes” button.
Programming Autopilot
Right now, to program the autopilot, you should copy the HEX/BIN file manually to your windows OS, You can find your ubuntu home directory files in the following directory:
C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs
DISTRO_FOLDER for Ubuntu is:
CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
Then use a windows program to upload firmware to the autopilot
(For example DfuSe or STM32 ST-LINK Utility for ST microcontrollers)
A Better Terminal
The opensource Terminal application for Microsoft one can have multiple tabs and easily switch between Bash, Powershell and CMD, very useful great terminal.
Find it here https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701
Using Telemetry
After you connect your telemetry device to the PC, usually it's recognized under COMx in Windows. Find the port number first.
In the Ubuntu, you can access it by "/dev/ttySx". For example, COM15 on windows can be accessed on "/dev/ttyS15" on Ubuntu.
First you need to give it the proper permissions. Run this command
sudo chmod 666 /dev/ttyS15
Replacing 15 with the correct number. Now in the Paparazzi center you can use this port to connect to the aircraft using Paparazzi link application.
sw/ground_segment/tmtc/link -d /dev/ttyS15