Overslaan naar inhoud
CTech Digital
  • Startpagina
  • Odoo services
  • AI services
  • Contact
  • 0
  • Nederlands (BE) English (UK) Français
CTech Digital
  • 0
    • Startpagina
    • Odoo services
    • AI services
    • Contact
  • Nederlands (BE) English (UK) Français

Vicon Driver testing

  • Alle blogs
  • Daily blog
  • Vicon Driver testing
  • 13 december 2025 in
    CTech Metrology, Luc Wens

    Vicon Driver Testing Guide

    Proxy Architecture Overview

    CTrack uses a proxy-based architecture for communicating with external measurement devices. Instead of embedding device-specific code directly into the main application, each device driver runs as a separate executable that communicates with CTrack via TCP/IP.

    Advantages of the Proxy Approach

    Stress Testing the Vicon Driver

    The Vicon proxy includes a built-in stress test facility to verify communication stability over extended periods. This is essential for validating that the driver can maintain reliable connections during long measurement sessions.

    Starting the Stress Test

    1. Launch the Vicon proxy executable
    2. Press z to start the stress test
    3. Press y to stop the stress test

    Test Phases

    The stress test executes in four phases:

    Action Types

    ActionDescription
    Hardware DetectRe-detect Vicon hardware
    Config DetectRe-detect markers and subjects
    Start TrackingBegin frame acquisition at 50 Hz
    Stop TrackingEnd frame acquisition
    Wait ShortWait 5-30 seconds
    Wait MediumWait 30-120 seconds
    Wait LongWait 2-5 minutes

    Tracking State Machine

    When tracking is active, the stress test enforces a minimum measurement duration (10-120 seconds randomly selected) before allowing stop:

    Frame Processing During Tracking

    While tracking is active, the stress test:

    • Calls Run() at approximately 50 Hz to process incoming frames
    • Displays frame number and FPS in the console's top-right corner
    • Logs frame processing statistics every 10 seconds

    ConsoleVicon SDKDriverViconStressTestConsoleVicon SDKDriverViconStressTestloop[Every ~20ms (50 Hz)]Run()GetFrame()Frame DataProcess 6DOF & MarkersPrintStatusTopRight(Frame, FPS)true

    Tracy Profiling Integration

    Prerequisites

    Tracy profiling is only active in the Profiler build configuration, which defines:

    • TRACY_ENABLE - Enables Tracy instrumentation
    • TRACY_ON_DEMAND - Only captures when Tracy profiler is connected

    Zone Color Coding

    DriverVicon.cpp
    FunctionZone NameColorHex CodeDescription
    Connect()Vicon::Connect Blue0x4488FFEstablishes connection to Vicon DataStream server
    Disconnect()Vicon::Disconnect Red0xFF4444Disconnects from Vicon DataStream server
    HardwareDetect()Vicon::HardwareDetect Green0x44FF44Detects connected Vicon cameras
    ConfigDetect()Vicon::ConfigDetect Orange0xFFAA00Detects markers and 6DOF subjects
    CheckInitialize()Vicon::CheckInitialize Cyan0x00FFFFInitializes tracking at specified frequency
    Run()Vicon::Run Magenta0xFF00FFProcesses incoming frame data
    GetValues()Vicon::GetValues Light Blue0x8888FFRetrieves current tracking values
    ShutDown()Vicon::ShutDown Dark Orange0xFF8800Stops tracking and disconnects
    StressTest.cpp
    FunctionZone NameColorHex CodeDescription
    DoHardwareDetect()StressTest::HardwareDetect Green0x44FF44Stress test hardware detection action
    DoConfigDetect()StressTest::ConfigDetect Orange0xFFAA00Stress test configuration detection action
    DoStartTracking()StressTest::StartTracking Cyan0x00FFFFStress test start tracking action
    DoStopTracking()StressTest::StopTracking Red0xFF4444Stress test stop tracking action
    DoShutdown()StressTest::Shutdown Dark Orange0xFF8800Stress test final shutdown action
    DoWait()StressTest::Wait Gray0x888888Stress test wait period

    Message Color Coding

    Tracy messages are sent from the StressTest logging functions to provide real-time visibility into test progress.

    Log LevelColorHex CodeUsage
    Info Green0x44FF44General information messages
    Warning Yellow0xFFFF00Warning conditions
    Error Red0xFF4444Error conditions
    Action Success Green0x44FF44Successful action completion
    Action Failure Red0xFF4444Failed action completion

    Color Reference

    Color NameSampleHex CodeUsage
    Blue#4488FFConnection operations
    Light Blue#8888FFData retrieval
    Cyan#00FFFFInitialization/Start
    Green#44FF44Detection/Success/Info
    Orange#FFAA00Configuration
    Dark Orange#FF8800Shutdown
    Red#FF4444Disconnect/Stop/Error
    Magenta#FF00FFRuntime processing
    Yellow#FFFF00Warnings
    Gray#888888Waiting/Idle

    Usage

    1. Build the Vicon proxy using the Profiler|x64 configuration
    2. Run the Vicon proxy executable
    3. Connect the Tracy profiler application to capture data
    4. Zones will appear in the timeline view with their assigned colors
    5. Messages will appear in the messages panel with color coding

    Stress Test Sequence

    When running the stress test (press 'z' to start, 'y' to stop):

    1. Phase 1: Hardware Detection 
    2. Phase 2: Configuration Detection 
    3. Phase 3: Random Actions (various colors based on action)
    4. Phase 4: Final Shutdown 

    All phases emit Tracy messages for detailed logging visibility.

    Log File Output

    All stress test activity is logged to a dedicated file for post-test analysis.

    Log File Location

    Proxies/Log/ViconStressTest_YYYYMMDD_HHMMSS.log
    

    Log Structure

    Log Format

    Each log entry includes:

    [YYYY-MM-DD HH:MM:SS.mmm] [LEVEL] Message
    

    Levels: INFO, WARNING, ERROR

    Log Contents

    The log file records:

    1. Test Configuration - Start time, test parameters, measurement duration range
    2. Action Results - Each action with success/failure status and duration
    3. Hardware Information - Detected cameras, markers, and 6DOF subjects
    4. Frame Processing Statistics - Tracking state and Run() call counts
    5. Test Summary - Total duration, iterations, success and error counts

    Example Log Output

    [2025-12-12 15:39:36.067] [INFO] === STRESS TEST STARTED ===
    [2025-12-12 15:39:36.067] [INFO] Purpose: Test Vicon communication stability
    [2025-12-12 15:39:36.068] [INFO] Measurement duration: 10-120 seconds (randomly selected per tracking session)
    [2025-12-12 15:39:36.070] [INFO] Test loop started
    [2025-12-12 15:39:36.070] [INFO] === PHASE 1: Hardware Detection ===
    [2025-12-12 15:39:36.072] [INFO] Executing Hardware Detect...
    [2025-12-12 15:39:36.190] [INFO] Hardware present: Yes
    [2025-12-12 15:39:36.191] [INFO] Feedback: SDK Version 1:12:0:145507
    Detected 4 cameras
    [2025-12-12 15:39:37.933] [INFO] Executing Start Tracking...
    [2025-12-12 15:39:38.027] [INFO] Tracking started successfully at 50 Hz - will track for 42 seconds before allowing stop
    [2025-12-12 15:39:38.540] [INFO] DoWait state: m_bCurrentlyTracking=true, driver->IsRunning()=true
    [2025-12-12 15:39:48.540] [INFO] Processed 50 Run() calls in last second
    ...
    [2025-12-12 15:41:03.826] [INFO] === STRESS TEST COMPLETED ===
    [2025-12-12 15:41:03.827] [INFO] Total duration: 0h 1m 27s
    [2025-12-12 15:41:03.828] [INFO] Total iterations: 7
    [2025-12-12 15:41:03.828] [INFO] Successful actions: 7
    [2025-12-12 15:41:03.829] [INFO] Errors encountered: 0
    

    Error Handling

    The stress test automatically stops on any error to prevent cascading failures:

    Common error scenarios:

    ErrorMessageCause
    Connection LostDriver Run() returned false during waitNetwork or SDK issue
    Hardware Not FoundHardware not detectedVicon system offline
    Tracking FailedFailed to start trackingConfiguration error

    Console Commands Reference

    KeyAction
    qQuit the proxy
    hManual hardware detect
    cManual configuration detect
    sManual start tracking
    tManual stop tracking
    zStart stress test
    yStop stress test

    Test configuration

    Extra programs

    • TCP view
    • Wireshark
    • Tracy
    in Daily blog
    # CTrack Vicon
    Price strategy
    Copyright © CTech
    Nederlands (BE) | English (UK) | Français
    Aangeboden door Odoo - De #1 Open source e-commerce