\page md_CONTRIBUTING Contributing Guide
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:
- Use the latest version of the software.
- Verify that the issue is a bug and not an error on your side (e.g., incompatible environment components/versions). Check the documentation for guidance.
- Search the bug tracker to see if the issue has already been reported or solved.
- Collect relevant information such as:
- Backtrace (if applicable)
- OS, Platform, and Version
- Steps to reliably reproduce the issue
To submit a bug report:
- Open a new Issue on GitHub.
- Describe the expected behavior and the actual behavior.
- Provide detailed reproduction steps, including code snippets where possible.
- Include any gathered information (backtrace, OS, platform, version).
Good bug reports help us isolate the problem faster and improve the software more efficiently.
- Ensure you are using the latest version of the software.
- Check the documentation to see if the feature already exists.
- Search the issue tracker to see if someone has already suggested a similar enhancement.
To submit an enhancement suggestion:
- Open a new Issue on GitHub.
- Use a clear, descriptive title.
- Provide a step-by-step description of your suggested enhancement.
- Explain the current behavior and describe the expected behavior, including why the change is beneficial.
- Keep commit messages under 50 characters.
- Always include a reference to the relevant issue number in the format:
#<issue num>.
Example:
fix: Resolve crash in navigation state machine #42
- Keep pull request titles under 50 characters.
- Include a detailed description of the changes made.
- Use
closed #<issue num>in the description to link the pull request to a specific issue.
Example:
Closed #42: Fixed crash in the navigation state machine by adjusting state transitions.
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:
// NOTE:– Something programmers should notice.// * @todoor// @todo– Marks sections of code for future implementation.// TODO:– Generic to-do items.// BUG:– Known issues or bugs.// HACK:– Temporary workarounds that need improvement.// FIXME:– Sections of code that are broken and need fixing.// LEAD:– Important notes for review by team leads.// ISSUE NOTE:– Problematic code that needs attention.// TEST:– Indicates areas that require testing.
You can also use checklist-style comments:
// [ ]– Unchecked to-do item.// [x]– Checked to-do item.
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 |
| Tensorflow | tf |
tflite::Interpreter tfExampleTensorflowType |
| Libedgetpu | tpu |
edgetpu::EdgeTpuManager tpuExampleEdgeTPUType |
| 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:
#define ARUCO_DEBUG_PRINTS false
#define AUTONOMY_MAJOR_VERSION 24Functions should use PascalCase for names. Use detailed names and include a Doxygen comment.
Example:
/* Type: `/**` and then <enter> to start doxygen comment block */
void InitializeSensor();Classes and structs should use PascalCase for names. Use short, descriptive names, and include a Doxygen comment.
Example for a class:
/* Type: `/**` and then <enter> to start doxygen comment block */
class SensorManager {
// class implementation
};
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!