-
Notifications
You must be signed in to change notification settings - Fork 105
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
Tune Phidget sensor fusion parameters #116
Comments
2013-05-17 10:54 What should work: use the IMU algorithm but constrain the rotation around the "initial down direction" to 0 (we would request that they move the transducer to horizontal position when they turn on the system, that would be the initial down direction). We may need to tune the sensor fusion parameters as well. Need to verify the results with optical tracker measurements. 2013-05-17 11:05 2013-05-17 12:09 In vtkPhidgetSpatialTracker::SpatialDataHandler": Option A: change the gyroscope input (before calling tracker->AhrsAlgo->UpdateIMU(...)) of the sensor fusion algorithm (basically force the measured rotation speed to 0 along the down axis) Option B: change the output of the sensor fusion algorithm (after calling tracker->AhrsAlgo->UpdateIMU(...)) to snap the rotation around the down axis to 0 (e.g., represent the orientation with Euler angles in the south-west-down coordinate system and set the rotation value around the down axis to 0). Probably option B would be simpler and more robust (with option A, some rotations around the down axis could still accumulate as a result of numerical inaccuracies). 2013-05-17 15:52 2013-05-17 15:52 2013-05-17 15:55 2013-05-17 16:03
2013-05-20 10:34 I did the reconstructions from the data collected last week, and it does not look good. It's very noisy. I will try to repeat this with the phantom fixed in place. In your experience, is there a constraint how quickly the probe can move with NDI? 2013-05-20 10:42 2013-05-20 10:47
Both :) But in this case I was talking about reconstruction from NDI only, the setup we used last week with the phantom was NDI + Epiphan. The setup was somewhat suboptimal (I had to start recording while holding the phantom and the probe, and the phantom was not rigidly attached to the table), so I will try again on Friday.
We used NDI Polaris tracker that came with a Hologic US/CT fusion system.
I believe these are passive markers -- snap-on shiny balls. 2013-05-20 12:36 2013-05-23 09:32 You mentioned using fusion algorithm with/without magnetometer, but I have never tried without magnetometer -- AhrsAlgorithm="MADGWICK_MARG" in acquisition config file. I only tried TiltSensor and OrientationSensor from the saved sequence file captured with these settings. It would be nice to have a standalone tool so I can specify algorithm in config file, and it would produce an extra transform based on algorithm/parameters in a saved sequence file. If there is no such tool, I can try to make one. Please let me know if you or @Anderson_PERK have it. 2013-05-23 10:19
2013-05-23 10:42
We don't have a standalone tool for recomputing the sensor fusion results from raw data. It would be nice if you could create such a tool.
This is a note to Ryan about how to prevent drift when no magnetometer is used. Option A (that is described in the note): change the gyroscope input of the sensor fusion algorithm (basically force the measured rotation speed to 0 along the down axis). Option B: change the output of the sensor fusion algorithm to snap the rotation around the down axis to 0 (e.g., represent the orientation with Euler angles in the south-west-down coordinate system and set the rotation value around the down axis to 0). Probably option B would be simpler.
It could work, however you may need to perform the calibration before each procedure (which may be difficult, because it requires rotation along all axes, while the transducer motion is constrained by the stabilizer) and it's not guaranteed that the calibration can fully compensate the presence of all distortion. As we need rotation angle only along one axis (which is not the down axis), we should be able to get that angle without relying on a magnetometer - with one of the options described above. 2013-05-23 11:02 I looked at the measurements from the gyroscope alone, and the angular rate for the second axis seems quite stable, see plot attached (mean 3.5 deg/sec stdev 0.24 for the slow portion of the sweep). Do you think a simple solution that uses this single measurement with perhaps some averaging over consecutive frames could be sufficiently good? 2013-05-23 11:03 The Y axis title is incorrect -- this is angular rate deg/sec ! sorry 2013-05-23 11:42 2013-05-23 11:57 2013-05-23 12:37 2013-05-24 16:53 Regarding optical tracking together with Phidget: I will first work to design an attachment to allow consistent placement of the star. Calibration procedure for the transrectal probe is very cumbersome, and currently has to be repeated every time. I think we can improve this. I was working on another sub-project with US today, and decided not to spend time on joint tracking until I have a robust system. 2013-05-28 15:47
2013-05-29 16:43 2013-05-30 13:06 2013-05-30 16:27 2013-05-30 16:56
2013-05-30 17:15 2013-05-30 20:28 Ideally, this should be tested with the motorized stepper and with the optical tracker as ground truth, but if you don't have access to the motorized stepper then it's enough if you can just do some manual testing. 2013-05-30 22:21 Also, Andras - regarding my earlier question if the filter can be applied to previously recorded data. I just thought can't it be done by specifying the recorded sequence file as data source and replaying it? 2013-05-30 23:42 I'll do this code reorganization tomorrow (Friday) => #770 2013-06-28 11:38 2013-06-28 16:00 2013-06-28 16:03 2013-07-02 20:04 2013-07-02 20:05 2013-07-02 20:05 2013-07-04 09:51 2013-07-04 09:52 2013-07-04 09:53 2013-07-04 10:19 A SpatialSensorFusion tool (see Diagnostic_and_test_tools page) was created to allow post-processing of raw sensor data to get quite noise-free but still accurate orientation. The computed orientation is stored in the FilteredTiltSensorToPhidgetTracker transform. Example for obtaining filtered tilt sensor data from raw accelerometer+gyroscope data: set PLUS_BIN_DIR=c:/Users/lasso/devel/PlusExperimental-bin/bin/Release %PLUS_BIN_DIR%/SpatialSensorFusion.exe --ahrs-algo=MADGWICK_IMU --ahrs-algo-gain 0.01 --initial-gain 1 --initial-repeated-frame-number=1000 --input-seq-file="%DATA_DIR%/TransrectalProbeRotatedPhidgetPolaris.mha" --output-seq-file="%DATA_DIR%/TransrectalProbeRotatedPhidgetPolarisReprocessed.mha" --west-axis-index=1 --tracker-reference-frame=PhidgetTracker Based on the off-line reprocessing, the 0.01 gain value seemed to be the best (low noise, still accurate angles compared to the optical ground truth) for the filtered tilt sensor. See the results in attached charts above (comparing the orientation sensor, tilt sensor, and filtered tilt sensor tools to the ground truth optical tracker tool) The FilteredTiltSensor tool is available also in real-time during acquisition. It would be great if you could double-check that the this tool gives optimal result during acquisition as well, with the same 0.01 gain value (during acquisition we have access to the full frame rate of the PhidgetSpatial sensor, so there may be slight differences). See PlusConfiguration_NoVideo_Phidget.xml config file for an example for adding the FilteredTiltSensor tool to your config file (https://www.assembla.com/code/bm1A8eCNSr4l2deJe5cbCb/bnyqsQCNSr4l2deJe5cbCb/commit/2914). 2013-07-12 09:20 I do not see either source code, or binary: [fedorov@gridftp-spl PlusBuild2-bin]$ ls Trying to enable Phidget on my Linux machine (this is where I keep all the data and do the processing) leads to this error: CMake Error at src/DataCollection/CMakeLists.txt:688 (FILE): Indeed, there is only .lib file for Phidget, no shared lib. 2013-07-12 09:53 2013-07-12 09:58 2013-07-16 10:05 2013-07-16 10:08 2013-07-16 10:10 2013-07-16 13:09 2013-07-17 14:53 2013-07-17 14:54 Acquisition config: TrackedImageSequence_BKCaptureDevice_20130412_083827_config.xml 2013-07-17 19:01 There were some problems with gyroscope sensor measurements in some cases, but maybe I will report those separately. The good thing is I think I have 11 relatively good volumes for the US/MR study, and 2 more I need to look a bit more, because there were some issues with the config file structure (those were collected in the times of transitioning to multi-channel setup). 2013-07-17 19:02 2013-12-05 18:05 |
With rotation along a fixed axis the Phidget sensor "OrientationSensor" tool appears to provide a more complex trajectory (not just a rotation along a single axis, but also some transient twisting).
Tune the parameters, so that the sensor fusion works correctly for a 180deg rotation around a horizontal axis at a 3-4deg/sec speed.
Migrated from https://app.assembla.com/spaces/plus/tickets/675/details
The text was updated successfully, but these errors were encountered: