Commit 5360041c authored by Chanelle Lee's avatar Chanelle Lee
Browse files

Added todo notes and also added exception capture for the unicode error as...

Added todo notes and also added exception capture for the unicode error as can't quite figure out what's causing it.
parent 9129adff
import logging.config
import logging
import vrep
import time
......@@ -23,7 +22,7 @@ def main(numSims=10):
time.sleep(5)
testParams = pd.read_csv('testParams.csv', index_col='paramSet')
for paramNum in set(testParams.index.values):
if paramNum < 7: # This just allows us to skip the ones already tested
if paramNum < 11: # This just allows us to skip the ones already tested
continue
logger.info('Param num: {}'.format(paramNum))
simNum = 0
......
Code:
☐ Investigate why botSimMain not logging to the console?
Experiments:
☐ Need to finish ParamSet 10 (3-10) and add it to _2 logs
_1 logs contain paramSets 1-6 complete
_2 logs contain paramsets 7-9 complete and 10 partial (1-2)
Analysis:
......@@ -59,8 +59,8 @@ qualname = bestOfN_lightReadings
propagate = 0
[logger_myThreads]
handlers = consoleHandler
level = INFO
handlers = fileHandler
level = WARN
qualname = myThreads
propagate = 0
......
......@@ -5,7 +5,6 @@ import logging
logger = logging.getLogger(__name__)
class StoppableThread(threading.Thread):
"""Thread class with a stop() method. The thread itself has to check
regularly for the stopped() condition."""
......@@ -54,10 +53,18 @@ class ControllerThread(threading.Thread):
while not self.stopped() and retFlag is False:
if timestep > 2500:
retFlag = True
logger.warning('Forced stop for params {0} sim {1}'
''.format(self.paramNum, self.simNum))
logger.warning('Forced stop for params {0} sim '
'{1}'.format(self.paramNum,
self.simNum))
break
try:
retFlag = self.ePuck.controller()
except UnicodeDecodeError: # Watching for errors in send msg
logger.warning('Forced stop for params {0} sim '
'{1}'.format(self.paramNum,
self.simNum))
retFlag = True
break
retFlag = self.ePuck.controller()
self.ePuck.move()
if (timestep % 10) == 0:
self.ePuck.logBelief(timestep)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment