Ask Your Question
2

OpenNi Skeleton Tracking - Save calibration data

asked 2011-03-17 08:14:18 -0500

Thorsten gravatar image

updated 2016-10-24 09:00:39 -0500

ngrennan gravatar image

Hello,

i use the openNi skeleton tracking. I achieved good results by saving the calibration data of the first Person, and the loading the data for all other Persons. Is it possible to save/load the data to/from a file or something like that? I found nothing like that in the API...

cheers, Thorsten

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2011-03-17 09:21:04 -0500

blueskin gravatar image

you can use Bags if you want to store ROS messages, if thats what you want. If its just some bunch of params then you could just write your own file for saving and loading.

edit flag offensive delete link more

Comments

I know about bags, but that's not the solution... The Problem is in the OpenNi API...
Thorsten gravatar imageThorsten ( 2011-03-17 17:45:52 -0500 )edit
Bags are the solution in ROS, for OpenNI native solution I suggest you ask this on their forums.
tfoote gravatar imagetfoote ( 2011-09-11 08:14:49 -0500 )edit
2

answered 2011-07-19 00:51:52 -0500

Miguel Prada gravatar image

updated 2011-08-07 23:40:20 -0500

I recently realised that new methods have been added to the OpenNI API to allow saving/loading skeleton calibration data to a file. However, I've trying to make them work without success. The methods I'm talking about are

XnStatus xn::SkeletonCapability::SaveCalibrationDataToFile(XnUserID user, const XnChar * strFileName)
XnStatus xn::SkeletonCapability::LoadCalibrationDataFromFile(XnUserID user, const XnChar * strFileName)

Has anyone managed to use those successfully?

Update: The code I used to test this is a modified version of openni_tracker.cpp in trunk. You can check lines 201 to 268 in http://pastebin.com/d0m6J6tb

The service requests contain the user id (int) and a filename (string), and I've tried both absolute and relative paths for the filename without success.

Update 2: Apparently it is a OpenNI version issue: http://answers.ros.org/question/1631/openni-save-calibration-to-file-failed-this

edit flag offensive delete link more

Comments

they do not work for me either. I didn't try and debug too much. I'd be interested if there is a fix.
JoeRomano gravatar imageJoeRomano ( 2011-07-19 15:28:27 -0500 )edit
I'm guessing that it might be related to the OpenNI version in the Ubuntu openni-dev package. I'm afraid to test installing a newer version by hand on the production machine. When can a new version of OpenNI and NITE be expected to be released as an Ubuntu package?
Miguel Prada gravatar imageMiguel Prada ( 2011-07-28 23:12:54 -0500 )edit
Are you just copying the functions from the OpenNI API and pasting them into the ROS code?
qdocehf gravatar imageqdocehf ( 2011-08-02 06:06:19 -0500 )edit
No, @qdocehf, I'm not ;)
Miguel Prada gravatar imageMiguel Prada ( 2011-08-02 18:58:52 -0500 )edit
Sorry, that was pretty dumb of me. Are you using these with the ROS code at all? If so, could you show me how you altered the code?
qdocehf gravatar imageqdocehf ( 2011-08-03 01:09:25 -0500 )edit
Don't worry, it was a legitimate question. The way I tried those was by adding a couple of load/save services to openni_tracker. Unfortunately the files are on my laptop at work, so I'll be unable to show them until tomorrow (maybe late evening for you).
Miguel Prada gravatar imageMiguel Prada ( 2011-08-03 02:07:32 -0500 )edit
I want to try this out, but I want to leave a copy of the original openni_tracker package. What is the best way to do this? I think that simply using the "cp" command would cause problems.
qdocehf gravatar imageqdocehf ( 2011-08-04 03:13:49 -0500 )edit
You can make a copy of the package and prepend its path to ROS_PACKAGE_PATH. The ROS tools (rosmake, rosrun, etc.) will use the copy of the package found first (leftmost) on ROS_PACKAGE_PATH. If you copy a package installed with apt, you'll need to fix permissions and remove the ROS_NOBUILD file.
Miguel Prada gravatar imageMiguel Prada ( 2011-08-04 04:12:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-03-17 08:14:18 -0500

Seen: 1,857 times

Last updated: Aug 07 '11