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

Trilinear and bary-linear interpolations #127

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
8ad7548
Science data interpolation using raw matrix for depth slice search
mabelzhang Nov 2, 2021
5ec0460
Align lat long in science data visualization with spawned vehicle lat…
mabelzhang Nov 2, 2021
7a89db4
resolve conflicts with main
mabelzhang Nov 10, 2021
7ecf0e0
replace TODO TEMPORARY HACK comments with Performance trick
mabelzhang Nov 10, 2021
3dc76c7
cleanup
mabelzhang Nov 10, 2021
9cc1b42
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 10, 2021
3853681
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 10, 2021
1934888
Merge branch 'main' into mabelzhang/interpolate_sci_raw_mat
mabelzhang Nov 13, 2021
2c8f6ae
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 13, 2021
3f6edfc
Merge from main; incorporate reading lat long instead of hard coding
mabelzhang Nov 13, 2021
98098c3
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 16, 2021
64eca32
add mutex for worldOriginSpherical*
mabelzhang Nov 16, 2021
b8d2881
merge from main
mabelzhang Nov 16, 2021
7844ab0
finish merge
mabelzhang Nov 16, 2021
dc0a340
better debug msgs and var names
mabelzhang Nov 16, 2021
dae526f
add BUILD_TESTING to README
mabelzhang Nov 16, 2021
17a165c
disable science sensors in empty_environment.sdf
mabelzhang Nov 16, 2021
69f5d27
merge from mabelzhang/science_viz
mabelzhang Nov 16, 2021
01318aa
fix merge
mabelzhang Nov 16, 2021
9435008
Convert sensor lat long to Cartesian. Some cleanup.
mabelzhang Nov 16, 2021
643c97d
refactor conversion from lat long to cart into fn
mabelzhang Nov 16, 2021
6aa7076
manual cherry pick 643c97d from mabelzhang/interpolate_sci_raw_mat
mabelzhang Nov 16, 2021
58af8e8
remove WorldOriginSphericalService from WorldCommPlugin
mabelzhang Nov 17, 2021
b6b5245
add depth to ConvertLatLonToCart for convenience
mabelzhang Nov 17, 2021
0287dcc
merge from mabelzhang/science_viz
mabelzhang Nov 17, 2021
c43d57a
incorporate updated ConvertLatLonToCart depth
mabelzhang Nov 17, 2021
3756954
clean up FindInterpolators() and SearchInDepthSlice()
mabelzhang Nov 17, 2021
0731792
Found 4 NNs in each of 2 z slices holding 1st and 2nd NNs
mabelzhang Nov 17, 2021
0ea2d48
add headers to organize the gazillion member fields. reorder fns
mabelzhang Nov 17, 2021
5dc4a06
decrease how often interpolation is called
mabelzhang Nov 17, 2021
f1e890f
decrease how often interpolation is called, so sci data vis can be shown
mabelzhang Nov 17, 2021
26b469a
Merge branch 'mabelzhang/interpolate_sci_raw_mat' of github.com:osrf/…
mabelzhang Nov 17, 2021
2e287fe
return 2 sets of 4 points from FindInterpolators()
mabelzhang Nov 17, 2021
07a2394
cleanup
mabelzhang Nov 17, 2021
6a5b426
Suggestions to #70 (#85)
chapulina Nov 19, 2021
d443425
Merge branch 'main' into mabelzhang/science_viz
chapulina Nov 19, 2021
a2d5c41
Merge branch 'mabelzhang/science_viz' into mabelzhang/interpolate_sci…
mabelzhang Nov 23, 2021
00128b9
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 24, 2021
c287169
PR comments
mabelzhang Nov 24, 2021
f68ec87
Merge branch 'main' into mabelzhang/science_viz
mabelzhang Nov 24, 2021
46fcf20
Merge branch 'main' into mabelzhang/interpolate_sci_raw_mat
mabelzhang Nov 24, 2021
833930a
Merge branch 'mabelzhang/science_viz' into mabelzhang/interpolate_sci…
mabelzhang Nov 24, 2021
2a88995
manual merge from main
mabelzhang Dec 3, 2021
e2efd70
minor PR comments
mabelzhang Dec 3, 2021
7c85554
refactor to use pcl PassThrough filter
mabelzhang Dec 7, 2021
a2fccdd
trilinear interpolation math; API WIP; merge from mabelzhang/interpol…
mabelzhang Dec 8, 2021
998a8b3
fix variable name
mabelzhang Dec 8, 2021
eb238ae
Fix trilinear interpolation. Find ordering in prism for 8 input verti…
mabelzhang Dec 8, 2021
8a68777
better printouts for debugging whether points are on prism
mabelzhang Dec 8, 2021
096d1fc
merge from main. Allow either trilinear or barycentric interpolation
mabelzhang Dec 22, 2021
0af6a57
merge from main; Allow choosing between barycentric and trilinear int…
mabelzhang Dec 23, 2021
ea2db99
merge from mabelzhang/interpolate_sci_raw_mat
mabelzhang Dec 23, 2021
7f9be37
generalize k in interpolators search so can search for 3 for baryline…
mabelzhang Dec 23, 2021
87b0b78
add hybrid barylinear interpolation method
mabelzhang Dec 23, 2021
1b01b58
fix trilinear indices passed to interpolation: spatialIdx -> interpol…
mabelzhang Dec 24, 2021
ccb66d8
Fix indices of points in 2nd z slice, so that they index the original…
mabelzhang Dec 24, 2021
c311710
remove BARYLINEAR enum. Instead, use barylinear as a backup case for …
mabelzhang Dec 24, 2021
602b490
fix trilinear calculation typo - add, not multiply!
mabelzhang Dec 24, 2021
b6cb5ae
More fixes for mapping to the correct indices in the original point c…
mabelzhang Dec 24, 2021
d63a278
add TODO
mabelzhang Dec 24, 2021
dfeadfa
cleanup
mabelzhang Dec 24, 2021
c199805
cleanup
mabelzhang Dec 24, 2021
2dd66f2
cleanup
mabelzhang Dec 24, 2021
defdbe1
cleanup
mabelzhang Dec 24, 2021
100f368
Move magic numbers out of CreateDepthSlice
tfoote Jan 28, 2022
06ee914
Revert "Move magic numbers out of CreateDepthSlice"
tfoote Jan 28, 2022
d217a07
merge from main
mabelzhang Feb 16, 2022
761efde
Merge branch 'mabelzhang/trilinear_interp' of github.com:osrf/lrauv i…
mabelzhang Feb 16, 2022
7316a2b
refactor interpolation and search out of science sensor
mabelzhang Feb 24, 2022
bbc47ce
constructor to fix seg fault
mabelzhang Feb 24, 2022
d7b32c1
expose method and include all headers for tests
mabelzhang Mar 1, 2022
59c6e03
Tests for ctor, fix ctor bug
mabelzhang Mar 2, 2022
950bf2c
EightPointPrismTrilinear unit test. Refactored for test.
mabelzhang Mar 8, 2022
2e714e1
EightPointPrismTrilinearInterpolation unit test
mabelzhang Mar 8, 2022
357e184
simplify test data locations. Add locations
mabelzhang Mar 8, 2022
08adbdd
add invalid search cases. Fix print bug
mabelzhang Mar 8, 2022
61ea67a
add TrilinearFallbackToHybridBarylinear test
mabelzhang Mar 8, 2022
7d49c83
expose debug flag
mabelzhang Mar 10, 2022
3fa9841
change default debug flag in test
mabelzhang Mar 10, 2022
2df1bba
Merge branch 'main' into mabelzhang/trilinear_interp
mabelzhang Mar 23, 2022
3d7dfb5
fix bug; add profile lines; add depth tolerance
mabelzhang Apr 6, 2022
030bacb
fix bugs. Add 1D degenerate case detection in 2D overloaded function …
mabelzhang Apr 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lrauv_ignition_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,18 @@ if(BUILD_TESTING)
lrauv_range_bearing_request
lrauv_range_bearing_response)
gtest_discover_tests(test_range_bearing)

