<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.cognimbus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blackpc</id>
		<title>cogniteam - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.cognimbus.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Blackpc"/>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php/Special:Contributions/Blackpc"/>
		<updated>2026-04-29T00:52:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1221</id>
		<title>Debian repository</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1221"/>
				<updated>2020-01-19T18:20:46Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Cogniteam's debian repositories setup =&lt;br /&gt;
 &lt;br /&gt;
=== Setup APT sources list ===&lt;br /&gt;
Add Cogniteam's APT repository to your APT sources list:  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo sh -c 'echo &amp;quot;deb ftp://USER:PASSWORD@apt.cogni.io $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/apt-cogni-io.list'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: change '''USER''' and '''PASSWORD''' with credentials provided to you''&lt;br /&gt;
&lt;br /&gt;
=== Setup APT keys ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wget -O - https://cloud.cogni.io/apt_pub.gpg | sudo apt-key add -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update APT index ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1220</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1220"/>
				<updated>2020-01-19T18:18:57Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
== Our recent talks at meetups and conferences ==&lt;br /&gt;
* Israel Robotics Meetup #7 - Introduction to SLAM | Dr. Yehuda Elmaliah (CEO @ Cogniteam)&lt;br /&gt;
[[File:YehudaMeetup7.png|thumb]] [[https://www.youtube.com/watch?v=E9IpPfwIyJI]]&lt;br /&gt;
&lt;br /&gt;
* Robotic Meetup #1- Developing Autonomous Things | Ari Yakir (VP R&amp;amp;D @ Cogniteam) &lt;br /&gt;
[[File:AriYakirMeetup.mp4.png|thumb]] [[https://www.youtube.com/watch?v=V8rHo_QpWTU]]&lt;br /&gt;
&lt;br /&gt;
== For developers == &lt;br /&gt;
* [[Cogniteam/CodeConvention|Code conventions]]&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
* [[Debian_repository|Cogniteam APT Repository]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1219</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1219"/>
				<updated>2020-01-19T18:18:36Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
== Our recent talks at meetups and conferences ==&lt;br /&gt;
* Israel Robotics Meetup #7 - Introduction to SLAM | Dr. Yehuda Elmaliah (CEO @ Cogniteam)&lt;br /&gt;
[[File:YehudaMeetup7.png|thumb]] [[https://www.youtube.com/watch?v=E9IpPfwIyJI]]&lt;br /&gt;
&lt;br /&gt;
* Robotic Meetup #1- Developing Autonomous Things | Ari Yakir (VP R&amp;amp;D @ Cogniteam) &lt;br /&gt;
[[File:AriYakirMeetup.mp4.png|thumb]] [[https://www.youtube.com/watch?v=V8rHo_QpWTU]]&lt;br /&gt;
&lt;br /&gt;
== For developers == &lt;br /&gt;
* [[Cogniteam/CodeConvention|Code conventions]]&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
* [[Debian_repository|Cogniteam Apt Repository]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1218</id>
		<title>Debian repository</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1218"/>
				<updated>2020-01-19T18:13:13Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Cogniteam's debian repositories setup =&lt;br /&gt;
 &lt;br /&gt;
=== Setup APT sources list ===&lt;br /&gt;
Add Cogniteam's APT repository to your APT sources list:  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo sh -c 'echo &amp;quot;deb ftp://USER:PASSWORD@apt.cogni.io $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/apt-cogni-io.list'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: change '''USER''' and '''PASSWORD''' with credentials provided to you''&lt;br /&gt;
&lt;br /&gt;
=== Setup APT keys ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wget -O - fhttps://cloud.cogni.io/apt_pub.gpg | sudo apt-key add -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update APT index ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1199</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1199"/>
				<updated>2019-12-31T13:04:50Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
* Learn basic Git functionality, you must fully understand the following features:&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/using-branches Branching]&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/merging-vs-rebasing Merge vs. Rebase]&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/syncing Remote: push, pull]&lt;br /&gt;
** [https://evilmartians.com/chronicles/git-push---force-and-how-to-deal-with-it Force push]&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/rewriting-history Commit &amp;amp; amend]&lt;br /&gt;
** [https://git-scm.com/book/en/v2/Git-Basics-Tagging Tags]&lt;br /&gt;
* We use [https://datasift.github.io/gitflow/IntroducingGitFlow.html git flow] as out branching strategy&lt;br /&gt;
===Git Flow===&lt;br /&gt;
* Read [https://datasift.github.io/gitflow/IntroducingGitFlow.html this] first if you are not familiar with git flow.&lt;br /&gt;
* Main rules:&lt;br /&gt;
** '''develop''' branch must be always in working state&lt;br /&gt;
** '''master''' branch holds only stable releases&lt;br /&gt;
====Feature branches====&lt;br /&gt;
All development is made in feature branches, you can make any commit to this branch.&lt;br /&gt;
Ideally, each feature should be related to an issue in GitLab.&lt;br /&gt;
Once the feature is done, squash all commits on your feature branch into one commit with a message: &amp;lt;code&amp;gt;feature x added, closes #111&amp;lt;/code&amp;gt;, and merge to '''develop''' using rebase&lt;br /&gt;
* Feature branches are allowed to have not stable/compiling code&lt;br /&gt;
* Use ''rebase'' instead of ''merge'' on '''develop''' branch&lt;br /&gt;
* All feature branches should be branched from the latest '''develop''' branch and have the format '''feature/[ISSUE-REF]-[FEATURE-NAME]'''.&lt;br /&gt;
====Release====&lt;br /&gt;
* After all features have been integrated and version is ready to be realeased - create a release branch for it from latest '''develop''' branch. Name it with a '''release/v''' prefix, for example '''release/v1.0.0''' or '''release/v0.9.9-rc'''&lt;br /&gt;
* When in release branch, test your version in production environment, only bugfixes are allowed to be commited in release branch. After finishing all tests, update '''VERSION''' file with version to be released, commit it with version as a message, merge to '''master''' and '''develop''' branch and add a tag with a version number pointing to newly created commit on '''master''' branch, new version is released.&lt;br /&gt;
&lt;br /&gt;
The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch. This deploy -&amp;gt; test -&amp;gt; fix -&amp;gt; redeploy -&amp;gt; retest cycle continues until you are happy that the release is good enough to release to customers.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
* Use lower case in commit message (except type/file names and first commit message - 'Initial commit')&lt;br /&gt;
* Use 'bugfix: '  prefix for bugfix commits&lt;br /&gt;
* Commit text should be short and precise, tell what feature this commit relates and what king of change you have made:&lt;br /&gt;
** &amp;lt;code&amp;gt;feature x added, closes #23&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;voxel map filtering added, closes #54&amp;lt;/code&amp;gt; - Assumes there is an issue with id 54 (Voxel map filtering)&lt;br /&gt;
** &amp;lt;code&amp;gt;install instruction added to README.md&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;bugfix: segfault in MapBuilder fixed&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;XmlReader class added&amp;lt;/code&amp;gt;&lt;br /&gt;
* Don't commit meaningless messages like:&lt;br /&gt;
** &amp;lt;code&amp;gt;tiny fixes&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;crashing&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Naming convention===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Branch type !! Name format !! Description !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| master || &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; || Latest stable released version || &lt;br /&gt;
|-&lt;br /&gt;
| develop || &amp;lt;code&amp;gt;develop&amp;lt;/code&amp;gt; || Latest development version || &lt;br /&gt;
|-&lt;br /&gt;
| feature || &amp;lt;code&amp;gt;feature/[ISSUE-REF]-[FEATURE-NAME]&amp;lt;/code&amp;gt;  || Feature branch (including bugs) || '''feature/1-organize-pleco-core-repository'''&lt;br /&gt;
|-&lt;br /&gt;
| hotfix || &amp;lt;code&amp;gt;hotfix/[HOTFIX-NAME]&amp;lt;/code&amp;gt; || Hotfixes || '''hotfix/3-brush-does-not-rotate'''&lt;br /&gt;
|-&lt;br /&gt;
| release || &amp;lt;code&amp;gt;release/v[MAJOR].[MINOR].[PATCH]&amp;lt;/code&amp;gt; || Deploy &amp;amp; Test || '''release/v0.9.1''',  '''release/v1.2.1-rc1''',  '''release/v1.2.2-alpha'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1198</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1198"/>
				<updated>2019-12-31T13:03:38Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
* Learn basic Git functionality, you must fully understand the following features:&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/merging-vs-rebasing Merge vs. Rebase]&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/syncing Remote: push, pull]&lt;br /&gt;
** [https://evilmartians.com/chronicles/git-push---force-and-how-to-deal-with-it Force push]&lt;br /&gt;
** [https://www.atlassian.com/git/tutorials/rewriting-history Commit &amp;amp; amend]&lt;br /&gt;
** [https://git-scm.com/book/en/v2/Git-Basics-Tagging Tags]&lt;br /&gt;
* We use [https://datasift.github.io/gitflow/IntroducingGitFlow.html git flow] as out branching strategy&lt;br /&gt;
===Git Flow===&lt;br /&gt;
* Read [https://datasift.github.io/gitflow/IntroducingGitFlow.html this] first if you are not familiar with git flow.&lt;br /&gt;
* Main rules:&lt;br /&gt;
** '''develop''' branch must be always in working state&lt;br /&gt;
** '''master''' branch holds only stable releases&lt;br /&gt;
====Feature branches====&lt;br /&gt;
All development is made in feature branches, you can make any commit to this branch.&lt;br /&gt;
Ideally, each feature should be related to an issue in GitLab.&lt;br /&gt;
Once the feature is done, squash all commits on your feature branch into one commit with a message: &amp;lt;code&amp;gt;feature x added, closes #111&amp;lt;/code&amp;gt;, and merge to '''develop''' using rebase&lt;br /&gt;
* Feature branches are allowed to have not stable/compiling code&lt;br /&gt;
* Use ''rebase'' instead of ''merge'' on '''develop''' branch&lt;br /&gt;
* All feature branches should be branched from the latest '''develop''' branch and have the format '''feature/[ISSUE-REF]-[FEATURE-NAME]'''.&lt;br /&gt;
====Release====&lt;br /&gt;
* After all features have been integrated and version is ready to be realeased - create a release branch for it from latest '''develop''' branch. Name it with a '''release/v''' prefix, for example '''release/v1.0.0''' or '''release/v0.9.9-rc'''&lt;br /&gt;
* When in release branch, test your version in production environment, only bugfixes are allowed to be commited in release branch. After finishing all tests, update '''VERSION''' file with version to be released, commit it with version as a message, merge to '''master''' and '''develop''' branch and add a tag with a version number pointing to newly created commit on '''master''' branch, new version is released.&lt;br /&gt;
&lt;br /&gt;
The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch. This deploy -&amp;gt; test -&amp;gt; fix -&amp;gt; redeploy -&amp;gt; retest cycle continues until you are happy that the release is good enough to release to customers.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
* Use lower case in commit message (except type/file names and first commit message - 'Initial commit')&lt;br /&gt;
* Use 'bugfix: '  prefix for bugfix commits&lt;br /&gt;
* Commit text should be short and precise, tell what feature this commit relates and what king of change you have made:&lt;br /&gt;
** &amp;lt;code&amp;gt;feature x added, closes #23&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;voxel map filtering added, closes #54&amp;lt;/code&amp;gt; - Assumes there is an issue with id 54 (Voxel map filtering)&lt;br /&gt;
** &amp;lt;code&amp;gt;install instruction added to README.md&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;bugfix: segfault in MapBuilder fixed&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;XmlReader class added&amp;lt;/code&amp;gt;&lt;br /&gt;
* Don't commit meaningless messages like:&lt;br /&gt;
** &amp;lt;code&amp;gt;tiny fixes&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;crashing&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Naming convention===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Branch type !! Name format !! Description !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| master || &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; || Latest stable released version || &lt;br /&gt;
|-&lt;br /&gt;
| develop || &amp;lt;code&amp;gt;develop&amp;lt;/code&amp;gt; || Latest development version || &lt;br /&gt;
|-&lt;br /&gt;
| feature || &amp;lt;code&amp;gt;feature/[ISSUE-REF]-[FEATURE-NAME]&amp;lt;/code&amp;gt;  || Feature branch (including bugs) || '''feature/1-organize-pleco-core-repository'''&lt;br /&gt;
|-&lt;br /&gt;
| hotfix || &amp;lt;code&amp;gt;hotfix/[HOTFIX-NAME]&amp;lt;/code&amp;gt; || Hotfixes || '''hotfix/3-brush-does-not-rotate'''&lt;br /&gt;
|-&lt;br /&gt;
| release || &amp;lt;code&amp;gt;release/v[MAJOR].[MINOR].[PATCH]&amp;lt;/code&amp;gt; || Deploy &amp;amp; Test || '''release/v0.9.1''',  '''release/v1.2.1-rc1''',  '''release/v1.2.2-alpha'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1197</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1197"/>
				<updated>2019-12-31T12:50:37Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
* We use [https://datasift.github.io/gitflow/IntroducingGitFlow.html git flow] as out branching strategy&lt;br /&gt;
===Git Flow===&lt;br /&gt;
* '''develop''' branch must be always in working state&lt;br /&gt;
* '''master''' branch holds only stable releases&lt;br /&gt;
====Feature branches====&lt;br /&gt;
All development is made in feature branches, you can make any commit to this branch.&lt;br /&gt;
Ideally, each feature should be related to an issue in GitLab.&lt;br /&gt;
Once the feature is done, squash all commits on your feature branch into one commit with a message: &amp;lt;code&amp;gt;feature x added, closes #111&amp;lt;/code&amp;gt;, and merge to '''develop''' using rebase&lt;br /&gt;
* Feature branches are allowed to have not stable/compiling code&lt;br /&gt;
* Use ''rebase'' instead of ''merge'' on '''develop''' branch&lt;br /&gt;
* All feature branches should be branched from the latest '''develop''' branch and have the format '''feature/[ISSUE-REF]-[FEATURE-NAME]'''.&lt;br /&gt;
====Release====&lt;br /&gt;
* After all features have been integrated and version is ready to be realeased - create a release branch for it from latest '''develop''' branch. Name it with a '''release/v''' prefix, for example '''release/v1.0.0''' or '''release/v0.9.9-rc'''&lt;br /&gt;
* When in release branch, test your version in production environment, only bugfixes are allowed to be commited in release branch. After finishing all tests, update '''VERSION''' file with version to be released, commit it with version as a message, merge to '''master''' and '''develop''' branch and add a tag with a version number pointing to newly created commit on '''master''' branch, new version is released.&lt;br /&gt;
&lt;br /&gt;
The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch. This deploy -&amp;gt; test -&amp;gt; fix -&amp;gt; redeploy -&amp;gt; retest cycle continues until you are happy that the release is good enough to release to customers.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
* Use lower case in commit message (except type/file names and first commit message - 'Initial commit')&lt;br /&gt;
* Use 'bugfix: '  prefix for bugfix commits&lt;br /&gt;
* Commit text should be short and precise, tell what feature this commit relates and what king of change you have made:&lt;br /&gt;
** &amp;lt;code&amp;gt;feature x added, closes #23&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;voxel map filtering added, closes #54&amp;lt;/code&amp;gt; - Assumes there is an issue with id 54 (Voxel map filtering)&lt;br /&gt;
** &amp;lt;code&amp;gt;install instruction added to README.md&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;bugfix: segfault in MapBuilder fixed&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;XmlReader class added&amp;lt;/code&amp;gt;&lt;br /&gt;
* Don't commit meaningless messages like:&lt;br /&gt;
** &amp;lt;code&amp;gt;tiny fixes&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;fix&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;crashing&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Naming convention===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Branch type !! Name format !! Description !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| master || &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; || Latest stable released version || &lt;br /&gt;
|-&lt;br /&gt;
| develop || &amp;lt;code&amp;gt;develop&amp;lt;/code&amp;gt; || Latest development version || &lt;br /&gt;
|-&lt;br /&gt;
| feature || &amp;lt;code&amp;gt;feature/[ISSUE-REF]-[FEATURE-NAME]&amp;lt;/code&amp;gt;  || Feature branch (including bugs) || '''feature/1-organize-pleco-core-repository'''&lt;br /&gt;
|-&lt;br /&gt;
| hotfix || &amp;lt;code&amp;gt;hotfix/[HOTFIX-NAME]&amp;lt;/code&amp;gt; || Hotfixes || '''hotfix/3-brush-does-not-rotate'''&lt;br /&gt;
|-&lt;br /&gt;
| release || &amp;lt;code&amp;gt;release/v[MAJOR].[MINOR].[PATCH]&amp;lt;/code&amp;gt; || Deploy &amp;amp; Test || '''release/v0.9.1''',  '''release/v1.2.1-rc1''',  '''release/v1.2.2-alpha'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1196</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1196"/>
				<updated>2019-12-31T11:02:25Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
* We use [https://datasift.github.io/gitflow/IntroducingGitFlow.html git flow] as out branching strategy&lt;br /&gt;
===Git Flow===&lt;br /&gt;
# '''develop''' branch must be always in working state&lt;br /&gt;
# All feature branches should be branched from the latest '''develop''' branch and have the format '''feature/[ISSUE-REF]-[FEATURE-NAME]'''.&lt;br /&gt;
# After all features have been integrated and version is ready to be realeased - create a release branch for it from latest '''develop''' branch. Name it with a '''release/v''' prefix, for example '''release/v1.0.0''' or '''release/v0.9.9-rc'''&lt;br /&gt;
# When in release branch, test your version in production environment, only bugfixes are allowed to be commited in release branch. After finishing all tests, update '''VERSION''' file&lt;br /&gt;
# The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch. This deploy -&amp;gt; test -&amp;gt; fix -&amp;gt; redeploy -&amp;gt; retest cycle continues until you are happy that the release is good enough to release to customers.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
* Commit text should be short and precise, &lt;br /&gt;
* Don't commit meaningless messages like:&lt;br /&gt;
** ''tiny fixes''&lt;br /&gt;
** ''fix''&lt;br /&gt;
** ''crashing''&lt;br /&gt;
&lt;br /&gt;
===Naming convention===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Branch type !! Name format !! Description !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| master || &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; || Latest stable released version || &lt;br /&gt;
|-&lt;br /&gt;
| develop || &amp;lt;code&amp;gt;develop&amp;lt;/code&amp;gt; || Latest development version || &lt;br /&gt;
|-&lt;br /&gt;
| feature || &amp;lt;code&amp;gt;feature/[ISSUE-REF]-[FEATURE-NAME]&amp;lt;/code&amp;gt;  || Feature branch (including bugs) || '''feature/1-organize-pleco-core-repository'''&lt;br /&gt;
|-&lt;br /&gt;
| hotfix || &amp;lt;code&amp;gt;hotfix/[HOTFIX-NAME]&amp;lt;/code&amp;gt; || Hotfixes || '''hotfix/3-brush-does-not-rotate'''&lt;br /&gt;
|-&lt;br /&gt;
| release || &amp;lt;code&amp;gt;release/v[MAJOR].[MINOR].[PATCH]&amp;lt;/code&amp;gt; || Deploy &amp;amp; Test || '''release/v0.9.1''',  '''release/v1.2.1-rc1''',  '''release/v1.2.2-alpha'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''demo_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1195</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1195"/>
				<updated>2019-12-31T11:01:30Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
* We use [https://datasift.github.io/gitflow/IntroducingGitFlow.html git flow] as out branching strategy&lt;br /&gt;
===Git Flow===&lt;br /&gt;
# '''develop''' branch must be always in working state&lt;br /&gt;
# All feature branches should be branched from the latest '''develop''' branch and have the format '''feature/[ISSUE-REF]-[FEATURE-NAME]'''.&lt;br /&gt;
# After all features have been integrated and version is ready to be realeased - create a release branch for it from latest '''develop''' branch. Name it with a '''release/v''' prefix, for example '''release/v1.0.0''' or '''release/v0.9.9-rc'''&lt;br /&gt;
# When in release branch, test your version in production environment, only bugfixes are allowed to be commited in release branch. After finishing all tests, update '''VERSION''' file&lt;br /&gt;
# The code in the release branch is deployed onto a suitable test environment, tested, and any problems are fixed directly in the release branch. This deploy -&amp;gt; test -&amp;gt; fix -&amp;gt; redeploy -&amp;gt; retest cycle continues until you are happy that the release is good enough to release to customers.&lt;br /&gt;
&lt;br /&gt;
===Commits===&lt;br /&gt;
* Commit text should be short and precise, &lt;br /&gt;
* Don't commit meaningless messages like:&lt;br /&gt;
** ''tiny fixes''&lt;br /&gt;
** ''fix''&lt;br /&gt;
** ''crashing''&lt;br /&gt;
&lt;br /&gt;
===Naming convention===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Branch type !! Name format !! Description !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| master || &amp;lt;code&amp;gt;master&amp;lt;/code&amp;gt; || Latest stable released version || &lt;br /&gt;
|-&lt;br /&gt;
| develop || &amp;lt;code&amp;gt;develop&amp;lt;/code&amp;gt; || Latest development version || &lt;br /&gt;
|-&lt;br /&gt;
| feature || &amp;lt;code&amp;gt;feature/[ISSUE-REF]-[FEATURE-NAME]&amp;lt;/code&amp;gt;  || Feature branch (including bugs) || '''feature/1-organize-pleco-core-repository'''&lt;br /&gt;
|-&lt;br /&gt;
| hotfix || &amp;lt;code&amp;gt;hotfix/[HOTFIX-NAME]&amp;lt;/code&amp;gt; || Hotfixes || '''hotfix/3-brush-does-not-rotate'''&lt;br /&gt;
|-&lt;br /&gt;
| release || &amp;lt;code&amp;gt;release/v[MAJOR].[MINOR].[PATCH]&amp;lt;/code&amp;gt; || Deploy &amp;amp; Test || '''release/v0.9.1''',  '''release/v1.2.1-rc1''',  '''release/v1.2.2-alpha'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1193</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1193"/>
				<updated>2019-12-30T21:58:34Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
TBD&lt;br /&gt;
===Git Flow===&lt;br /&gt;
TBD&lt;br /&gt;
===Commits===&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't reinvent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1192</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1192"/>
				<updated>2019-12-30T21:54:06Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
TBD&lt;br /&gt;
===Git Flow===&lt;br /&gt;
TBD&lt;br /&gt;
===Commits===&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case&amp;lt;br /&amp;gt;Add '_node' suffix ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1191</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1191"/>
				<updated>2019-12-30T21:52:48Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
TBD&lt;br /&gt;
===Git Flow===&lt;br /&gt;
TBD&lt;br /&gt;
===Commits===&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Nodes || Lower camel case ||  '''hamster_driver_node'''&amp;lt;br /&amp;gt;'''cognitao_server_node'''&amp;lt;br /&amp;gt;'''hector_mapping_node'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1190</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1190"/>
				<updated>2019-12-30T17:43:40Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
TBD&lt;br /&gt;
===Git Flow===&lt;br /&gt;
TBD&lt;br /&gt;
===Commits===&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch''', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| ROS Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&amp;lt;div style=&amp;quot;color: #f00; font-weight: bold;&amp;quot;&amp;gt;&lt;br /&gt;
* '''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards | Why? - [http://www.stroustrup.com/bs_faq2.html#macro Read this] [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1189</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1189"/>
				<updated>2019-12-30T17:37:15Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Git==&lt;br /&gt;
TBD&lt;br /&gt;
===Git Flow===&lt;br /&gt;
TBD&lt;br /&gt;
===Commits===&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
==ROS/ROS2==&lt;br /&gt;
&lt;br /&gt;
* If your project contains custom messages/services/actions, consider creating separate package '''projectname_msgs''' containing all messages/services/actions, don't put code in this package&lt;br /&gt;
* Create separate package for complex projects comprising many packages: '''projectname_launch'', again, don't put code files here, it used for storing launch files/scripts and parameters/configuration files (see ''hamster_launch'', ''lynx_launch'')&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| ROS Packages || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner_ros'''&amp;lt;br /&amp;gt;'''cognitao_msgs'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==C++==&lt;br /&gt;
&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Convention names description===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
=== Class template ===&lt;br /&gt;
&lt;br /&gt;
==== Header file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Source file ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1188</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1188"/>
				<updated>2019-12-30T17:19:07Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Code style and Naming conventions==&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer '''shared_ptr''' over pure pointers&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1187</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1187"/>
				<updated>2019-12-30T17:18:01Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Code style and Naming conventions==&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Template parameters || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
template &amp;lt;typename MessageT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename DataT&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Constants || Upper snake case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
const double PI = 3.14159265359;&lt;br /&gt;
&lt;br /&gt;
const double PI_HALF = 1.57079632679;&lt;br /&gt;
&lt;br /&gt;
static const Color THEME_COLOR = Colors::Red;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1186</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1186"/>
				<updated>2019-12-30T17:11:41Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Code style and Naming conventions==&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
* Use C++14 standard  &amp;lt;syntaxhighlight lang=&amp;quot;cmake&amp;quot;&amp;gt;&lt;br /&gt;
# CMake &lt;br /&gt;
add_compile_options(-std=c++14)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
* Don't invent wheels - use best practices of object oriented programming and design patterns&lt;br /&gt;
* Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
* Use new features provided by '''C++11''' and '''C++14''':&lt;br /&gt;
** [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
* Use commonly known design patterns if they solve your problem:&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
** [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1185</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1185"/>
				<updated>2019-12-30T16:54:03Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
* Use C++14 standard &lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
 &lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| Packages (pure cmake, ROS/ROS2 packages) || Lower camel case ||  '''hamster_driver'''&amp;lt;br /&amp;gt;'''mafat_planner'''&amp;lt;br /&amp;gt;'''cognitao'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
&lt;br /&gt;
Use new features provided by c++11 and c++14:&lt;br /&gt;
* [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
&lt;br /&gt;
Use commonly known design patterns if they solve your problem:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
* [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1184</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1184"/>
				<updated>2019-12-30T15:09:27Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===General rules===&lt;br /&gt;
* Use C++14 standard &lt;br /&gt;
* Use '''4 spaces''' for tabbing&lt;br /&gt;
* Avoid typing more than '''80 characters''' per line&lt;br /&gt;
* Prefer full names over short: &lt;br /&gt;
** '''worldModel''' ''instead of'' wm&lt;br /&gt;
** '''task_''' ''instead of'' t_&lt;br /&gt;
** '''calculateDistance()''' ''instead of'' calcDist()&lt;br /&gt;
* Use meaningful names for variables and methods (don't afraid to use long names):&lt;br /&gt;
** '''distance''' ''not'' d&lt;br /&gt;
** '''lastReceivedPosition_''' ''not'' lastRP_&lt;br /&gt;
* Don't use too much general names for classes:&lt;br /&gt;
** '''Icp2dMapAligner''' ''instead of'' MapAligner&lt;br /&gt;
** '''VoxelGridMap''' ''instead of'' Map3d&lt;br /&gt;
 &lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|-&lt;br /&gt;
| ROS Messages (actions, services and messages) || Upper camel case ||  '''Vector.msg'''&amp;lt;br /&amp;gt;'''RunPlan.action'''&amp;lt;br /&amp;gt;'''GetMap.srv'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
&lt;br /&gt;
Use new features provided by c++11 and c++14:&lt;br /&gt;
* [https://github.com/AnthonyCalandra/modern-cpp-features New features overview]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/C%2B%2B11 C++11]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/C%2B%2B14 C++14]&lt;br /&gt;
&lt;br /&gt;
Use commonly known design patterns if they solve your problem:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
* [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1183</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1183"/>
				<updated>2019-12-30T14:46:41Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
&lt;br /&gt;
Use commonly known design patterns if they solve your problem:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
* [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1182</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1182"/>
				<updated>2019-12-30T14:46:25Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Why not?&lt;br /&gt;
* http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
* [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===Object-Oriented Programming===&lt;br /&gt;
Make sure your are familiar with basic OOP principles (Inheritance, SRP, SOC, encapsulation, DI, etc...)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented Programming]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/SOLID SOLID Principles] '''MUST READ'''&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Don%27t_repeat_yourself DRY Principle]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/KISS_principle KISS Principle]&lt;br /&gt;
&lt;br /&gt;
Use commonly known design patterns if they solve your problem:&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Software_design_pattern Software design patterns]&lt;br /&gt;
* [https://www.journaldev.com/31902/gangs-of-four-gof-design-patterns Design Patterns by Gang Of Four] '''MUST READ'''&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1181</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1181"/>
				<updated>2019-12-30T14:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* Why not?&lt;br /&gt;
** http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
** [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===General OOP principles===&lt;br /&gt;
* Object-oriented programming [https://en.wikipedia.org/wiki/Object-oriented_programming OOP]&lt;br /&gt;
* SOLID principles [https://en.wikipedia.org/wiki/SOLID SOLID]&lt;br /&gt;
* Software design pattern [https://en.wikipedia.org/wiki/Software_design_pattern Desigh Patterns]&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
=== Header file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Source file ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.cpp&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/CogniteamClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object, more deatils about implementation&lt;br /&gt;
 * can be added here&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass()&lt;br /&gt;
    : varToInit_(1), &lt;br /&gt;
      varToinit2_(2.0) {&lt;br /&gt;
    // &lt;br /&gt;
    // Other initialization...&lt;br /&gt;
    //&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Construct a new Cogniteam Class object&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const SomeClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Copy constructor&lt;br /&gt;
 * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
 *       if you have pointers in your class&lt;br /&gt;
 * @param obj1 &lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::CogniteamClass(const CogniteamClass&amp;amp; obj1) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Destroys the Cogniteam Class object&lt;br /&gt;
 * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
 */&lt;br /&gt;
CogniteamClass::~CogniteamClass() {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation &lt;br /&gt;
 * @param param1 First parameter&lt;br /&gt;
 * @param param2 Second parameter&lt;br /&gt;
 * @param param3 Another parameter&lt;br /&gt;
 * @return true If success&lt;br /&gt;
 * @return false If failure&lt;br /&gt;
 */&lt;br /&gt;
bool CogniteamClass::runAlgorithm(double param1, double param2, double param3) {&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Describe the implementation&lt;br /&gt;
 * @param param1 First param for calculationg&lt;br /&gt;
 * @return double Calculation result&lt;br /&gt;
 */&lt;br /&gt;
double CogniteamClass::calculateNumber(double param1) const {&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace project_name */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1180</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1180"/>
				<updated>2019-12-30T14:04:34Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===Conventions names examples===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; width: 100%; padding: 10px;&amp;quot;&lt;br /&gt;
! Upper Camel Case !! Lower Camel Case !! Upper Snake Case !! Lower Snake Case&lt;br /&gt;
|-&lt;br /&gt;
| UpperCamelCase || lowerCamelCase || UPPER_SNAKE_CASE || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
&lt;br /&gt;
class AgentController;&lt;br /&gt;
&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Class files&amp;lt;br /&amp;gt;''Header and source file'' || Upper camel case ||  '''MyClass.h'''&amp;lt;br /&amp;gt;'''MyClass.cpp'''&amp;lt;br /&amp;gt;'''AgentRosController.hpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Main&amp;lt;br /&amp;gt;''File containint main() method, usually ROS node'' || Lower snake case ||  '''cognitao_runner.cpp'''&amp;lt;br /&amp;gt;'''my_app.cpp'''&amp;lt;br /&amp;gt;'''agent_controller_node.cpp'''&lt;br /&gt;
|-&lt;br /&gt;
| Folders || Lower snake case ||  '''cognitao_ros'''&amp;lt;br /&amp;gt;'''include/agent_controller'''&amp;lt;br /&amp;gt;'''src/map_filters'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #f00; color: #fff; font-size: 1.1em; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
'''DON'T USE MACROS &amp;amp; DEFINES''' except for header guards&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
* Why not?&lt;br /&gt;
** http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
** [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
===General OOP principles===&lt;br /&gt;
* Object-oriented programming [https://en.wikipedia.org/wiki/Object-oriented_programming OOP]&lt;br /&gt;
* SOLID principles [https://en.wikipedia.org/wiki/SOLID SOLID]&lt;br /&gt;
* Software design pattern [https://en.wikipedia.org/wiki/Software_design_pattern Desigh Patterns]&lt;br /&gt;
&lt;br /&gt;
=== Read more ===&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C++ class template ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace widgets */&lt;br /&gt;
} /* namespace ocu */&lt;br /&gt;
} /* namespace lynx */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1179</id>
		<title>Cogniteam/CodeConvention</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam/CodeConvention&amp;diff=1179"/>
				<updated>2019-12-30T13:45:50Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==General OOP principles==&lt;br /&gt;
* Object-oriented programming [https://en.wikipedia.org/wiki/Object-oriented_programming OOP]&lt;br /&gt;
* SOLID principles [https://en.wikipedia.org/wiki/SOLID SOLID]&lt;br /&gt;
* Software design pattern [https://en.wikipedia.org/wiki/Software_design_pattern Desigh Patterns]&lt;br /&gt;
&lt;br /&gt;
==Coding style and naming convention==&lt;br /&gt;
&lt;br /&gt;
===C++ naming conventions===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Convention name !! Example &lt;br /&gt;
|-&lt;br /&gt;
| Upper Camel Case || UpperCamelCase&lt;br /&gt;
|-&lt;br /&gt;
| Lower Camel Case || lowerCamelCase&lt;br /&gt;
|-&lt;br /&gt;
| Upper Snake Case || UPPER_SNAKE_CASE&lt;br /&gt;
|-&lt;br /&gt;
| Lower Snake Case || lower_snake_case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Component !! Convention !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Variables || Lower camel case ||  &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int state_;&lt;br /&gt;
MessageType messageType;&lt;br /&gt;
&lt;br /&gt;
uint32_t countOfSomething;&lt;br /&gt;
&lt;br /&gt;
ros::NodeHandle rosNodeHandle;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Methods || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
void calculate();&lt;br /&gt;
&lt;br /&gt;
int getCount();&lt;br /&gt;
&lt;br /&gt;
int processIncomingMessages();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Member variables || Add '_' suffix to name, '''cannot be public''' || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
int memberVariable_;&lt;br /&gt;
&lt;br /&gt;
std::string name_;&lt;br /&gt;
&lt;br /&gt;
ros::ServiceClient rosServiceClient_;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Class names || Upper camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class Vector3;&lt;br /&gt;
class AgentController;&lt;br /&gt;
class MapAligner;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| [https://en.wikibooks.org/wiki/C%2B%2B_Programming/Classes/Abstract_Classes Abstract classes] || Upper camel case&amp;lt;br/&amp;gt;Prefix 'I' for interfaces - pure abstract classes without any implementations&amp;lt;br /&amp;gt;Suffix 'Base' for abstract base classes with some implementations || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
class ITextParser; // Pure abstract class - defines only interfaces without any implementations&lt;br /&gt;
class IMapFilter;&lt;br /&gt;
&lt;br /&gt;
class TaskBase; // Abstract class with some implementations common to all tasks&lt;br /&gt;
class MappingBase;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Namespaces || Lower camel case || &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
namespace cognitao_utils { } &lt;br /&gt;
&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace tools {&lt;br /&gt;
&lt;br /&gt;
} /* namespace tools */&lt;br /&gt;
} /* namespace cogniteam */&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| Enums || Upper camel case&amp;lt;br /&amp;gt;[https://stackoverflow.com/questions/18335861/why-is-enum-class-preferred-over-plain-enum Prefer enum class over regular enums] || MessageTypes, Colors&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
enum class MessageTypes {&lt;br /&gt;
    Single = 1,&lt;br /&gt;
    MultiPacket = 2,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum class Colors {&lt;br /&gt;
    Red = 0x00,&lt;br /&gt;
    Green = 0x01,&lt;br /&gt;
    Blue = 0x02&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Files and folders===&lt;br /&gt;
&lt;br /&gt;
* Files and packages: &lt;br /&gt;
** upper camel case for class headers and sources (MyClass.h, MyClass.cpp)&lt;br /&gt;
** lower snake case for file containing main method (my_executable.cpp, my_ros_node.cpp, robot_driver_node.cpp)&lt;br /&gt;
** lower snake case for package names (my_package, hamster_driver, elbit_planner)&lt;br /&gt;
* '''DON'T USE MACROS'''&lt;br /&gt;
* '''DON'T USE DEFINES''' (except header guards)&lt;br /&gt;
* Why not?&lt;br /&gt;
** http://www.stroustrup.com/bs_faq2.html#macro&lt;br /&gt;
** [https://git.cogni.io/maytronics/maytronics/snippets/8 Try to debug this]&lt;br /&gt;
&lt;br /&gt;
Related:&lt;br /&gt;
* [http://wiki.ros.org/CppStyleGuide ROS C++ style guide]&lt;br /&gt;
* [http://wiki.ros.org/ROS/Patterns/Conventions ROS naming convention]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * CogniteamClass.h&lt;br /&gt;
 * &lt;br /&gt;
 *  Created on: Jan 1, 2031&lt;br /&gt;
 *      Author: John Doe &amp;lt;johndoe@cogniteam.com&amp;gt;&lt;br /&gt;
 *&lt;br /&gt;
 *&lt;br /&gt;
 * Cogniteam LTD CONFIDENTIAL&lt;br /&gt;
 *&lt;br /&gt;
 * Unpublished Copyright (c) 2010-2020 Cogniteam,        All Rights Reserved.&lt;br /&gt;
 *&lt;br /&gt;
 * NOTICE:  All information contained  herein  is,  and  remains the property&lt;br /&gt;
 * of Cogniteam.   The   intellectual   and   technical   concepts  contained&lt;br /&gt;
 * herein are proprietary to Cogniteam and may  be  covered  by  Israeli  and&lt;br /&gt;
 * Foreign Patents, patents in process,  and  are  protected  by trade secret&lt;br /&gt;
 * or copyright law. Dissemination of  this  information  or  reproduction of&lt;br /&gt;
 * this material is strictly forbidden unless  prior  written  permission  is&lt;br /&gt;
 * obtained  from  Cogniteam.  Access  to  the  source  code contained herein&lt;br /&gt;
 * is hereby   forbidden   to   anyone  except  current  Cogniteam employees,&lt;br /&gt;
 * managers   or   contractors   who   have   executed   Confidentiality  and&lt;br /&gt;
 * Non-disclosure    agreements    explicitly    covering     such     access&lt;br /&gt;
 *&lt;br /&gt;
 * The copyright notice  above  does  not  evidence  any  actual  or intended&lt;br /&gt;
 * publication  or  disclosure    of    this  source  code,   which  includes&lt;br /&gt;
 * information that is confidential  and/or  proprietary,  and  is  a   trade&lt;br /&gt;
 * secret, of   Cogniteam.    ANY REPRODUCTION,  MODIFICATION,  DISTRIBUTION,&lt;br /&gt;
 * PUBLIC   PERFORMANCE,  OR  PUBLIC  DISPLAY  OF  OR  THROUGH USE   OF  THIS&lt;br /&gt;
 * SOURCE  CODE   WITHOUT   THE  EXPRESS  WRITTEN  CONSENT  OF  Cogniteam  IS&lt;br /&gt;
 * STRICTLY PROHIBITED, AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL&lt;br /&gt;
 * TREATIES.  THE RECEIPT OR POSSESSION OF  THIS SOURCE  CODE  AND/OR RELATED&lt;br /&gt;
 * INFORMATION DOES  NOT CONVEY OR IMPLY ANY RIGHTS  TO  REPRODUCE,  DISCLOSE&lt;br /&gt;
 * OR  DISTRIBUTE ITS CONTENTS, OR TO  MANUFACTURE,  USE,  OR  SELL  ANYTHING&lt;br /&gt;
 * THAT      IT     MAY     DESCRIBE,     IN     WHOLE     OR     IN     PART&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
                         // Maximum 80 characters per line        // new line  &lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always use header guards for header files&lt;br /&gt;
//&lt;br /&gt;
#ifndef PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
#define PATH_TO_FILE_AND_FILE_NAME_&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Group includes of the same library and separate it using a new line&lt;br /&gt;
// Order your include files from low level to higher.&lt;br /&gt;
//   1. libstd C headers: &amp;lt;printf.h&amp;gt;, &amp;lt;file.h&amp;gt;, &amp;lt;math.h&amp;gt;&lt;br /&gt;
//   2. libstd C++ headers: &amp;lt;fstream&amp;gt;, &amp;lt;thread&amp;gt;, &amp;lt;mutex&amp;gt;, &amp;lt;cmath&amp;gt;&lt;br /&gt;
//   4. Other 3rd party includes: &amp;lt;boost/mutex.hpp&amp;gt;, &amp;lt;Qt/QtCore&amp;gt;, &amp;lt;ros/ros.h&amp;gt;,&lt;br /&gt;
//                                &amp;lt;pcl/pcl.h&amp;gt;&lt;br /&gt;
//   4. Local includes: &amp;lt;cogniteam/project_name3/SomeClass.h&amp;gt;&lt;br /&gt;
//&lt;br /&gt;
#include &amp;lt;printf.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;mutex&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;boost/bind.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/thread/mutex.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/asio/serial_port.hpp&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/system/error_code.hpp&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;ros/ros.h&amp;gt;&lt;br /&gt;
#include &amp;lt;std_msgs/String.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ackermann_msgs/AckermannDriveStamped.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#include &amp;lt;cogniteam/AwesomeClass.h&amp;gt;&lt;br /&gt;
#include &amp;lt;cogniteam/project_name3/JustSomeClass.h&amp;gt;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
//&lt;br /&gt;
// Always wrap your code with a namespace&lt;br /&gt;
//&lt;br /&gt;
namespace cogniteam {&lt;br /&gt;
namespace project_name {&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
// Include other namespaces&lt;br /&gt;
using namespace std;&lt;br /&gt;
using namespace cogniteam::project_name2;&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * Custom color for...&lt;br /&gt;
 */&lt;br /&gt;
enum class CogniColor {&lt;br /&gt;
    Red = 1, &lt;br /&gt;
    Blue = 2,&lt;br /&gt;
    Green&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
/**&lt;br /&gt;
 * High level description of class purposes &lt;br /&gt;
 * @note Comment using Doxygen's 'Javadoc style' format&lt;br /&gt;
 * @url http://www.doxygen.nl/manual/docblocks.html&lt;br /&gt;
 */&lt;br /&gt;
class CogniteamClass : public CogniteamBaseClass {&lt;br /&gt;
                                                                                   // Use separate public block for constructors and descructor&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Construct a new Cogniteam Class object&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const SomeClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Copy constructor&lt;br /&gt;
     * @note Don't forget to implement copy constructor &amp;amp; copy assignment operator&lt;br /&gt;
     *       if you have pointers in your class&lt;br /&gt;
     * @param obj1 &lt;br /&gt;
     */&lt;br /&gt;
	CogniteamClass(const CogniteamClass&amp;amp; obj1);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Destroys the Cogniteam Class object&lt;br /&gt;
     * @note Always declare virtual desctrutor in your classes&lt;br /&gt;
     */&lt;br /&gt;
	virtual ~CogniteamClass();&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Public type alias for convenient&lt;br /&gt;
     */&lt;br /&gt;
    using Ptr = shared_ptr&amp;lt;CogniteamClass&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
    using ConstPtr = shared_ptr&amp;lt;CogniteamClass const&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Public member methods&lt;br /&gt;
    // NO PUBLIC VARIABLE ALLOWED - USE GETTERS AND SETTERS&lt;br /&gt;
    //&lt;br /&gt;
    // Getter &amp;amp; Setter example for member variable object_:&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Set the Var object&lt;br /&gt;
     * @note inline setters &amp;amp; getters&lt;br /&gt;
     * @note Use const methods for getters&lt;br /&gt;
     * @note Setters and getters must be as short as possible, ideally, &lt;br /&gt;
     *       one copy assignment and one return: &lt;br /&gt;
     * @param var &lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    inline void setObject(Object&amp;amp; object) {&lt;br /&gt;
        object_ = object;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Gets the Object object&lt;br /&gt;
     * @return Object &lt;br /&gt;
     */&lt;br /&gt;
    inline Object getObject() const {&lt;br /&gt;
        return object_;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Use prefix T for template parameters (MessageT, ServiceT, PacketT...)&lt;br /&gt;
     * @tparam ObjectT &lt;br /&gt;
     * @param object &lt;br /&gt;
     */&lt;br /&gt;
    template &amp;lt;typename ObjectT&amp;gt;&lt;br /&gt;
    void templateMethod(const ObjectT&amp;amp; object) {&lt;br /&gt;
        // ...&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected method, visible by this and derived classes&lt;br /&gt;
     * @return int &lt;br /&gt;
     */&lt;br /&gt;
    int protectedMethod();&lt;br /&gt;
&lt;br /&gt;
protected:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Protected member variables&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Protected member variable, visible by this and derived classes&lt;br /&gt;
     */&lt;br /&gt;
    int protectedMemberVariable_ = 0;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Runs my algorithm &lt;br /&gt;
     * @param param1 First parameter&lt;br /&gt;
     * @param param2 Second parameter&lt;br /&gt;
     * @param param3 Another parameter&lt;br /&gt;
     * @return true If success&lt;br /&gt;
     * @return false If failure&lt;br /&gt;
     */&lt;br /&gt;
    bool runAlgorithm(double param1, double param2, double param3);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Calculates a number such that...&lt;br /&gt;
     * @param param1 First param for calculationg&lt;br /&gt;
     * @return double Calculation result&lt;br /&gt;
     */&lt;br /&gt;
    double calculateNumber(double param1) const;&lt;br /&gt;
&lt;br /&gt;
private:&lt;br /&gt;
&lt;br /&gt;
    //&lt;br /&gt;
    // Private member methods&lt;br /&gt;
    //&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Const member example, upper case with underscore, place const's first&lt;br /&gt;
     */&lt;br /&gt;
	const string CONST_MEMBER_STRING = &amp;quot;monitor_red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Private variable, visible by this class only&lt;br /&gt;
     */&lt;br /&gt;
	Object object_;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
} /* namespace widgets */&lt;br /&gt;
} /* namespace ocu */&lt;br /&gt;
} /* namespace lynx */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
#endif /* PATH_TO_FILE_AND_FILE_NAME_ */&lt;br /&gt;
                                                                  // new line&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1178</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=1178"/>
				<updated>2019-12-30T11:12:44Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
== Our recent talks at meetups and conferences ==&lt;br /&gt;
* Israel Robotics Meetup #7 - Introduction to SLAM | Dr. Yehuda Elmaliah (CEO @ Cogniteam)&lt;br /&gt;
[[File:YehudaMeetup7.png|thumb]] [[https://www.youtube.com/watch?v=E9IpPfwIyJI]]&lt;br /&gt;
&lt;br /&gt;
* Robotic Meetup #1- Developing Autonomous Things | Ari Yakir (VP R&amp;amp;D @ Cogniteam) &lt;br /&gt;
[[File:AriYakirMeetup.mp4.png|thumb]] [[https://www.youtube.com/watch?v=V8rHo_QpWTU]]&lt;br /&gt;
&lt;br /&gt;
== For developers == &lt;br /&gt;
* [[Cogniteam/CodeConvention|Code conventions]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1061</id>
		<title>Debian repository</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1061"/>
				<updated>2019-12-04T12:07:24Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= Cogniteam's debian repositories setup =&lt;br /&gt;
 &lt;br /&gt;
=== Setup APT sources list ===&lt;br /&gt;
Add Cogniteam's APT repository to your APT sources list:  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo sh -c 'echo &amp;quot;deb deb ftp://USER:PASSWORD@apt.cogni.io bionic $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/apt-cogni-io.list'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: change '''USER''' and '''PASSWORD''' with credentials provided to you''&lt;br /&gt;
&lt;br /&gt;
=== Setup APT keys ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wget -O - ftp://public:public@apt.cogni.io/apt_cogni_io.gpg.key | sudo apt-key add -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update APT index ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1060</id>
		<title>Debian repository</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Debian_repository&amp;diff=1060"/>
				<updated>2019-12-04T12:06:04Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot; == Repository setup ==   === Setup APT sources list === Add Cogniteam's APT repository to your APT sources list:   &amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt; sudo sh -c 'echo &amp;quot;deb deb ftp:...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Repository setup ==&lt;br /&gt;
 &lt;br /&gt;
=== Setup APT sources list ===&lt;br /&gt;
Add Cogniteam's APT repository to your APT sources list:  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo sh -c 'echo &amp;quot;deb deb ftp://USER:PASSWORD@apt.cogni.io bionic $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/apt-cogni-io.list'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
''Note: change '''USER''' and '''PASSWORD''' with credentials provided to you''&lt;br /&gt;
&lt;br /&gt;
=== Setup APT keys ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wget -O - ftp://public:public@apt.cogni.io/apt_cogni_io.gpg.key | sudo apt-key add -&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update APT index ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt update&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=:Restricted&amp;diff=1056</id>
		<title>:Restricted</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=:Restricted&amp;diff=1056"/>
				<updated>2019-12-01T12:02:51Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot;Test&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Test&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=DMS&amp;diff=1045</id>
		<title>DMS</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=DMS&amp;diff=1045"/>
				<updated>2019-12-01T10:46:22Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot;DMS ---&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DMS&lt;br /&gt;
---&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=860</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=860"/>
				<updated>2019-03-19T15:43:28Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
[[File:big_buck_bunny.mp4]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=859</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=859"/>
				<updated>2019-03-19T15:43:06Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
[[:File:big_buck_bunny.mp4]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=File:Big_buck_bunny.mp4&amp;diff=858</id>
		<title>File:Big buck bunny.mp4</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=File:Big_buck_bunny.mp4&amp;diff=858"/>
				<updated>2019-03-19T15:42:48Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=857</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=857"/>
				<updated>2019-03-19T15:41:07Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=856</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=856"/>
				<updated>2019-03-19T15:38:27Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Example.mp4]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=854</id>
		<title>Cogniteam</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Cogniteam&amp;diff=854"/>
				<updated>2019-03-19T15:34:37Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;Welcome to Cogniteam's wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Visit our website to hear about exciting new products &lt;br /&gt;
[http://www.cogniteam.com Cogniteam]&lt;br /&gt;
&lt;br /&gt;
This wiki purpose is to give support for a wide range of products&lt;br /&gt;
and help back the community in a range of development issues we encounter daily.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;iframe width=&amp;quot;1745&amp;quot; height=&amp;quot;982&amp;quot; src=&amp;quot;https://www.youtube.com/embed/Tf-zb6VgZsE&amp;quot; frameborder=&amp;quot;0&amp;quot; allow=&amp;quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&amp;quot; allowfullscreen&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=810</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=810"/>
				<updated>2019-02-04T14:04:18Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Raspberry Pi tensorflow detection SD image install and run instructions&lt;br /&gt;
&lt;br /&gt;
== Create SD card ==&lt;br /&gt;
# Unzip compressed image:&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Power up &amp;amp; network configuration ==&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote image viewer ==&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Connect to remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=809</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=809"/>
				<updated>2019-02-04T13:23:04Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Raspberry Pi tensorflow detection SD image install and run instructions&lt;br /&gt;
&lt;br /&gt;
== Create SD card ==&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Power up &amp;amp; network configuration ==&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote image viewer ==&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Connect to remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=808</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=808"/>
				<updated>2019-02-04T13:21:56Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Raspberry Pi tensorflow detection SD image install and run instructions =&lt;br /&gt;
&lt;br /&gt;
== Create SD card ==&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Power up &amp;amp; network configuration ==&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote image viewer ==&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Connect to remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=807</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=807"/>
				<updated>2019-02-04T13:21:25Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Raspberry Pi tensorflow detection SD image install and run instructions =&lt;br /&gt;
&lt;br /&gt;
=== Create SD card ===&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Power up &amp;amp; network configuration ===&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote image viewer ===&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Connect to remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=806</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=806"/>
				<updated>2019-02-04T13:19:44Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Create SD card ===&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Power up &amp;amp; network configuration ===&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote image viewer ===&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Connect to remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=805</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=805"/>
				<updated>2019-02-04T13:17:40Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Create SD card ===&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Power up &amp;amp; network configuration ===&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote image viewer ===&lt;br /&gt;
# On a computer connected to the same network, first, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=804</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=804"/>
				<updated>2019-02-04T13:15:07Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Create SD card ===&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Power up &amp;amp; network configuration ===&lt;br /&gt;
# Connect your raspberry pi to good power supply (5V, 2A at least), connect keyboard and monitor&lt;br /&gt;
# Login:&lt;br /&gt;
#: Username: '''root'''&lt;br /&gt;
#: Password: '''raspberry'''&lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit '''/root/detection.config''':&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
Now everything is ready for running detection, connect a regular USB webcam and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote image viewer ===&lt;br /&gt;
# First, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=803</id>
		<title>TensorflowPi</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=TensorflowPi&amp;diff=803"/>
				<updated>2019-02-04T12:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot; === Create SD card === # Copy raspberry pi disk image to SD card (8Gb minimum): #: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt; #: &amp;lt;pre&amp;gt;sudo dd if=pi_mobile...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Create SD card ===&lt;br /&gt;
# Copy raspberry pi disk image to SD card (8Gb minimum):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;tar xf pi_mobilenet_embedded_0_5_aarch64.img.tar.xz&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo dd if=pi_mobilenet_embedded_0_5_aarch64.img of=/dev/YOU_SD_DEVICE bs=4M&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure network ===&lt;br /&gt;
# Power up raspberry pi, connect keyboard and monitor  &lt;br /&gt;
# Edit '''/etc/network/interfaces.d/eth0''':&lt;br /&gt;
#: Set your local network IP settings  &lt;br /&gt;
# Edit /root/detection.config:&lt;br /&gt;
#: Set ROS_IP to your IP address  &lt;br /&gt;
# '''sudo reboot'''&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
Now everything is ready for running detection:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
roslaunch tensorflow_detection tensorflow_detection.launch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remote image viewer ===&lt;br /&gt;
# First, install ROS (Ubuntu 16.04):&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main&amp;quot; &amp;gt; /etc/apt/sources.list.d/ros-latest.list'&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;sudo apt install ros-kinetic-rqt-image-view&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup ROS environment&lt;br /&gt;
#: &amp;lt;pre&amp;gt;source /opt/ros/kinetic/setup.bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Setup remote ROS server&lt;br /&gt;
#: &amp;lt;pre&amp;gt;export ROS_IP=IP_OF_RASPBERRY_PI&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;rqt_image_view&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=HamsterSDLog&amp;diff=525</id>
		<title>HamsterSDLog</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=HamsterSDLog&amp;diff=525"/>
				<updated>2017-04-02T11:42:38Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:HamsterV5]]&lt;br /&gt;
[[Category:HamsterV4]]&lt;br /&gt;
[[Category:Hamster]]&lt;br /&gt;
&lt;br /&gt;
==Hamster v4==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Ubuntu 14.04 Trusty + ROS Indigo, RPi 2 (trusty-indigo-*.img)&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 3.0 [http://google.com master] | [http://google.com slave]&lt;br /&gt;
 - all packages replaced on master&lt;br /&gt;
&lt;br /&gt;
* 2.2&lt;br /&gt;
 - laser_noise_filter compiled on master&lt;br /&gt;
 - hamster_gps_localization compiled on slave&lt;br /&gt;
 - missing nmea_navsat_driver installed on slave&lt;br /&gt;
&lt;br /&gt;
* 2.1&lt;br /&gt;
 - Speed limited in mapping mode&lt;br /&gt;
&lt;br /&gt;
* 2.0&lt;br /&gt;
 - New rtl8812au driver - http://git.cogni.io/hamster/rtl8812au&lt;br /&gt;
 - Network issues seem to be fixed&lt;br /&gt;
 - ntpdate server in hamster-startup script changed to HAMSTER_ROS_MASTER_IP&lt;br /&gt;
 - Updated hamster packages&lt;br /&gt;
 - hamster_driver: speed watchdog added (stops if no velocity command received in 0.5s)&lt;br /&gt;
&lt;br /&gt;
* 1.0&lt;br /&gt;
 - Initial version&lt;br /&gt;
&lt;br /&gt;
==Hamster v5==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Ubuntu 16.04 Trusty + ROS Kinetic, RPi 3 (xenial-kinetic-*.img)&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 3.0&lt;br /&gt;
 - API installed&lt;br /&gt;
&lt;br /&gt;
* 2.1&lt;br /&gt;
 - Gmapping installed&lt;br /&gt;
&lt;br /&gt;
* 2.0&lt;br /&gt;
 - All packages except hamster_gps_localization and nmea_navsat_driver replaced on master&lt;br /&gt;
&lt;br /&gt;
* 1.1&lt;br /&gt;
 - Improved IMU calibration&lt;br /&gt;
 - Serial port re-opening fixed&lt;br /&gt;
 - Gyro calibration added&lt;br /&gt;
 - Encoder odometry added&lt;br /&gt;
&lt;br /&gt;
* 1.0&lt;br /&gt;
 - Initial version&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=HamsterSDLog&amp;diff=524</id>
		<title>HamsterSDLog</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=HamsterSDLog&amp;diff=524"/>
				<updated>2017-04-02T11:37:18Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:HamsterV5]]&lt;br /&gt;
[[Category:HamsterV4]]&lt;br /&gt;
[[Category:Hamster]]&lt;br /&gt;
&lt;br /&gt;
==Hamster v4==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Ubuntu 14.04 Trusty + ROS Indigo, RPi 2 (trusty-indigo-*.img)&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 3.0&lt;br /&gt;
 - all packages replaced on master&lt;br /&gt;
&lt;br /&gt;
* 2.2&lt;br /&gt;
 - laser_noise_filter compiled on master&lt;br /&gt;
 - hamster_gps_localization compiled on slave&lt;br /&gt;
 - missing nmea_navsat_driver installed on slave&lt;br /&gt;
&lt;br /&gt;
* 2.1&lt;br /&gt;
 - Speed limited in mapping mode&lt;br /&gt;
&lt;br /&gt;
* 2.0&lt;br /&gt;
 - New rtl8812au driver - http://git.cogni.io/hamster/rtl8812au&lt;br /&gt;
 - Network issues seem to be fixed&lt;br /&gt;
 - ntpdate server in hamster-startup script changed to HAMSTER_ROS_MASTER_IP&lt;br /&gt;
 - Updated hamster packages&lt;br /&gt;
 - hamster_driver: speed watchdog added (stops if no velocity command received in 0.5s)&lt;br /&gt;
&lt;br /&gt;
* 1.0&lt;br /&gt;
 - Initial version&lt;br /&gt;
&lt;br /&gt;
==Hamster v5==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Ubuntu 16.04 Trusty + ROS Kinetic, RPi 3 (xenial-kinetic-*.img)&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 3.0&lt;br /&gt;
 - API installed&lt;br /&gt;
&lt;br /&gt;
* 2.1&lt;br /&gt;
 - Gmapping installed&lt;br /&gt;
&lt;br /&gt;
* 2.0&lt;br /&gt;
 - All packages except hamster_gps_localization and nmea_navsat_driver replaced on master&lt;br /&gt;
&lt;br /&gt;
* 1.1&lt;br /&gt;
 - Improved IMU calibration&lt;br /&gt;
 - Serial port re-opening fixed&lt;br /&gt;
 - Gyro calibration added&lt;br /&gt;
 - Encoder odometry added&lt;br /&gt;
&lt;br /&gt;
* 1.0&lt;br /&gt;
 - Initial version&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Category:Pengo&amp;diff=414</id>
		<title>Category:Pengo</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Category:Pengo&amp;diff=414"/>
				<updated>2017-03-09T13:24:32Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;accesscontrolx&amp;gt;Wiki.viewers.full&amp;lt;/accesscontrolx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:Pengo}}&lt;br /&gt;
[[File:WhatsApp Image 2016-11-02 at 11.07.40.jpeg|200px|thumb]]&lt;br /&gt;
=== Pengo Educational Robot ===&lt;br /&gt;
Pengo includes&lt;br /&gt;
* 3D camera&lt;br /&gt;
* 2D Lidar&lt;br /&gt;
* Speakers&lt;br /&gt;
* Lilt unit&lt;br /&gt;
* Bumper sensor&lt;br /&gt;
* Battery monitoring&lt;br /&gt;
* Charging base unit&lt;br /&gt;
* 2 Linux servers pre-configured with ROS&lt;br /&gt;
* Screen with animation for HMI, ROS controlled&lt;br /&gt;
&lt;br /&gt;
== Pengo documentation ==&lt;br /&gt;
Pengo documentation can be found here (Password protected)&lt;br /&gt;
[http://cloud.cogni.io/index.php/s/SeR4bpxj7zFbI89 Pengo]&lt;br /&gt;
&lt;br /&gt;
== Confidential ==&lt;br /&gt;
This page needs permissions, sorry for the inconvenience.&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=:Wiki.viewers.full&amp;diff=408</id>
		<title>:Wiki.viewers.full</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=:Wiki.viewers.full&amp;diff=408"/>
				<updated>2017-03-09T13:20:06Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot;*blackpc&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*blackpc&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=:Dummy&amp;diff=405</id>
		<title>:Dummy</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=:Dummy&amp;diff=405"/>
				<updated>2017-03-09T13:12:16Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Blackpc moved page Dummy to Foo:Dummy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dummy&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=Dummy&amp;diff=406</id>
		<title>Dummy</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=Dummy&amp;diff=406"/>
				<updated>2017-03-09T13:12:16Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Blackpc moved page Dummy to Foo:Dummy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Foo:Dummy]]&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	<entry>
		<id>http://wiki.cognimbus.com/index.php?title=:Dummy&amp;diff=404</id>
		<title>:Dummy</title>
		<link rel="alternate" type="text/html" href="http://wiki.cognimbus.com/index.php?title=:Dummy&amp;diff=404"/>
				<updated>2017-03-09T13:12:01Z</updated>
		
		<summary type="html">&lt;p&gt;Blackpc: Created page with &amp;quot;Dummy&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dummy&lt;/div&gt;</summary>
		<author><name>Blackpc</name></author>	</entry>

	</feed>