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

Openni2 does not handle oni files #69

Open
130s opened this issue Nov 4, 2017 · 5 comments
Open

Openni2 does not handle oni files #69

130s opened this issue Nov 4, 2017 · 5 comments

Comments

@130s
Copy link
Member

130s commented Nov 4, 2017

Issue by rastaxe
Tuesday Feb 23, 2016 at 08:37 GMT
Originally opened as ros-drivers/openni2_launch#26


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?

@130s
Copy link
Member Author

130s commented Nov 4, 2017

Comment by mikeferguson
Sunday Mar 06, 2016 at 10:04 GMT


I'm guessing it is due to this commit: 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.

@130s
Copy link
Member Author

130s commented Nov 4, 2017

Comment by rastaxe
Tuesday Mar 08, 2016 at 19:47 GMT


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;
}

@130s
Copy link
Member Author

130s commented Nov 4, 2017

Comment by lianera
Friday Apr 08, 2016 at 06:08 GMT


Same issue here, does anyone has a fixed fork?

@130s
Copy link
Member Author

130s commented Nov 4, 2017

Comment by rastaxe
Friday Apr 08, 2016 at 06:36 GMT


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

@130s
Copy link
Member Author

130s commented Nov 4, 2017

Comment by lianera
Friday Apr 08, 2016 at 07:10 GMT


@rastaxe problem solved, thanks a lot 👍

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

No branches or pull requests

1 participant