mirror of
https://github.com/PotentiaRobotics/engine-software.git
synced 2025-04-09 23:00:21 -04:00
Initial class
This commit is contained in:
parent
414129fe48
commit
e31ad42c8c
30
simulation/controllers/olympian/Propioception.py
Normal file
30
simulation/controllers/olympian/Propioception.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
|
||||
class Propioception:
|
||||
def __init__(self):
|
||||
self.data = {
|
||||
'locationX' = 0,
|
||||
'locationY' = 0,
|
||||
'locationZ' = 0,
|
||||
''
|
||||
}
|
||||
|
||||
def update(self, partsAndValues):
|
||||
"""
|
||||
This function updates the dictionary
|
||||
|
||||
arg artsAndValues is {string --> int or float}
|
||||
|
||||
Error codes:
|
||||
1 is success
|
||||
-1 is the error for NoneType variables
|
||||
-2 is for incorrect datatypes
|
||||
"""
|
||||
|
||||
if partsAndValues == None:
|
||||
return -1
|
||||
|
||||
if type(partsAndValues) != dict:
|
||||
return -2
|
||||
|
||||
for key in partsAndValues.keys():
|
||||
self.data[key] = partsAndValues[key]
|
Loading…
Reference in New Issue
Block a user