Jump to content

nbhatia

Verified Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by nbhatia

  1. Hi Davey, I see what you are trying to achieve. To answer your first question, in the API, there is a method "ViveSR::anipal::Eye::TrackingImprovements" to modify calibration data; however, I am not sure how helpful it would be. Using raw data gaze data for each eye, one can write a custom calibrator. There is no built-in method to calibrate individual gaze. 
    Since the default calibration process involves a six-point 2D plane calibration. In my opinion, even if the gaze is misaligned, it would lead to somewhat proper calibration maybe for some population. The user would still see a double image as natural.

    image.thumb.png.6e3b84999a351c41fe055c97793975d3.png

     

      

  2. 10 minutes ago, cte said:

    Trying to work trough it now. I see the different levels in Unreal but don't know where to start with the data extraction. I examined the dartboard actor but am unsure how to use what I'm looking at here (DartBoard.h)

    ---------------------------------

    Do I need to modify this code so as to utilize it as a kind of template?

    - If so, where do I modify and what structure do I use?

    
    // ========= Copyright 2019, HTC Corporation. All rights reserved. ===========
    
    #pragma once
    
    #include "SRanipal_FunctionLibrary_Eye.h"
    #include "SRanipal_Eye.h"
    
    #include "Engine/Classes/Camera/PlayerCameraManager.h"
    #include "Runtime/Engine/Classes/Materials/Material.h"
    #include "CoreMinimal.h"
    #include "GameFramework/Actor.h"
    #include "DartBoard.generated.h"
    
    UCLASS()
    class SRANIPAL_API ADartBoard : public AActor
    {
    	GENERATED_BODY()
    	
    public:	
    	// Sets default values for this actor's properties
    	ADartBoard();
    
    
    	UPROPERTY(EditAnywhere)
    		FVector Position;	// The dartboard's position
    	UPROPERTY(EditAnywhere)
    		UStaticMeshComponent* BoardMesh;
    	UPROPERTY(EditAnywhere)
    		UMaterial* ParentMaterial;
    
    	UPROPERTY()
    		APlayerCameraManager* PlayerCameraRef;
    
    private:
    	FVector FocusPosition;
    	UMaterialInstanceDynamic* DartBoardMaterial;
    
    protected:
    	// Called when the game starts or when spawned
    	virtual void BeginPlay() override;
    
    public:
    	// Called every frames
    	virtual void Tick(float DeltaTime) override;
    
    private:
    	// Focus relative parameter
    	FFocusInfo FocusInfo;
    	FVector GazeOrigin, GazeDirection;
    	float RayLength = 1000.0f;
    	float RayRadius = 1.0f;
    
    	// Move dart board
    	FVector InitialPosition;
    	bool FirstUpdate = true;
    	bool AlreadyMoveDart = false;
    	void MoveDartBoard();
    	float  SignedAngle(FVector v1, FVector v2, FVector v_forward);
    };

    Sorry if this is a basic question but I'm brand new to C++ 👶

     

    Hi,

    I am away from my PC atm. But I remember examples written in C were easiest to understand the API. One example had a file writer if I remember correctly.

    Also check some older posts in this forum. There is one post for unity in C# where data is handled in a separate thread. Else, consider writing a new post. People in this forum is very good.

    • Thanks 1
  3. Hi, 
    I was looking into timestamps generated by SRAnipal as well as Tobii SDK. In case of SRANipal, the timestamps correspond to local time stamp of eye tracker. In case of Tobii, the sdk provides two time stamps: local time stamp (as timestamp_tracker_us) which is similar to what we get in sranipal and an additional one, system (timestamp_system_us) which is synced with computer time. Is there a way to get the system time stamps in sranipal sdk via some sort of patch, etc?

    Regards,
    Nitesh

    @Daniel_Y @Corvus

  4. Hi,
    In the function, "SetEyeParameter(EyeParameter parameter)" declared in SRAnipal_Eye.h, the "EyeParameter" takes "GazeRayParameter" which has "sensitive_factor" as a variable. To my understanding, this is meant for smoothing the gaze data which could be similar to moving average, etc. Am I getting it right? I was wondering if someone could explain the internal working. What is the default value if we do not declare it?

    Many thanks,
    Nitesh

  5. Hi,

    I am using SRAnipal SDK in C. In SRAnipal_Eye.h, I see that some APIs (pasted below) are declared to register callbacks. Can anyone help me by providing an example of using this callback? 

    /* Register a callback function to receive eye camera related data when the module has new outputs.
                    [in] function pointer of callback
                    [out] error code. please refer Error in ViveSR_Enums.h
                    */
                    SR_ANIPAL int RegisterEyeDataCallback(VivesrEyeDataCallback callback);

                    /* Unegister a callback function to stop receiving eye camera related data.
                    [in] function pointer of callback
                    [out] error code. please refer Error in ViveSR_Enums.h
                    */
                    SR_ANIPAL int UnregisterEyeDataCallback(VivesrEyeDataCallback callback);


    Many Thanks,
    Nitesh

    @Corvus @Daniel_Y

×
×
  • Create New...