Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Openni2 does not handle oni files #26

Closed
rastaxe opened this issue Feb 23, 2016 · 6 comments
Closed

Openni2 does not handle oni files #26

rastaxe opened this issue Feb 23, 2016 · 6 comments

Comments

@rastaxe
Copy link

rastaxe commented Feb 23, 2016

I am not able to load a oni file (OpenNI record file) with openni2 in Indigo. In Hydro I was able to load it simply with: roslaunch openni2_launch openni2.launch device_id:=/path/to/your/file.oni
but in Indigo openni2 still tries to open the real device. Do you have the same problem?

@mikeferguson
Copy link
Member

I'm guessing it is due to this commit: ros-drivers/openni2_camera@17c1072 -- in the past it would have probably fallen through and returned the string name, now it returns the empty string -- you could try adding an extra case before the matching attempt which checks if the file ends with .oni and if so, returns the device_id as-is. If that works, we can gladly accept a PR to fix this regression.

@rastaxe
Copy link
Author

rastaxe commented Mar 8, 2016

It worked! Thanks.
I simply added this to line 682:
```
// check if device_id is a oni file
else if( device_id.size() - device_id.rfind(".oni") == 4 ) {
return device_id;
}

@lianera
Copy link

lianera commented Apr 8, 2016

Same issue here, does anyone has a fixed fork?

@rastaxe
Copy link
Author

rastaxe commented Apr 8, 2016

If you add the above two lines to line 682, it fixes the problem.
I did a pull request on openni2_camera.

@lianera
Copy link

lianera commented Apr 8, 2016

@rastaxe problem solved, thanks a lot 👍

@130s
Copy link
Member

130s commented Nov 4, 2017

Moved to the ros-drivers/openni2_camera repo (cont'd in the referenced issue).

@130s 130s closed this as completed Nov 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants