ProgrammingRobotsStudyGroup / robo_magellan

Apache License 2.0
4 stars 6 forks source link

Cone_code.py list index out of range #7

Closed pryme closed 6 years ago

pryme commented 7 years ago

Intermittently cone.code.py gets a list index out of range error. Error message:


Exception in thread Thread-24061:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/robot/catkin_ws/src/robo_magellan/scripts/detect_cones.py", line 121, in processImage
    poses, listOfCones = self.cf.find_cones(cvRGB, cvDepth)
  File "/home/robot/catkin_ws/src/robo_magellan/scripts/cone_code.py", line 218, in find_cones
    if len(hull) >= 3 and self._convexHullIsPointingUp(hull):
  File "/home/robot/catkin_ws/src/robo_magellan/scripts/cone_code.py", line 102, in _convexHullIsPointingUp
    intLeftMostPointBelowCenter = listOfPointsBelowCenter[0][0][0]
IndexError: list index out of range```
merose commented 6 years ago

Will close, since can no longer duplicate.