Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity Wrapper / Ros Reader #1857

Closed
frenchtouchXR opened this issue Jun 8, 2018 · 7 comments
Closed

Unity Wrapper / Ros Reader #1857

frenchtouchXR opened this issue Jun 8, 2018 · 7 comments
Assignees

Comments

@frenchtouchXR
Copy link

frenchtouchXR commented Jun 8, 2018

Hello,

I tried to enable the recorder and reader on the Unity Wrapper in the realsenseconfiguration.cs file. The recorder works well but when I try to read the recorded file I have this error :

Exception: Failed to resolve request. Request to enable_device_from_file("my_file") was invalid, Reason: Failed to create ros reader: Bag unindexed
rs2_config_resolve(config:000000003A92A230, pipe:000000003A929D90)

What do you think about that ?

Best regards

François

@frenchtouchXR frenchtouchXR changed the title Unity Ros Reader Unity Wrapper / Ros Reader Jun 8, 2018
@dorodnic
Copy link
Contributor

dorodnic commented Jun 8, 2018

Hi @frenchtouchXR
Usually, Bag unindexed error indicates that the recording was not properly closed. When using the .NET wrapper it is especially critical to make sure all wrapper objects are cleaned-up using .Dispose() before closing the application / game.

@frenchtouchXR
Copy link
Author

frenchtouchXR commented Jun 8, 2018

Thanks for your quick answer. You're talking about the .net Dispose() fonction.I tried all those lines :

m_pipeline.Stop();
GameObject.Find("ColorPointCloud").GetComponent().depthFrame.Dispose();
GameObject.Find("ColorPointCloud").GetComponent().vidFrame.Dispose();

    GameObject.Find("ColorPointCloud").GetComponent<ColorPointCloudGenerator>().pc.Dispose();
    GameObject.Find("ColorPointCloud").GetComponent<ColorPointCloudGenerator>().aligner.Dispose();
    m_config.Dispose();
    
    m_pipeline.Dispose();

    ActiveProfile.Device.Sensors[0].Stop();
    ActiveProfile.Device.Sensors[0].Close();
    ActiveProfile.Device.Sensors[1].Stop();
    ActiveProfile.Device.Sensors[1].Close();

None of them works. It seems the file is recorded but not closed until the Unity session is closed. And the index is never integrated to the file.

@frenchtouchXR
Copy link
Author

Any news so far ?

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]
Hi @frenchtouchXR,

Need to check internally about this feature request and see how soon it can be available.

@RealSense-Customer-Engineering
Copy link
Collaborator

[Realsense Customer Engineering Team Comment]
Hi @frenchtouchXR,

Please try librealsense 2.14.0 to see how it works.

@frenchtouchXR
Copy link
Author

Hello,

It works fine. Thank you. I' m now trying to make a multicam rec on Unity. I changed the static function in the realsensedevice inspector script to a public one. Then I try to get the realsense device by entering its serial number from the other scripts. I get this error :

The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(MonoBehaviour) myRealSenseDevice

@frenchtouchXR
Copy link
Author

I think i il close this thread and open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants