Competition Tasks - MRoboSub/mrobosub GitHub Wiki

  • ml_srv_node.py
    • Main node for ML
    • Loads model (you might need to pip3 install -r requirements.txt located in the yolo folder to do this)
    • Creates service for each of the 6 objects (’object_position/{name}’)
      • Returns most recent object position
      • Structure of ObjectPosition:
        • bool found
        • float32 x_position # Center of bounding box in pixels from left
        • float32 y_position # Center of bounding box in pixels from top
        • float32 x_theta # X theta (degrees) needed to center the sub on the bounding box on the x axis
        • float32 y_theta # Y theta (degrees) needed to center the sub on the bounding box on the y axis
        • float32 confidence # Model confidence value of detected object
    • Publishes bounding box image to /object_position/bbox
    • Subscribe to the ZED left image and depth topics
      • Callback:
        • Runs detection on the img from zed
        • Prints detection result
        • For each detection
          • Prints x_pos, y_pos, theta_x, theta_y of the center bounding boxes
          • Updates object_position_result (ObjectPositionResponse)
          • Draw bounding boxes
        • Publish bounding box message
  • pathmarker.py
    • Pathmarker Node
    • Gets parameter
      • hue_lo, hue_hi #hue threshold
      • sat_lo, sat_hi #saturation threshold
      • val_lo, val_hi #value threshold
      • lines_min_len , lines_angle_lo, lines_angle_hi
    • Creates ‘pathmarker/angle’ service
      • Returns found and angle
      • Structure:
        • bool found
        • float32 angle
    • Subscribes to ‘bot_cam’ topic
      • Callback:
        • Processes image from bottom camera with PathmarkerPipeline
        • Updates found and angle
  • pipeline.py
    • Auto-generated code from GRIP for bottom cam processing
    • Used by pathmarker.py
⚠️ **GitHub.com Fallback** ⚠️