UBCSailbot / tasks

Repository to track tasks not related to any of our GitHub repositories
0 stars 0 forks source link

Handle sensors breaking #7

Open patrick-5546 opened 1 year ago

patrick-5546 commented 1 year ago

Currently local pathfinding depends on all sensors in the global variables ACTIVE_GPS_SENSORS and ACTIVE_WIND_SENSORS working: local-pathfinding/python/ros_interface.py. What is the likelihood of a GPS or wind sensor breaking, and how can we detect this? From our latest dry land test, GPS CAN could lose signal, which would cause it to not publish new data. 3 ways to handle this come to mind:

  1. Assume this will never happen again (-_-)
  2. Only use GPS AIS (simplest solution, and we probably don't gain much accuracy by average GPS AIS and CAN anyways; we already tested that they have the same accuracy and precision)
  3. When GPS CAN is not publishing new data publish GPS AIS in the GPS CAN field

Related questions to consider

hhenry01 commented 1 year ago
  1. This would also assume that GPS AIS never fails.
  2. Assuming the GPS AIS doesn't fail, we need some way to determine if it's failing. Would something like "if the GPS CAN coordinates don't change for X seconds/minutes but the GPS AIS coordinates do, then the GPS CAN is failing" work?
patrick-5546 commented 1 year ago

Until proven otherwise, assume GPS AIS is reliable