Fixed SOArm100 data capture so it writes the data like in v1.
@ -0,0 +1,8 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "Lib/LuckyDataCaptureSubsystem.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -162,6 +162,11 @@ FString ULuckyWorldFunctions::FVectorToJsonString(const FVector& Vector)
|
|||||||
return TEXT("{}");
|
return TEXT("{}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FString ULuckyWorldFunctions::GetRobotDataCapturePath()
|
||||||
|
{
|
||||||
|
return FPaths::ProjectDir() / TEXT("robotdata");
|
||||||
|
}
|
||||||
|
|
||||||
const ULuckyWorldSettings* ULuckyWorldFunctions::GetLuckyWorldSettings()
|
const ULuckyWorldSettings* ULuckyWorldFunctions::GetLuckyWorldSettings()
|
||||||
{
|
{
|
||||||
return ULuckyWorldSettings::GetLuckyWorldSettings();
|
return ULuckyWorldSettings::GetLuckyWorldSettings();
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Subsystems/WorldSubsystem.h"
|
||||||
|
#include "LuckyDataCaptureSubsystem.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class LUCKYWORLD_API UDataCaptureSubsystem : public UWorldSubsystem
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable,Category = "LuckyRobots|DataCapture")
|
||||||
|
void WriteImageToDisk(UTextureRenderTarget2D* RenderTarget, int32 Count, const FString& Folder);
|
||||||
|
|
||||||
|
};
|
@ -63,6 +63,12 @@ public:
|
|||||||
UFUNCTION(BlueprintPure,Category = "LuckyWorld|Utils", meta = (BlueprintAutocast, CompactNodeTitle = "->"))
|
UFUNCTION(BlueprintPure,Category = "LuckyWorld|Utils", meta = (BlueprintAutocast, CompactNodeTitle = "->"))
|
||||||
static FString FVectorToJsonString(const FVector& Vector);
|
static FString FVectorToJsonString(const FVector& Vector);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return - The RobotData path.
|
||||||
|
*/
|
||||||
|
UFUNCTION(BlueprintPure,Category = "LuckyWorld|Utils")
|
||||||
|
static FString GetRobotDataCapturePath();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return - Lucky World Settings.
|
* @return - Lucky World Settings.
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"ActuatorData": [
|
||||||
|
{
|
||||||
|
"capture": 1,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/1_RGB.jpg\",\"TopCam\":\"TopCam/1_RGB.jpg\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capture": 2,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/2_RGB.jpg\",\"TopCam\":\"TopCam/2_RGB.jpg\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capture": 3,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/3_RGB.jpg\",\"TopCam\":\"TopCam/3_RGB.jpg\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capture": 4,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/4_RGB.jpg\",\"TopCam\":\"TopCam/4_RGB.jpg\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capture": 5,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/5_RGB.jpg\",\"TopCam\":\"TopCam/5_RGB.jpg\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"capture": 6,
|
||||||
|
"success": false,
|
||||||
|
"cameras": "{\"FrontCam\":\"FrontCam/6_RGB.jpg\",\"TopCam\":\"TopCam/6_RGB.jpg\"}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"robotInfoList": []
|
||||||
|
}
|
BIN
robotdata/FrontCam/1_RGB.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
robotdata/FrontCam/2_RGB.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
robotdata/FrontCam/3_RGB.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
robotdata/FrontCam/4_RGB.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
robotdata/FrontCam/5_RGB.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
robotdata/FrontCam/6_RGB.jpg
Normal file
After Width: | Height: | Size: 54 KiB |
28
robotdata/FrontCam/FrontCamPos.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"index": 1,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 2,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 3,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 4,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 5,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 6,
|
||||||
|
"transform": "Translation: X=71.764 Y=-107.870 Z=51.549 Rotation: P=-0.000000 Y=-90.000000 R=0.000000 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
BIN
robotdata/TopCam/1_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
robotdata/TopCam/2_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
robotdata/TopCam/3_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
robotdata/TopCam/4_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
robotdata/TopCam/5_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
robotdata/TopCam/6_RGB.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
28
robotdata/TopCam/TopCamPos.json
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"transforms": [
|
||||||
|
{
|
||||||
|
"index": 1,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 2,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 3,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 4,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 5,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"index": 6,
|
||||||
|
"transform": "Translation: X=68.764 Y=-179.870 Z=153.549 Rotation: P=-90.000000 Y=-165.963757 R=75.963757 Scale: X=1.000 Y=1.000 Z=1.000"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|