-
Notifications
You must be signed in to change notification settings - Fork 2
/
CommentingTemplate.py
78 lines (58 loc) · 2.05 KB
/
CommentingTemplate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
##############################################################################
#File Name (CommentingTemplate.py)
#Authors (put your name here if you make any major revisions)
'''
Description (what does this node do?)
'''
'''
How do you call this node?
rosrun <PackageName> <NodeName (usually the name of the file)> <parameters>
'''
#Topics this node is subscribed to
#Topics this node publishes to
#Services this node uses
#Other dependencies?
##############################################################################
#include
...
...
#CONSTANTS (organize these as necessary)
#names for constants should be in ALL CAPS
...
...
##############################################################################
#Setup
#every node should have one
def Setup(params):
'''
body of setup function
Run all prequisite code to prepare for the main loop.
MAKE SURE YOUR EDITOR USES 4 SPACES FOR TABS
'''
#Loop
#every node should have one
def Loop(params):
'''
body of the main loop
MAKE SURE YOUR EDITOR USES 4 SPACES FOR TABS
'''
##############################################################################
#Helper Functions
'''
function header
what does it return? what parameters? general description.
'''
def Foo(params):
'''
body of function
MAKE SURE YOUR EDITOR USES 4 SPACES FOR TABS
'''
##############################################################################
## Notes ## (not a part of the template)
# Other conventions
# All names should be descriptive of whatever it is!
# All function names should be camelcase and begin with a capital letter (FunctionName)
# All names of classes should be camelcase and begin with a capital letter (ClassName)
# All variable names should be camelcase and begin with a lowercase letter (variableName)
# All names for constants should be in all caps with underscores for spacing (CONSTANT_NAME)
#If you installed any libraries or other packages that your code depends on, make sure you make note of that!