-
Clone this repo
-
This project requires argos3 (https://github.com/ilpincy/argos3) to be installed. The version to work with is:
commit c04be869311801976a83613552e111b2eef4dd45 (HEAD -> master, origin/master, origin/HEAD) Author: Michael Allwright <allsey87@gmail.com> Date: Wed Dec 8 13:44:48 2021 +0100 Fix the left-right wheel offset in the 3D dynamics model for the Pi-Puck (#196)
Clone, checkout the right version, and create a branch for it:
git clone https://github.com/ilpincy/argos3 cd argos3 git checkout c04be869311801976a83613552e111b2eef4dd45 git switch -c mns3.0
-
Before compiling and installing argos, it is highly recommended to delete old version of argos installation from your system. To do that, check /usr/local, which is the default place where argos installs itself. To check:
cd /usr/local find . -name "*argos*"
All the files that contains the name argos will be listed. Check carefully to delete only argos files but not other system files. Usually, something like:
rm -rf */argos3
will do, but again, check carefully.
After removing old version of argos installation, and before compiling our version, you may want to apply some patches for argos3 from folder
argos3-patch
, depends on what do you need. For mns3.0 experiments, the patches that are directly underargos-patch
are essential. Some patches inbackup
folder might also be useful for some debug purposes.Below are descriptions for these patches.
(To be continued)
-
AddATagOnTheDrone.patch
is for 3D drone experiments. It adds a tag on top of the drone. -
EnlargeDroneSight.patch
is for 3D drone experiments. It makes the drone sees farther and wider. -
NormalizeDroneOrientationError.patch
is for fixing a small bug of the drone in argos. It is useful when you need to rotate the drone acrossing the edge of Pi. -
BuilderbotTagDetectionNumber.patch
is for builderbot experiments. It fixes bugs when builderbot cameras sees a pipuck tag. -
DroneModelAppearing.patch
is for make the drone looks nicer and closer to the real drone. -
QTOpenglCameraAndMouseOperation.patch
is for tweaking argos operations. It makes argos mouse operation better for 3D experiments.
To apply all the essential patches, you can simply :
cd argos3 git apply ../mns3.0/argos-patch/*.patch git commit -m "Apply the patches for mns3.0"
or apply them one by one
cd argos3 git apply ../mns3.0/argos-patch/xxx.patch git commit -m "Apply the patch for xxx"
-
-
To compile and install argos, follow the instructions of argos. Here is a guideline, you may need to change some details based on your platform and system setup.
cd argos3 mkdir build cd build cmake -DARGOS_BUILD_NATIVE=ON \ -DARGOS_DOCUMENTATION=OFF \ ../src make -j 32 sudo make install
-
After installing argos3, you are ready to build mns3.0 repository. Assuming you are at
argos/build
, and you cloned argos and mns3.0 side by side, run the following commands.cd ../../mns3.0 mkdir build cd build cmake ../src make argos3 -c testing/test_00_environment/vns.argos
NOTE: consider using
cmake -DARGOS_BREW_QT_CELLAR=$(brew --cellar qt@5) ../src
if you are using mac with qt5. If everything is right, you should be able to see an environment test scenario, where there are several types of robots doing nothing or something nosense.To run a something that makes sense, try :
python3 experiments/exp_01_formation/simu_code/run.py -m 32
, and there should be a group of drones forming formations.
-
argos3 and cmake :
src/cmake
contains necessary cmake files to find argos3.src/argos3
is a simbolic link to the parent folder, it is needed for loop function to compile. Usually you wouldn't need to touch these. -
ARGoS loop function and user function : They are located in
src/extensions
andsrc/qtopengl_extensions
. They are based on argos3-pipuck-ext (https://github.com/iridia-ulb/argos3-pipuck-ext). Thanks to Michael, they provide a general function for most of the testing cases. For example loop function creates pipuck-exts with larger tags and records the location of each robot. user function provides function to draw arrows. For details, please refer to argos3-pipuck-ext. -
Testing : src/testing is what the users play with. In testing folder, each subfolder is a scenario case to test one or several features of MNS, or an experiment in which a scenario got run for a load of times, and data collected and plotted. You can copy or create new subfolders to create your own scenarios and experiments.
- IMPORTANT NOTES: The codes inside
src/testing
are pre-executable. All the codes insrc/testing
are generated by cmake inbuild/testing
folder. For example, if you checksrc/testing/test_00_environment/vns.argos.in
Line 30 you can see a@CMAKE_CURRENT_BINARY_DIR@
in it. After cmake and make, abuild/testing/test_00_environment/vns.argos
will be generated, and this@CMAKE_CURRENT_BINARY_DIR@
would be replaced by the absolute path of your folder. It is this file that you should run, and it doesn't matter which folder you are currently at, for everything is generated in absolute paths. This happens to most of the files in testing, most of the files got a copy or an "configured" copy in build folder during make. So, if you want to change the code permanently, do it insrc/testing
, and cmake again. Any change in build is only temporary and would be overwritten the next time you cmake.
- IMPORTANT NOTES: The codes inside
- On the cluster, ARGOS_CMAKE_DIR is not found, cmake like the following will work
cmake ../src/ -DARGOS_CMAKE_DIR=/home/wzhu/Programs/argos3/install/share/argos3/cmake