Open matejhof opened 8 years ago
I'll answer your last question first: in theory, it should be pretty straightforward (you only need to change the ext
parameter in the .ini
file). The only problem I can foresee is that I would increase the number of bins (also that one possible from ini
file), and also the time buffer in the past from which a trajectory is recorded (that one is not in the ini
file I think). This means that there are more numbers to crunch, computation might be affected (even if I think that with the virtual taxels setup that should not be a big deal).
Also, bigger RFs means more training.
An additional thought on the bug suspect - could it be also related to the way the cone is set up? Very narrow around 0? But there was this extra "patch" there for the RF (where is it in the code?). How was the RF in the negative distance domain actually?
Exactly, the reason is exactly that one. On the Matlab side we fixed it by moving from a cone to a cylinder when the distance is below a certain threshold, but I think that we did not on C++. We probably found the issue while working for IROS on the matlab learning. The bigger the systematic offset is, the more evident the "hole" (because an incoming object exits the reference frame earlier in its trajectory).
I took a look at the issue. The file to look into is this one : https://github.com/alecive/pps-gitlab/blob/master/2016_PLOS_ONE/utils/train_taxelNEW.m
And specifically:
(abs(data_X(3)) <= binLimit
and is within a cylinder data_X(1)*data_X(1) + data_X(2)*data_X(2) < RFlimit_cyl*RFlimit_cyl))
In the matlab code binLimit
has been set to twice binWidthX
(i.e. two bins of the 20 in the RF will have this "cylinder" feature), but this can be arbitrarily increased if needed.
Thanks @alecive ! So:
In matlab there is a cone and cylinder, yes (also in the negative domain) :)
And I gave you the pointers in the previous comment :+1:
Could you still answer point 2. please? I meant pointers to C++ code now.
Yes there is a cone always (also in the negative).
Here is where I compute if the event is inside the RF https://github.com/robotology/peripersonal-space/blob/master/lib/src/utils.cpp#L358 (it should be straightforward to extend ti by copying the matlab code).
Also, now that I look at the code I would like to move TaxelPWE
, TaxelPWE1D
and TaxelPWE2D
into their own separate TaxelPWE.cpp
file, and cleanup utils.cpp
. I can do that, or you guys can (for me it's the same) :grin:
I'm displaying a lot of detailed debugging outputs while testing something else now. I'm getting a lot of events with positive TaxelPWE:insideFoRCheck
while at the same time NRM for those events varies greatly - e.g. from -0.38 to 1.15. I assumed the NRM is Euclidean distance in meters - but 1 m away can't lie inside the RF I guess? The responses computed for them all end up 0.0.
In C++, the cylinder was implemented too (together with the cone): https://github.com/robotology/peripersonal-space/blob/pps-with-modulations/lib/src/taxelPWE.cpp#L61
Ok, so here is my proposal for new definition of maximum visual RFs of taxels. The idea is to get rid of the spherical sector and a cylinder to patch the volume around the taxel where the sector has 0 volume. The new way would be to take the spherical sector only, but shift it toward the taxel, such that it does not start at the apex. Like this:
One value that I specify is the radius I want at the taxel (z = 0), which I set to 5 cm. The rest is calculated automatically with max(z) extracted from the pps settings for the bins.
The same can be applied to the negative domain. With min(z)=-0.1
and max(z)=0.2
(our default settings), this gives rise to:
The taxel is a red dot at [0,0,0]
.
I think this is a more parsimonious solution than the "cone & cylinder". I'm gonna start porting this to the C++ - if you have any ideas, please comment ASAP. (especially @alecive )
Couple comments:
Other comments:
But apart from these points, feel free to go!
Normally, I'm not the picky one, but how can I respond to this numbering? :)
feel free to go then :+1:
Most of this has been addressed by: https://github.com/robotology/peripersonal-space/pull/32 now.
Currently, I have increased the RFs - radius at base 7 cm (from 5) and angle 50 deg (from 40). https://github.com/robotology/peripersonal-space/blob/pps-with-modulations-devMultiEvent/lib/src/taxelPWE.cpp#L8
We still need to test the representations after learning - whether they will be smooth around 0, for example. This is dependent on #17 which is pending.
We'd also like to extend the RF to e.g. 45 cm range. Then the size/time span of the buffer needs to be tested/adapted as noted above.
We have successfully tested <-0.05,0.45> range. Check for the bin at 0 is pending (@towardthesea).
@towardthesea has been visualizing the discrete representations from some of the learned
.ini
files (concretely this one: taxels1D_learnedAll.ini). The plots, here left_forearm.zip, indicate that there might be something wrong with the binning around 0 - there are too often empty bins. Just to give some pointers, these are IMO the relevant pieces of code:A related question. I feel the 20 cm range for PPS may bee too restrictive for future applications (plus in terms of the brain, much bigger receptive fields are also present). To change that to 50 or 90 cm, say, what would that entail?