Software Archive
Read-only legacy content
17060 Discussions

Solved: RealSense Set3DTrack() gives STATUS_FILE_READ_FAILED

Aaron_Z_2
Beginner
367 Views

I am using the Intel SR300 developer kit with the RealSense SDK 10.0.26.0396 on Windows 10.

Problem:
The Object Tracker (C++ and C#) sample does not work in "3D Tracking" mode. It opens an error window saying "Please select a tracking configuration!" and shows the program status at the bottom to be "Failed to set tracking configuration!!" when clicking "Start" even though a valid tracking configuration XML file is provided.

Debug Steps:
When I build the sample in Visual Studio and debug it I can see that this error is caused because the Set3DTrack() call to the PXCMTracker returns with STATUS_FILE_READ_FAILED. If I try to use a blank XML file as the tracking configuration it throws the same error so I didn't provide my files as it doesn't matter what file I try to use. When I add debug C# code to read the file just before this API call it shows the file path is valid and reads the file fine. Seems like a bug because my code can read the file but RealSense fails to read the file.

Steps to Reproduce:
1. Install SDK, camera etc. All the other sample code works fine.
2. Run the "Object Tracking (C++)" sample.
3. Switch to the "Map Creation" tab and click "Start Toolbox Application".
4. Select "Edge Tracking" and click OK.
5. Open the .obj file, see the outline of your object, and click "Accept". (here are some .obj files: https://groups.csail.mit.edu/graphics/classes/6.837/F03/models/)
6. Select a folder and click "Select Folder". Tracking.xml, InitialPose.xml, LineModel.obj, and ScreenShot1.png are created.
7. Switch to the "Tracking" tab and "3D Tracking" mode.
8. Click "Load Target" and select "Tracking.xml", click "Open".
9. See only the text "C:\Tracking.xml" in the "Loaded Targets" box.
10. Click "Start", the program will fail as described.

Attempted fixes:
Run the sample executable as administrator.
Put the XML tracking configuartion files in the same directory as the executable.
Reinstall the SDK.
Load different kinds of XML files.

Every sample I've tried from the Sample Browser works. The Object Tracker sample works in both "2D Tracking" and "3D Instant" modes. This shows opening JPG files with the tracker works, it is only a problem with opening XML tracking configuration files. Does this feature have this problem for other users?

0 Kudos
2 Replies
Aaron_Z_2
Beginner
367 Views

I'm noticing the SurfaceModel.xml file is not being created by the Metaio toolbox. In "...\Documents\RSSDK\Samples\FF_ObjectTracking\Assets\3DTargetsCAD\CAD_rim_target" I have an export that I think was already provided or created a different way. It has Tracking.xml, InitialPose.xml, LineModel.obj, and SurfaceModel.obj. When I used these files for "3D Tracking" I could start tracking without error for the first time.

It is possible this is caused by Metaio toolbox not generating the XML file properly. These are the created files along with the original part. Can anyone look at the output files and tell me if they have the correct format?

https://www.dropbox.com/sh/wbbgt6n3vm6zuec/AADebBU3Bjle7ClU2klqDvl_a?dl=0

 

0 Kudos
Aaron_Z_2
Beginner
367 Views

Problem solved. The root cause seems to have been a problem with the input OBJ file. When I used the Metaio toolbox with this file it did not generate the SurfaceModel.obj

One reason this might have happened is the original OBJ I tested with was in meters instead of mm. Exported a new obj using ConvertCADfiles.com and this one works.

0 Kudos
Reply