Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. =====Getting started with DUNE, Neptus and Git===== ==== Prerequisites ==== You need to use a Linux computer. I prefer Linux Mint on a Dual boot computer, but a virtual computer is also an alternative. In your linux terminal, you need to get some basic tools. (The commands are for debian-based distros like Ubuntu) <code> sudo apt-get install build-essential sudo apt-get install eclipse eclipse-cdt g++ gcc openjdk-8-jdk sudo apt-get install git cmake sudo add-apt-repository ppa:webupd8team/java sudo apt-get install oracle-java8-installer sudo apt-get update </code> ==== DUNE ==== All code and shared files are placed on a gitlab repository. You can find it here: [[https://gitlab.com/aurlab|AURlab Git]]. To get the code yourself, you clone it into your chosen folder. <code> mkdir aurlab cd aurlab git clone https://gitlab.com/aurlab/lsts_toolchain/dune.git cd dune mkdir build cd build cmake ../dune make -j8 </code> Now, to import the project to Eclipse, open Eclipse for C++. Press //file//->//import//->//general//->//Existing Projects into Workspace//.Select root directory: //uavlab/build//. Now a project will appear in the box for projects, named DUNE-Release. Press //Finish//, and the project appears in your Project Explorer. To find out more about DUNE, read [[https://lsts.fe.up.pt/toolchain/dune|LSTS Toolchain/Dune]] ==== Neptus ==== Now, clone and build Neptus. <code> cd aurlab git clone https://gitlab.com/aurlab/lsts_toolchain/neptus.git cd neptus ant </code> When it is build, you can open Neptus by typing <code> ./neptus </code> Once Neptus is opened, to see your vehicle, you click //Consoles/Open// and choose //ntnu/fixed-wind.ncon// or another if you're not working on a fixed-wing vehicle. ==== Working with DUNE ==== To start DUNE, you need to choose a configuration file (that is, a .ini-file). These files are placed under the // /etc//-folder. Before you write anything in DUNE, make sure you make your own //branch//. This is your own git version of the code, read more on [[dev:git|Developing with GiT]]. <code> cd aurlab cd dune git checkout -b feature/your_descriptive_branch_name </code> Now you should have moved to your own branch. Every time you make something new on your branch, or do some major updates (minimum once a day), you should commit your changes. You should have your own config file, and you make it by right-clicking on the // /etc//-folder and choose //new//->//File//. Name your file //name.ini//. In your config file you can include the tasks that you need to run, and specify the parameters for each task. To run DUNE using your specific config file, you write <code> cd build cmake ../dune ./dune -c name.ini </code> To [[dune:debugging_with_gdb|compile with debugging symbols for GDB]], add the flag `-DDEBUG=true` to cmake. To compile [[dune:unit_testing|the unit tests]], add `-DTESTS=true`. It is also possible to see the available cmake flags and change their values in a simple GUI by running ''%%ccmake ../dune%%'' in the build directory (requires ''%%sudo apt-get install cmake-curses-gui%%''). A lot of the tasks are specified to work either in //Hardware// or in //AP-SIL// or simulation mode. Then, you write <code> ./dune -c name.ini -p Hardware </code> or, of course, //AP-SIL// instead of //Hardware//. When DUNE starts running, the messages you get tell you which tasks are starting, and whether there are any warnings or errors. To make your own task, type <code> cd dune/user python ../programs/scripts/dune-create-task.py . "Your Name" Your/Task/name </code> To make sure your new tasks or files are compiled, type in your terminal: <code> make rebuild_cache </code> It could be wise to follow the tutorial on [[https://github.com/LSTS/dune/wiki|LSTS Dune Tutorials]]. The tasks communicate using IMC Messages. Read more about them on [[software:imc|IMC]]. To make debugging easier, you can code your printouts as //err//, //war//, //inf// and //cri//: <code> war("This is a warning message. You don't need any endline."); </code> You can also use the debug symbols //debug//, //trace// and //spew//. ==== Cross-compiling dune ==== To be able to use dune on an on-board platform, you need to cross-compile it and have a version of Glued on your on-board computer. See [[software:glued|Glued]] for description of how this is done. dev/gettingstarteddunegitneptus.txt Last modified: 2023/09/06 11:21by 127.0.0.1