nbhatia Posted June 3, 2020 Share Posted June 3, 2020 Hi, While using SRAnipal SDK, I see that the eye data structure is declared as two versions: v1 and v2. It would be great of somebody can provide more detail about applicability of two versions. E.g. ViveSR::anipal::Eye::EyeData ViveSR::anipal::Eye::EyeData_v2 Many Thanks, Nitesh @Corvus @Daniel_Y Link to comment Share on other sites More sharing options...
Daniel_Y Posted June 4, 2020 Share Posted June 4, 2020 To compare EyeData and EyeData_v2 you could see an extra member, expression_data, which represents more facial expression blendshapes Link to comment Share on other sites More sharing options...
nbhatia Posted June 4, 2020 Author Share Posted June 4, 2020 I see. Thank you. Is this the only difference between v1 and v2? I was wondering if there would be any difference in terms of efficiency, precision and sampling rate. Many Thanks, Nitesh Link to comment Share on other sites More sharing options...
Daniel_Y Posted June 4, 2020 Share Posted June 4, 2020 No if you only need eye gaze information. Link to comment Share on other sites More sharing options...
nbhatia Posted June 4, 2020 Author Share Posted June 4, 2020 Ok. That clears a lot of confusion. Thank you @Daniel_Y🙂 Link to comment Share on other sites More sharing options...
cte Posted October 6, 2020 Share Posted October 6, 2020 @nbhatia how are you going about getting the data from the SDK? I'm new to this and trying to figure out how to pull that data into a writable export file of some kind (ideally a CSV). Link to comment Share on other sites More sharing options...
nbhatia Posted October 6, 2020 Author Share Posted October 6, 2020 3 minutes ago, cte said: @nbhatia how are you going about getting the data from the SDK? I'm new to this and trying to figure out how to pull that data into a writable export file of some kind (ideally a CSV). Hi, have you checked the sdk? There are dome examples already. Link to comment Share on other sites More sharing options...
cte Posted October 6, 2020 Share Posted October 6, 2020 2 minutes ago, nbhatia said: Hi, have you checked the sdk? There are dome examples already. 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++ 👶 Link to comment Share on other sites More sharing options...
nbhatia Posted October 6, 2020 Author Share Posted October 6, 2020 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. 1 Link to comment Share on other sites More sharing options...
jboss Posted January 13, 2021 Share Posted January 13, 2021 One think I noticed now that I'm using version 2 is that measured values for origin are in mm, so to use it in Unity I need to divide by 1000. In version 1 this was not necessary, I could use the origin values right away. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now