-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from NavAbility/23Q1/enh/minorfixes
minor impr on addBlob
- Loading branch information
Showing
15 changed files
with
87 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,39 +2,39 @@ | |
|
||
|
||
function testExportSession( | ||
client = NVA.NavAbilityHttpsClient(;authorize=false), | ||
context = NVA.Client( | ||
client = NvaSDK.NavAbilityHttpsClient(;authorize=false), | ||
context = NvaSDK.Client( | ||
"[email protected]", | ||
"TESTING", | ||
"EXPORTSESSION_"*(string(NVA.uuid4())[1:4]) | ||
"EXPORTSESSION_"*(string(NvaSDK.uuid4())[1:4]) | ||
); | ||
buildNewGraph::Bool=false | ||
) | ||
# | ||
if buildNewGraph | ||
# build a graph | ||
resultId = NVA.addVariable(client, context, NVA.Variable("x0", :Pose2)) |> fetch | ||
resultId = NvaSDK.addVariable(client, context, NvaSDK.Variable("x0", :Pose2)) |> fetch | ||
# Wait for them to be done before proceeding. | ||
@info "Wait on addVariable eventId" resultId | ||
NVA.waitForCompletion(client, [resultId], expectedStatuses=["Complete"], maxSeconds=180) | ||
NvaSDK.waitForCompletion(client, [resultId], expectedStatuses=["Complete"], maxSeconds=180) | ||
|
||
eventId = NVA.addFactor(client, context, | ||
NVA.Factor("x0f1", "PriorPose2", ["x0"], NVA.PriorPose2Data()) | ||
eventId = NvaSDK.addFactor(client, context, | ||
NvaSDK.Factor("x0f1", "PriorPose2", ["x0"], NvaSDK.PriorPose2Data()) | ||
) |> fetch | ||
@info "Wait on addFactor eventId" resultId | ||
|
||
NVA.waitForCompletion(client, [eventId], expectedStatuses=["Complete"], maxSeconds=180) | ||
NvaSDK.waitForCompletion(client, [eventId], expectedStatuses=["Complete"], maxSeconds=180) | ||
end | ||
|
||
# export the graph | ||
# eventId = NVA.exportSession(client, context, "testexport.tar.gz", | ||
# options=NVA.ExportSessionOptions( | ||
# eventId = NvaSDK.exportSession(client, context, "testexport.tar.gz", | ||
# options=NvaSDK.ExportSessionOptions( | ||
# format="NVA" # TODO TARGZ | ||
# )) |> fetch | ||
|
||
# @info "waiting for export Session" eventId | ||
# NVA.waitForCompletion2(client, eventId) | ||
# blobId = NVA.getExportSessionBlobId(client, eventId) | ||
# NvaSDK.waitForCompletion2(client, eventId) | ||
# blobId = NvaSDK.getExportSessionBlobId(client, eventId) | ||
# @info "Success: Here is the blobId you can use to download: $blobId" | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,39 +4,39 @@ using TensorCast | |
|
||
|
||
function runInitVariableTests(; | ||
client = NVA.NavAbilityHttpsClient(;authorize=false), | ||
client = NvaSDK.NavAbilityHttpsClient(;authorize=false), | ||
userId = "[email protected]", | ||
robotId = "TESTING", | ||
sessionId = "INITVARIABLE_"*(string(NVA.uuid4())[1:4]) | ||
sessionId = "INITVARIABLE_"*(string(NvaSDK.uuid4())[1:4]) | ||
) | ||
# | ||
@testset "run initVariable tests" begin | ||
|
||
## | ||
# connections | ||
@show context = NVA.Client(userId,robotId,sessionId) | ||
@show context = NvaSDK.Client(userId,robotId,sessionId) | ||
|
||
resultId = NVA.addVariable(client, context, NVA.Variable("x0", :Pose2)) |> fetch | ||
resultId = NvaSDK.addVariable(client, context, NvaSDK.Variable("x0", :Pose2)) |> fetch | ||
# Wait for them to be done before proceeding. | ||
@info "Wait on addVariable eventId" resultId | ||
NVA.waitForCompletion(client, [resultId], expectedStatuses=["Complete"], maxSeconds=180) | ||
NvaSDK.waitForCompletion(client, [resultId], expectedStatuses=["Complete"], maxSeconds=180) | ||
|
||
# init some value to variable x0 | ||
pts = [[-rand();rand();-0.1] for _ in 1:5] | ||
points = Dict{String,Float64}[ NVA.CartesianPointInput(;x=pt[1],y=pt[2],rotz=pt[3]) for pt in pts ] | ||
points = Dict{String,Float64}[ NvaSDK.CartesianPointInput(;x=pt[1],y=pt[2],rotz=pt[3]) for pt in pts ] | ||
|
||
variableKey = NVA.VariableKey(userId,robotId,sessionId,"x0") | ||
variableId = NVA.VariableId(variableKey) | ||
variableKey = NvaSDK.VariableKey(userId,robotId,sessionId,"x0") | ||
variableId = NvaSDK.VariableId(variableKey) | ||
particleInput = Dict{String,Any}("points"=>points) | ||
distributionInput = Dict{String,Any}("particle"=>particleInput) | ||
initVarInp = NVA.InitVariableInput(variableId, NVA.POSE2, distributionInput) | ||
initVarInp = NvaSDK.InitVariableInput(variableId, NvaSDK.POSE2, distributionInput) | ||
|
||
eventId = NVA.initVariable(client, context, initVarInp) |> fetch | ||
eventId = NvaSDK.initVariable(client, context, initVarInp) |> fetch | ||
@info "waitForCompletion on initVariable" eventId | ||
completedSuccessfully = NVA.waitForCompletion2(client, eventId) #, expectedStatuses=["Complete"], maxSeconds=180) | ||
completedSuccessfully = NvaSDK.waitForCompletion2(client, eventId) #, expectedStatuses=["Complete"], maxSeconds=180) | ||
@test completedSuccessfully | ||
if completedSuccessfully | ||
res = NVA.getVariable(client, context, "x0") | ||
res = NvaSDK.getVariable(client, context, "x0") | ||
x0 = fetch(res) | ||
x0_vv = reshape(x0["solverData"][1]["vecval"],3,:) | ||
@cast refvv[i][d] := x0_vv[d,i] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.