- Installing APM Planner for Linux¶
- System Requirements¶
- Download¶
- Install Packages¶
- Start APM Mission Planner¶
- Common problems¶
- Missing desktop icon¶
- Linux & Mac fixes and packages #1148
- Comments
- ustramooner commented Feb 21, 2016
- Building Mission Planner with Visual Studio¶
- Introduction¶
- System Requirements¶
- Install Visual Studio¶
- After your VS installation is complete:В¶
- Getting the Mission Planner source code from Github into your computer¶
- Open the Mission Planner solution in Visual Studio¶
- Building the MissionPlanner¶
- Building the SimpleExample¶
- Editing and Debugging Mission Planner (and Other Tips)В¶
- Using your modified Mission Planner¶
- Submitting your changes for inclusion in Master¶
Installing APM Planner for Linux¶
System Requirements¶
- Ubuntu 16.04 LTS (Xenial Xerus) or equivalent
- 300 MB free space
- Internet connection to use maps
Check the downloads link for other pre-built binaires for other distros and versions. If not available APM Planner 2.0 can be easily built from source for many platforms, for example Arch Linux
Download¶
Download the latest deb file for your machine from
There is a RC-Model repository available for OpenSUSE which contains APM Planner.
Install Packages¶
Open a terminal window and go to the location where you downloaded the .deb file from step 2 and type the following command:
The installation will likely fail because of missing dependencies. These dependencies can be installed with this command:
Then retry the apmplanner installation again:
Start APM Mission Planner¶
Open Terminal windows and run
Or use the link create in your launcher
Common problems¶
If you find the APM Planner 2 is unable to connect to the APM2/Pixhawk, it may be because of the modemmanager package. Uninstall this package by entering the following command into a terminal window:
Missing desktop icon¶
Click on this link to download the apmplanner2.desktop file from github. Set the properties on the file to “Allow executing file as program”, then drag and drop the file to your start bar.
© Copyright 2021, ArduPilot Dev Team.
Источник
Linux & Mac fixes and packages #1148
Comments
ustramooner commented Feb 21, 2016
I’ve been playing around with MissionPlanner to get it working for Linux. I’ve had some luck (not 100% yet) — but I’d like to share my work. It’s not ready for merging yet, but would like to hear some feedback on it. I haven’t dug any deaper into the hidden functionality and layout issues, but it’s usable for me now.
The kind of stuff I’ve worked on is:
- getting xbuild to work (mostly just file naming — case sensitivity)
- got a basic debian packaging system going (which will help with support — i see a lot of issues are due to people using older mono versions or not installing certain packages)
- got a basic mac app & dmg set up
- sqllite — i’m a bit confused how the Mono.Data.SqliteClient package works, as I understand this is old
- I’ve had to delete out the joystick stuff — but the plan would be to abstract it with some yet-to-be-discovered library
- moving out the config and files that are written to to a configuration directory. linux install paths are read-only (and i think this is good practise to not write to your install dir). Using MainV2.UserPath.
bigger issues i’ve come across:
- NumpyDotNet — what’s the plan here — it doesn’t seem to be supported anymore, and is only available on windows. I tried porting it, but got stuck on something with the numerictypes.py
- random lock-ups — this makes it a bit dangerous to fly with so I always have APM Planner ready to go. For example I come across an issue where the screen locks up — i haven’t figured it out exactly but seems to be related to a multi-threaded timing issue with X windows — when putting sleeps in certain places it seems to be better/fixed — several places still have this isssue.
currently left to do:
- sort out joystick code. EDIT: a basic abstraction (but not working as i don’t have a joystick) is done
- be nice to filter the serial devices a bit better (currently it shows all the /dev/tty* devices — where as APM Planner manages to filter down to only more relevant devices).
Looking forward to hearing some feedback!
The text was updated successfully, but these errors were encountered:
Источник
Building Mission Planner with Visual Studio¶
This page is outdated and instructions should be adapted to make it work.
Introduction¶
Mission Planner (MP) is an open source ground station developed in C# primarily for use on Windows/linux computers (although it can be run on Mac using mono). This is the most commonly used ground station as it provides the most complete functionality for vehicle setup as well as pre-flight mission planner, in-flight monitoring and post flight log file analysis.
This page provides instructions on how you can build the Mission Planner software on your own machine using MS Visual Studio 2019 which may be useful if you wish to make changes for your own use or improvements for the community. Building the mission planner may also help as a guide in case you plan to build your own custom ground station development.
Some warnings before you dive in:
- Use your modified / complied version of Mission Planner at your own risk.
- Mission Planner is a very complex including and making changes is not for the faint of heart. Here are the basic skills you will need to make reasonable progress with MP changes:
- C# programming skills and experience (at least or C++ experience).
- Experience with Microsoft Visual Studio (VS) development environment. MP is not the application to begin learning VS.
- Experience using Windows API (Application programming Interface) — including understanding of streams, processes, threads.
- Support for Visual Studio, programming in C# and Windows API may not be forthcoming from the DIY Drones community. You will need to get that support from other sources.
System Requirements¶
Here is what you will need.
- Windows 10. Sorry earlier versions no longer work. Windows 7 etc will NOT work.
- Sufficient disk space, memory, processor power to comfortably run Visual Studio (details below)
- An Internet connection.
- Visual Studio 2019 community edition (You must use version 16.8.x older versions have problems building/editing)
Install Visual Studio¶
The first step is to get Microsoft Visual Studio Community 2019installed and working in your Windows system.
- Download and install MS Visual Studio 2019 Community Edition which can be found here.
- During the install Process, you will be prompted to install optional “workloads”, at this stage, you must select:
- “.NET desktop development”
- “ASP.NET and web development”
- “Universal Windows Platform developement”
- “Mobile development with .NET”
- “.NET Core cross-platform developement”
- Reboot your PC
- Start Visual Studio from the Start Menu
After your VS installation is complete:В¶
- Navigate to “Tools” Menu -> “Get Tools and Features” -> (wait for page load) -> Workloads -> Summary ( right of screen) -> then tick the tickbox labeled “.NET desktop development” “ASP.NET and web development” “Universal Windows Platform developement” “Mobile development with .NET” “.NET Core cross-platofrm developement” ( leaving other tickboxes as-is) -> then click “Modify” button at bottom. wait for download/install to complete.
- You might like to test your installation on a simple “Hello World” application, or the “SimpleExample” described below.
- TIP: By default it is installed here: “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community»
Getting the Mission Planner source code from Github into your computer¶
The Mission Planner source code is stored in GitHub. In general you can follow the instructions for the ardupilot flight code except that you should use the https://github.com/ArduPilot/MissionPlanner repository in place of the ardupilot repository. You could clone the git repo to (for example) c:\MissionPlanner\ but the exact folder is not critical. After cloned the repo, don’t forget to update submodules. Go to the folder where you cloned the repo and issue a git submodule update –init –recursive command.
Open the Mission Planner solution in Visual Studio¶
Building the MissionPlanner¶
Goto Build > Build Solution and to debug Goto Debug > Start Debugging
By default visual studio will compile all projects and their dependencies as part of a build.
Building the SimpleExample¶
The “SimpleExample” solution is available as a near minimal application to demonstrate how a C# program can connect to a vehicle and cause it to arm or disarm. This example has many fewer dependencies than the full Mission Planner and is simpler to build and understand.
Open the solution from Visual Studio by selecting File >> Open >> Project/Solution, and in the MissionPlanner code directory select ExtLibs / SimpleExample.sln ( close the MissionPlanner solution first if you have that open )
Ensure the program can be build successfully by selecting Build >> Build Solution.
After first checking that you can connect to your flight controller and arm it with the regular mission planner, disconnect the regular Mission Planner and then press “Start” to run the application in debug mode. When the “Form1” pops up, select the COM port, the baud rate (probably 115200) and press Connect. If it successfully connects, press Arm/Disarm to attempt to arm the vehicle.
Note: there is no error checking in the application so if it fails to connect it
Editing and Debugging Mission Planner (and Other Tips)В¶
Editing and debugging details are beyond the scope of this Wiki. Debugging may result in some warnings. You should learn what they mean and take the necessary steps to resolve them if that is the case. Here is a simple debugging example to get you started.
Do not (yet) connect your AutoPilot Hardware ( Pixhawk, etc ) to the compiled version of MP. You must first copy some .xml files to the bin/debug folder. See details below.
First be sure VS is configured for debug (versus release) Set this in the top menu tools area or the configuration manager.
Select menu DEBUG, Start Debugging. (Or, press F5). Mission Planner should run as you normally see it. However, some important configuration files are missing so connection to the AutoPilot Hardware ( eg Pixhawk, etc ) is not recommended at this time.
If after “Start Debugging” the program loading hangs in the splash screen and you see this message: “Managed Debugging Assistant вЂLoaderLock’ has detected a problem …… “’ and/or the debugger has paused at the line Application.Run(new MainV2()); in ArduPilotMega.Program then do this:
Select [Debug], [Exceptions]. Expand the [Managed Debugging Assistants]. Uncheck the вЂLoader Lock’ check box
Close MP. (Or, select menu DEBUG, Stop Debugging in VS).
Next you can try setting a break point.
- Expand the MissionPlanner project in the VS Solution Explorer so you see the objects included.
- Scroll down to MainV2.cs, right click that object and select View Code.
- In the code window for MainV2.cs, scroll down to the line “public MainV2” then to one of the first code lines after that ( currently it is a log.Info(“…”); line ) .
- Click in front of that line (In the dark gray bar on the left) to set a break point (red circle).
- Start Debugging (press F5).
- You will see the normal MP start up windows up to the Splash window but then it will stop running. You have hit the break point. Visual Studio will show the code and the break point will be highlighted. Note that you cannot move the splash screen so you may need to relocate the VS window to see the break point.
- Move your mouse over different variables and objects in the code. You will see the current values of many or the items.
- Press F5 and Mission Planner will continue loading.
Further details on editing and debugging are left to the user.
Using your modified Mission Planner¶
If you make changes to Mission Planner, you will probably want to make use of your version. Here we will give you some preliminary information to do that. You can use your local compiled version but the compiled output files are located in different places in VS and some additional steps are required. There are configuration files specific to your installation of Mission Planner that are not included in the Git hub download that are only provided in the Mission Planner installation package. You will need to copy these to the correct area in the folder you are using for the Visual Studio project. Here are the steps that will get you started.
Use your modified complied version of Mission Planner at your own risk.
These steps assume VS is in the debug configuration. [editors]
Details when in Release mode could be added [/editors]
In order for your VS version of MP to function with the APM connected, you will need to copy several files from the folder where MP is installed (C:\Program Files (x86)\APM Planner or C:\Program Files\APM Planner) to the folder where your VS project compiled output is located.
editors: This needs to be made more accurate which files are needed, why etc.
- Copy (don’t move) all xml files (I.E. files with the extension .xml) from the root folder of the MP installation (C:\Program Files\APM Planner) to the bin/Debug folder in the folder where your Visual Studio Mission Planner solution is stored. (the Git hub clone folder). This will setup your compiled version to match the current configuration of your AutoPilot (copter versus plane, other options, etc)
- I.E, if you solution is in folder MPGitClone, then copy the .xml files to MPGitClone\bin\Debug. Some will copy without notice, but some will ask you if you want to replace the existing file. Replacing all seems to work but you should investigate further to be sure you can use MP for real life situations before you do so.
- If you build Mission Planner in Release mode, then the files should be copied to the bin/Release folder. This has not been tested at this time.
Here are some other tips:
- Location of Logs saved when using your version will be in the /bin/Debug or bin/Release folder. This can be changed with Mission Planner 1.2.63 and later versions.
- If you want to make a shortcut to run your version of Mission Planner without running Visual Studio, create the shortcut to point to the program ArduPilotMegaPlanner10.exe in the bin/Debug or bin/Release sub folders.
At this point your local version of MP should be working. You should be able to connect to your APM, Flight Data including status should work, Configuration should bring up you APM parameters, Terminal should work including saveing and browsing logs. Flight Planner should also work. As mentioned before, use your modified version at your own risk.
Submitting your changes for inclusion in Master¶
Generally the advice is the same as for the ardupilot flight code ( instructions here ) but here is a very short summary of the steps:
- Sign up a member of Git hub
- Create a personal Fork of the Mission Planner by going to https://github.com/ArduPilot/MissionPlanner and click on Fork (Upper right corner area) This creates a copy (fork) of Mission Planner files in your Git Hub account.
- Clone your personal repo (created with the Fork above) to your PC
- Create a new branch in your repo and commit your changes and push these back to GitHub (these will only go into your repo on GitHub).
- Use the GitHub web page to create a Pull Request from your branch
- The owner of Mission Planner (Michael Oborne) will receive an email notifying him of your Pull Request. He will most likely review, provide feedback and if he accepts the commit it will be added to master.
© Copyright 2021, ArduPilot Dev Team.
Источник