All vision nodes declared across the entire mission YAML are launched at startup and run for the full mission duration, regardless of which mode is currently active. A mission with 3 modes and each (one calling vision node) launches all 3 nodes simultaneously even though only 1 is ever active at a time and getting service calls. Even tho cv algs are only run on service calls, there is still unnecessary overhead with subscriptions and image copying. Performance could scale poorly as modes sequence get longer
Potential fixes:
(1) ROS2 lifecycle nodes: Mode Manager can manage lifecycles of vision nodes (deactivate nodes once later modes don't use them anymore). this doesn't dynamically spin up /destroy vision nodes, but removes subcription overhead
(2) Move cv algs to classes and have one vision node per camera subscription topic. Currently most vision nodes only run one cv alg -- we should change it so that each vision node isn't responsible for a specific cv algorithm, but instead can be able to run a variety of cv algs on it's camera stream
(monorepo alr supports this, so we can just generalize vision nodes (etc. all payload cv algs go under "PayloadVisionNode" and just have multiple services on that)
All vision nodes declared across the entire mission YAML are launched at startup and run for the full mission duration, regardless of which mode is currently active. A mission with 3 modes and each (one calling vision node) launches all 3 nodes simultaneously even though only 1 is ever active at a time and getting service calls. Even tho cv algs are only run on service calls, there is still unnecessary overhead with subscriptions and image copying. Performance could scale poorly as modes sequence get longer
Potential fixes:
(1) ROS2 lifecycle nodes: Mode Manager can manage lifecycles of vision nodes (deactivate nodes once later modes don't use them anymore). this doesn't dynamically spin up /destroy vision nodes, but removes subcription overhead
(2) Move cv algs to classes and have one vision node per camera subscription topic. Currently most vision nodes only run one cv alg -- we should change it so that each vision node isn't responsible for a specific cv algorithm, but instead can be able to run a variety of cv algs on it's camera stream
(monorepo alr supports this, so we can just generalize vision nodes (etc. all payload cv algs go under "PayloadVisionNode" and just have multiple services on that)