Closed EricVoll closed 3 years ago
Hmmm. I definitely haven't seen that before. I will see if I can find out more using the CVs.
My first guess is that there is something about the input data (most likely the images) that is being rejected by the service. Like the fully supported SDKs, there is an assumption that the input images are reasonable, but unlike with ARKit/ARCore/HL Head Tracking where the data is more tightly controlled, the Linux SDK doesn't exhaustively validate that you're not sending garbage. But the fact that the rosbags from the demo still work seems to indicate that it's not something fundamentally broken about the service or your account.
Is there anything different about the image data you're using? I think the only major case that is currently handled is converting color to grayscale before sending the request, but if the pixel data is 16-bit uint or floating point, for example, we don't convert to uint8, so the service might reject that request.
My images are still distorted and not rectified. But I thought that would be validated while sending the frames to the SDK. Since the "ReadyForCreateProgress" increased from frame to frame, I assumed that the service would be ok with them. (I of course understand that the precision suffers from that). But I'll try to rectify them before sending them to the library - the distortions are not very strong though.
But getting some info out of the CVs would be great! Thanks.
I doubt that rectification is an issue here. But if the ReadyForCreateProgress and RecommendedForCreateProgress numbers do increase over time, then that indicates to me that some of the input images are being received just fine. But perhaps there is an occasional bad frame? Have you tried recording a bag from your camera and then checking the frames to be sure they are all ok? I would suggest doing it this way: record a bag file while you simultaneously feed the image stream to ASA, and add some extra logging so you can correlate the timestamp where the service call fails with the last image input. If all of the images are fine, then this is something else.
I would also recommend checking the poses you supply to ASA to be sure they are well formed. Check for things like quaternion normalization, NaNs, etc.
I will see what I can do about the CVs, but I should manage your expectations here...the fact that this is a "research SDK" means that the service is not obligated to provide any support or fix any bugs, if they are specific to the Linux release and don't affect the supported SDKs.
ok I'll do that.
About the support & fixes: Sure I understand. I also don't expect any kind of support or bug-fixes :) (So thank you already for the input you gave me so far) Since its a server-side error, I guess that the CVs would help me to solve the issues, without any changes to the Linux SDK.
Maybe as feedback to the ASA team: Having failed requests logged in my account with the CV's information would be great to debug these cases.
In the meantime I managed to get some debugging messages. The Error 400 seems to come from:
JSON Error: {"error":{"code":"BadRequest","message":"Invalid/Corrupt blob could not be deserialized"}}
The complete output is
I0224 10:52:19.306226 26115 asa_interface.cpp:289] Starting to create anchor with anchor_in_world_frame:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
I0224 10:52:19.306325 26115 asa_interface.cpp:296] T_W_A_asa:
[ 1.000000, 0.000000, 0.000000 ] [ 0.000000 ] 1.000000
[ 0.000000, 1.000000, 0.000000 ] [ 0.000000 ]
[ 0.000000, 0.000000, 1.000000 ] [ 0.000000 ]
I0224 10:52:19.306387 26115 asa_interface.cpp:305] Cloud anchor: 0x559931873130/n
I0224 10:52:19.306403 26115 asa_interface.cpp:306] Anchor session: 0x559931638f80/n
I0224 10:52:19.306905 26143 asa_interface.cpp:93] StoreAndWatcherTrackedState::TryCreateInternalAsync for a new SpatialAnchor.
I0224 10:52:19.306941 26143 asa_interface.cpp:93] StoreAndWatcherTrackedState::TryCreateWithNewNeighborhoodAnchor
I0224 10:52:19.306989 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307030 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307060 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307083 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307106 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307130 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307155 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307178 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307200 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307227 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307251 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307271 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307284 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307299 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307322 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307348 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307372 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307389 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307400 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307421 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307446 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307472 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307499 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307524 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307551 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307579 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307608 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307633 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307659 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307687 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307714 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307739 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307767 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307792 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307821 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307847 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307874 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::TryGetPoseBetweenAnchors] Pose computed successfully.
I0224 10:52:19.307925 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::GetAnchorNeighborhoodDataAsync] Creating anchor blob using 36 key-frames.
I0224 10:52:19.309367 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::GetAnchorNeighborhoodDataAsync] Preparing blob for creation. Client-Side Triangulation: Disabled
I0224 10:52:19.316025 26143 asa_interface.cpp:93] [MobileNeighborhoodManager::GetAnchorNeighborhoodDataAsync] Anchor neighborhood data is available. Size: 672871.
I0224 10:52:19.316073 26144 asa_interface.cpp:492] ----------------------------------------------------------
I0224 10:52:19.316082 26144 asa_interface.cpp:493] ReadyForCreateProgress : 1.80007
I0224 10:52:19.316095 26144 asa_interface.cpp:495] RecommendedForCreateProgress : 1.44007
I0224 10:52:19.316102 26144 asa_interface.cpp:497] UserFeedback : SessionUserFeedback::NotEnoughMotion
I0224 10:52:19.316107 26143 asa_interface.cpp:93] RestClient::CreateNeighborhoodAnchorAndSpatialAnchorAsync - ReqCV: 6vGPHwcFTQe7TkrEb67JVA
I0224 10:52:20.410204 26156 asa_interface.cpp:93] N15SpatialServices47CreateNeighborhoodAnchorAndSpatialAnchorRequestE returned HTTP 400. ReqCV: 6vGPHwcFTQe7TkrEb67JVA. RespCV: 3/IQ9CT960KbsdxwGxBznA.0.
I0224 10:52:20.410274 26156 asa_interface.cpp:93] RestClient::CreateNeighborhoodAnchorAndSpatialAnchorAsync - HTTP Response Status Code: 400. ReqCV: 6vGPHwcFTQe7TkrEb67JVA. RespCV: 3/IQ9CT960KbsdxwGxBznA.0.
I0224 10:52:20.410337 26153 asa_interface.cpp:93] CreateNeighborhoodAnchorAndSpatialAnchor failed with HTTP error 400. ReqCV: 6vGPHwcFTQe7TkrEb67JVA. ResCV: 3/IQ9CT960KbsdxwGxBznA.0. JSON Error: {"error":{"code":"BadRequest","message":"Invalid/Corrupt blob could not be deserialized"}}
Message: Unexpected response code. Request CV: 6vGPHwcFTQe7TkrEb67JVA. Response CV: 3/IQ9CT960KbsdxwGxBznA.0. HTTP Error: 400.
I0224 10:52:20.410550 26350 asa_interface.cpp:313] Create anchor status: Status::Failed
[ WARN] [1614163940.410602490]: Unable to create anchor. Reason: Status::Failed
Could you create a rosbag where this happens and send it to me (privately)? I suspect there is something strange about the data (either the images or poses) since the sensor source is the primary thing that has changed from previous working configurations. I would like to better understand the data, and I may be able to do some deeper debugging here. I also started asking around if we can get some actual support.
Hi @jeffdelmerico Thanks for your readiness to help, but I figured it out and to be honest I am ashamed of myself😁. Sorry for wasting your time. Somewhere along the way I broke the camera_info topic, which resulted in the K matrix being a bunch of zeros. Its clear, that ASA can't handle the images then and why I wasted a full day digging into the interface classes. So everything was my own fault. It would be nice though if the wrapper would check that and inform the user in that case. I'll provide a PR for that.
No worries...I'm glad that you were able to sort it out. It did seem like an issue with the data, but I would not have guessed that it was the K matrix being 0. I think it makes sense to do some checking in the wrapper (at least for validity of the camera parameters...correctness is another story).
When trying to create anchors, I receive an "http error 400 BadRequest" response. The exact terminal output after sending the create anchor request is:
Performed debugging steps:
@jeffdelmerico Do you have any idea what could go wrong? The Request CV (
DpTpNRQkR86oCJulx1Eqqw
) and the response CV (UDi40SA8kUuyC3jeaqfGAw.0.
) might give us more info, but I can't look them up. Error 400 is super general, but at least there are other reports of this error for other platforms.Any help/ideas/hints would be appreciated, Thanks!