Possible Bug in Rotation?
See ToolFlowNet (and other methods) with and without this fix.
Created on August 7|Last edited on August 7
Comment
Contents:
Overview
It is with these lines:

I don't think we should have an "if" condition, I think we should always be scaling, but for some reason I did not do this earlier. Is it OK?
Judging from the policy outputs, if we use the old ladle_algorithmic_v04 dataset (which is what we've been using all along) then the REVISED version where we always scale will lead to extremely tiny rotations.
There reason is that: self.max_rot_axis_ang / np.sqrt(3) = 0.0125. So this will shrink our rotation radian value by a factor of about 100X ... all the time.
BUT ... when we generated the demonstrations, we used a fixed rotation amount of 0.011 for each of the _step calls in the action repeat (multiplied by 8 and this is our max value of 5 degrees per step). That is below the maximum value of 0.022, so if the network is accurately predicting rotations, it should NOT see any decreases! Thus, a properly learned policy which doesn't overestimate too much should still fall under the limit of 0.022, right?
I think this validates our earlier results (whew!) and just means that we should be careful if we are making "aggressive" rotation predictions. For that I think we can hack up a change where we do the scaling but where we "cap" it at self.max_rot_axis_ang instead of doing the multiplication... Like this:

Results
Direct Vector (bad rotation, reproduced)
5
Direct Vector (bad rotation, CoRL)
5
Direct Vector (good rotation)
5
TFN (bad rotation, reproduced)
5
TFN (bad rotation, CoRL)
5
TFN (good rotation)
5
ToolFlowNet
My conclusion is that if we are doing BC, then the rotation value that is being predicted falls under the threshold for scaling. Because if we always scale it, we get no rotation, otherwise, we do get a rotation.
With "Good" Rotation Scaling:
Last epoch from /data/seita/softagent_mm/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg_2022_08_04_09_38_58_0004/video

Last epoch from /data/seita/softagent_mm/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg_2022_08_04_09_38_58_0005/video, ah now I might see why ...

With "Bad" Rotation Scaling:
Last epoch from /data/seita/softagent_mm/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg_2022_08_05_14_14_42_0002/video

Last epoch from /data/seita/softagent_mm/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_svd_pointwise_ee2flow_4DoF_ar_8_hor_100_scalePCL_noScaleTarg_2022_08_05_14_14_42_0001/video

And here is the Direct Vector example /data/seita/softagent_mm/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_eepose_4DoF_ar_8_hor_100_rawPCL_scaleTarg/BC04_MMOneSphere_v01_ntrain_0100_PCL_PNet2_eepose_4DoF_ar_8_hor_100_rawPCL_scaleTarg_2022_08_05_14_07_32_0005/video

Add a comment