add_executable(UNIT_Interpolation_TEST src/Interpolation_TEST.cc)
target_include_directories(UNIT_Interpolation_TEST
PUBLIC ${PCL_INCLUDE_DIRS})
target_link_libraries(UNIT_Interpolation_TEST
PUBLIC gtest_main
PRIVATE
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-common${IGN_COMMON_VER}::profiler
ignition-gazebo${IGN_GAZEBO_VER}::ignition-gazebo${IGN_GAZEBO_VER}
${PCL_LIBRARIES})
gtest_discover_tests(UNIT_Interpolation_TEST)
endif()

#============================================================================
Expand Down
10 changes: 10 additions & 0 deletions lrauv_ignition_plugins/data/interpolation_prism.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
elapsed_time_second,latitude_degree,longitude_degree,depth_meter,sea_water_temperature_degC,sea_water_salinity_psu,mass_concentration_of_chlorophyll_in_sea_water_ugram_per_liter,eastward_sea_water_velocity_meter_per_sec,northward_sea_water_velocity_meter_per_sec
0,-0.00003,0.00003,0,0,0,300,-1,0
0,-0.00006,0.00003,0,0,0,300,-1,0
0,-0.00003,0.00006,0,0,0,300,-1,0
0,-0.00006,0.00006,0,0,0,300,-1,0
0,-0.00003,0.00003,2,0,0,100,-1,0
0,-0.00006,0.00003,2,0,0,100,-1,0
0,-0.00003,0.00006,2,0,0,100,-1,0
0,-0.00006,0.00006,2,0,0,100,-1,0
0,1,1,100,0,0,NaN,0,0
30 changes: 20 additions & 10 deletions lrauv_ignition_plugins/data/interpolation_test.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ elapsed_time_second,latitude_degree,longitude_degree,depth_meter,sea_water_tempe
0,-0.00003,-0.00003,0,0,0,100,-1,0
0,0.00000,-0.00003,0,0,0,100,-1,0
0,0.00003,-0.00003,0,0,0,100,-1,0
0,-0.00009,-0.00003,1,0,0,300,-1,0
0,-0.00006,-0.00003,1,0,0,300,-1,0
0,-0.00003,-0.00003,1,0,0,300,-1,0
0,0.00000,-0.00003,1,0,0,300,-1,0
0,0.00003,-0.00003,1,0,0,300,-1,0
0,-0.00009,-0.00003,2,0,0,300,-1,0
0,-0.00006,-0.00003,2,0,0,300,-1,0
0,-0.00003,-0.00003,2,0,0,300,-1,0
0,0.00000,-0.00003,2,0,0,300,-1,0
0,0.00003,-0.00003,2,0,0,300,-1,0
0,-0.00009,0.00000,0,0,0,200,-1,0
0,-0.00006,0.00000,0,0,0,200,-1,0
0,-0.00003,0.00000,0,0,0,200,-1,0
Expand All @@ -21,8 +21,18 @@ elapsed_time_second,latitude_degree,longitude_degree,depth_meter,sea_water_tempe
0,-0.00003,0.00003,0,0,0,300,-1,0
0,0.00000,0.00003,0,0,0,300,-1,0
0,0.00003,0.00003,0,0,0,300,-1,0
0,-0.00009,0.00003,1,0,0,100,-1,0
0,-0.00006,0.00003,1,0,0,100,-1,0
0,-0.00003,0.00003,1,0,0,100,-1,0
0,0.00000,0.00003,1,0,0,100,-1,0
0,0.00003,0.00003,1,0,0,100,-1,0
0,-0.00009,0.00003,2,0,0,100,-1,0
0,-0.00006,0.00003,2,0,0,100,-1,0
0,-0.00003,0.00003,2,0,0,100,-1,0
0,0.00000,0.00003,2,0,0,100,-1,0
0,0.00003,0.00003,2,0,0,100,-1,0
0,-0.00009,0.00006,0,0,0,300,-1,0
0,-0.00006,0.00006,0,0,0,300,-1,0
0,-0.00003,0.00006,0,0,0,300,-1,0
0,0.00000,0.00006,0,0,0,300,-1,0
0,0.00003,0.00006,0,0,0,300,-1,0
0,-0.00009,0.00006,2,0,0,100,-1,0
0,-0.00006,0.00006,2,0,0,100,-1,0
0,-0.00003,0.00006,2,0,0,100,-1,0
0,0.00000,0.00006,2,0,0,100,-1,0
0,0.00003,0.00006,2,0,0,100,-1,0
Loading