API Reference

C++, Python, and ROS 2 interfaces. SDK version: v1.4.2.

FusionConfig

Configuration struct for the fusion engine. Passed at runtime initialization; runtime must be stopped and restarted to apply config changes.

FieldTypeDefaultDescription
lidar_modelLiDARModelMID_16LiDAR channel and range profile. Affects point cloud density assumptions in the fusion pass.
camera_modeCameraModeMONOCamera fusion mode. NONE, MONO, or STEREO.
drift_modelDriftModelWAREHOUSE_INDOORProcess noise model for extrinsic drift estimation. Choose the model closest to your chassis vibration profile.
power_profilePowerProfileBALANCEDFULL, BALANCED, or LOW_POWER. Controls GPU occupancy and update frequency.
occ_resolutionfloat0.05fOccupancy grid cell size in meters. Minimum 0.02f, maximum 0.25f.
pred_horizonsstd::vector<float>{0.5, 1.0}Prediction horizons in seconds. Each value adds compute proportional to the number of tracked agents.
degraded_policyDegradedModePolicyREDUCE_CONFIDENCEBehavior when fusion confidence drops. REDUCE_CONFIDENCE (continues at lower speed) or HALT (triggers emergency stop).

FusionFrame

Output struct delivered to the on_fusion_ready callback on each sensor cycle. All fields are read-only within the callback scope.

FieldTypeDescription
occupancy_gridOccupancyGrid2D probability grid at configured resolution. Use grid.at(x, y) for per-cell occupancy probability (0.0–1.0).
risk_scoresstd::vector<RiskScore>Per-obstacle risk scores at each configured prediction horizon. Each RiskScore contains obstacle_id, horizon_s, and probability.
pose_estimateSE3PoseCurrent ego pose estimate (x, y, theta + covariance). Empty if no map is loaded.
fusion_statusFusionStatusStatus flags: OK, TEMPORAL_GAP, DEGRADED, LIDAR_OFFLINE, CAMERA_OFFLINE.
latency_msuint32_tEnd-to-end latency from earliest sensor frame to callback invocation, in milliseconds.
frame_iduint64_tMonotonically increasing frame counter. Use for gap detection.

PathVyntRuntime

C++ Runtime class signature
class PathVyntRuntime {
public:
  PathVyntRuntime(const FusionConfig& cfg,
                  const std::string& map_path = "");

  // Register fusion output callback
  void on_fusion_ready(std::function<void(const FusionFrame&)>);

  void start();       // Initialize sensors and start pipeline
  void stop();        // Graceful shutdown
  void spin_once();   // Process one sensor cycle (blocking)

  // Dynamic map patch (no restart required)
  void patch_map(const std::string& patch_path);
};

Python bindings

Python Python binding example
import pathvynt as pv

cfg = pv.FusionConfig()
cfg.lidar_model  = pv.LiDARModel.MID_16
cfg.power_profile = pv.PowerProfile.BALANCED

rt = pv.PathVyntRuntime(cfg)

def on_frame(frame):
    print(f"latency={frame.latency_ms}ms status={frame.fusion_status}")

rt.on_fusion_ready(on_frame)
rt.start()

while True:
    rt.spin_once()

ROS 2 interface

The ROS 2 bridge publishes fusion output to standard and PathVynt-specific topics. Subscribe to whichever your planner consumes.

TopicTypeRateDescription
/pathvynt/occupancy_gridnav_msgs/OccupancyGrid20HzStandard occupancy grid. Compatible with Nav2 planners.
/pathvynt/risk_scorespathvynt_msgs/RiskScoreArray20HzPer-obstacle risk scores at configured horizons.
/pathvynt/posegeometry_msgs/PoseWithCovarianceStamped10HzLocalization output. Empty if no map loaded.
/pathvynt/statuspathvynt_msgs/FusionStatus1HzHealth and diagnostics flags.