Open luo1239021639 opened 6 years ago
Hi Luo Thanks for your message. In fact this function should be used only for singular switch points. There should be a test for it. Let me know if you ever enter that function from another type of switch point. Cheers Cuong
-- Sent from my mobile phone www.normalesup.org/~pham www.ntu.edu.sg/home/cuong
On 8 Mar 2018, at 16:02, luo1239021639 notifications@github.com wrote:
Hi Cuong.
I think there's a bug here:
TOPP.cpp Line 1701~1706: // Address Switch Point if (!AddressSwitchPoint(constraints, switchpoint, sbackward, sdbackward, sforward, sdforward)) continue;
// Add middle part constraints.resprofileslist.push_back(StraightProfile(sbackward,sforward,sdbackward,sdforward));
In function AddressSwitchPoint, when switchpoint's type is Tangent, Discontinuous or Zlajpah, sforward == sbackward.
TOPP.cpp Line 1666~1667: dReal dtmod = 2 * (sforward - sbackward) / (sdforward + sdbackward); dReal sdd = (sdforward - sdbackward) / dtmod;
sforward == sbackward means dtmod ==0 , and there is a Division by zero, then sdd will be a weird value.
Please forgive my poor English
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi Cuong It is very nice to get your reply. When I test Wiki Quick Example Kinematic limits (initial trajectory specified by trajectorystring) there will some TANGENT and DISCONTINUOUS switch points.
Then, I enter the function from another type of switch point and get a sdd with weird value.
If I change the code like that, the breakpoint will be triggered
dReal dtmod = 2 * (sforward - sbackward) / (sdforward + sdbackward); dReal sdd; if (abs(dtmod) > TINY) sdd = (sdforward - sdbackward) / dtmod; else (breakpoint) sdd = 0;
Luo
Hi Cuong.
I think there's a bug here:
TOPP.cpp Line 1701~1706: // Address Switch Point if (!AddressSwitchPoint(constraints, switchpoint, sbackward, sdbackward, sforward, sdforward)) continue;
In function AddressSwitchPoint, when switchpoint's type is Tangent, Discontinuous or Zlajpah, sforward == sbackward.
TOPP.cpp Line 1666~1667: dReal dtmod = 2 * (sforward - sbackward) / (sdforward + sdbackward); dReal sdd = (sdforward - sdbackward) / dtmod;
sforward == sbackward means dtmod ==0 , and there is a Division by zero, then sdd will be a weird value.
Please forgive my poor English