Fix reverse motions the have different signs of v0 and v1#13
Fix reverse motions the have different signs of v0 and v1#13SungChiCHIANG wants to merge 3 commits intomarcbone:mainfrom
Conversation
velocity of a reverse motion have different signs
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
+ Coverage 79.37% 80.60% +1.23%
==========================================
Files 1 1
Lines 543 593 +50
Branches 95 107 +12
==========================================
+ Hits 431 478 +47
+ Misses 63 52 -11
- Partials 49 63 +14
☔ View full report in Codecov by Sentry. |
|
Hi, should I just add some unit tests to boost up the coverage rate? I can see that SCurveInput::is_trajectory_feasible() is not covered yet. |
|
First of all, thank you very much for your PR! I am always happy when somebody is opening a PR. I didnt had time yet to look into your PR in detail and you can expect it to take a while. But at a first glimpse it looks like you added a test for the bug you are fixing, so I am more than happy with that. But of course more tests are always appreciated 😅 . Also keep in mind that code coverage for rust based projects is calculated in weird ways. So dont worry about it going down a bit. |
Currently, the calculation of a reverse motion may get the wrong result when the signs of
v0andv1are different. For example, consider an input:And the result profile will be like:

But when a reverse version of the above input is calculated:
The result profile will be like:

After the modification, the result profile will be like the reverse version of the original profile, as expected:

Two test cases are added as well to confirm that two opposite start conditions will get the same time intervals.