![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
Thank you for considering contributing to Autonomy Software! This guide will help you report bugs, suggest enhancements, and follow our code style and conventions.
To help us fix potential bugs quickly, please ensure the following:
To submit a bug report:
Good bug reports help us isolate the problem faster and improve the software more efficiently.
To submit an enhancement suggestion:
Example:
Example:
Once a pull request is opened, it will be automatically assigned to a member of the software review team for review. This ensures that every contribution receives prompt feedback and aligns with the project guidelines.
To mark sections of code for later review, we use keywords that can be compiled into a to-do list in the TODO extension tab. Here's a list of commonly used keywords:
You can also use checklist-style comments:
The following tables outline the naming conventions for signed and unsigned types:
| Type | Prefix | Example |
|---|---|---|
| Signed Integer | n | int nExampleSignedInteger |
| Signed Long | l | long lExampleSignedLong |
| Signed Short | s | short sExampleSignedShort |
| Signed Float | f | float fExampleSignedFloat |
| Signed Double | d | double dExampleSignedDouble |
| Type | Prefix | Example |
|---|---|---|
| Unsigned Char | uc | unsigned char ucExampleUnsignedChar |
| Unsigned Integer | un | unsigned int unExampleUnsignedInteger |
| Unsigned Long | ul | unsigned long ulExampleUnsignedLong |
| Unsigned Short | us | unsigned short usExampleUnsignedShort |
| Unsigned Float | uf | unsigned float ufExampleUnsignedFloat |
| Unsigned Double | ud | unsigned double udExampleUnsignedDouble |
The table below lists various other common types and their corresponding prefixes:
| Type | Prefix | Example |
|---|---|---|
| Boolean | b | bool bExampleBoolean |
| Character | c | char cExampleCharacter |
| Vector | v | vector<int> vExampleVector |
| Array | a | int aExampleArray[4] |
| Deque | dq | deque dqExampleDeque |
| Queue | q | queue<int> qExampleQueue |
| Priority Queue | pq | priority_queue<int> pqExamplePriorityQueue |
| Iterator | it | iterator itExampleIterator |
| String | sz | string szExampleString |
| Pointer | p | string* pExamplePointer |
| Enum | e | ExampleEnum::eExampleUseOfEnum |
| Time | tm | time_t tmExampleUseOfTime |
| Template | t | T tExampleUseOfTemplateType |
| Size | si | size_t siExampleUseOfSize |
| Tuple | tp | tuple tpExampleUseOfTuple |
| STD Type | std | memory_order stdExampleUseOfMemoryOrder |
| Thread | th | jthread thExampleUseOfThread |
| Mutex | mu | mutex muExampleUseOfMutex |
| Lock | lk | lock lkExampleUseOfLock |
| Condition Variable | cd | condition_variable cdExampleUseOfConditionVariable |
| Struct | st | StructName stExampleUseOfStruct |
| Future | fu | future<void> fuExampleUseOfFuture |
| Promise | pm | promise<void> pmExampleUseOfPromise |
| Map | m | map<int, int> mExampleUseOfMap |
| Unordered Map | um | unordered_map<int, int> umExampleUseOfUnorderedMap |
| Set | s | set<int> sExampleUseOfSet |
| Unordered Set | us | unordered_set<int> usExampleUseOfUnorderedSet |
| Functions | fn | function<void> fnExampleUseOfFunction |
External libraries and their corresponding type prefixes are listed below:
| Library | Prefix | Example |
|---|---|---|
| OpenCV | cv | cv::Mat cvExampleMat |
| ZED SDK | sl | sl::Mat slExampleZedMat |
| Quill | q | quill::Config qConfig |
| GeographicLib | ge | GeographicLib::Geodesic geExampleGeographicType |
| Torch | tr | torch::Tensor trExampleTorchType |
| WebRTC | rtc | rtc::PeerConnection rtcExampleRTCType |
| JSON | jsn | nlohmann::json jsnExampleJSONType |
| FFMPEG | av | AVPacket avExampleFFMPEGPacket |
| Matplot | mt | axes_handle mtExampleMatplot |
| PCL | pcl | PointXYZ pclExamplePCLType |
| SQL | sql | sqlite sqlExampleSQLType |
| Eigen | ei | MatrixXd eiExampleEigenType |
| LibKDTree++ | tr | KDTree trExampleKDTree |
Macros should be in all caps using underscores to separate words. They should be detailed enough to not require an additional comment.
Example:
Functions should use PascalCase for names. Use detailed names and include a Doxygen comment.
Example:
Classes and structs should use PascalCase for names. Use short, descriptive names, and include a Doxygen comment.
Example for a class:
Do you attend Missouri University of Science and Technology? Are you interested in contributing to the Mars Rover Design Team and working on autonomy software? Head to https://design.mst.edu to learn how to join us today!