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

Spline protective stop ci #162

Merged
merged 4 commits into from
Aug 7, 2023

Conversation

urrsk
Copy link
Member

@urrsk urrsk commented Aug 4, 2023

This PR mainly improve robustness for spline interpolation

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.10% 🎉

Comparison is base (cf8c61d) 70.62% compared to head (ff72c9c) 70.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
+ Coverage   70.62%   70.73%   +0.10%     
==========================================
  Files          69       69              
  Lines        2526     2525       -1     
  Branches      322      322              
==========================================
+ Hits         1784     1786       +2     
+ Misses        556      553       -3     
  Partials      186      186              
Files Changed Coverage Δ
src/control/reverse_interface.cpp 90.00% <100.00%> (-0.15%) ⬇️
src/control/script_command_interface.cpp 94.91% <100.00%> (ø)
src/control/trajectory_point_interface.cpp 81.01% <100.00%> (+3.79%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@urmahp urmahp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me. Just added a small suggestion to not round variables that are already integers.

@@ -92,7 +93,7 @@ bool ScriptCommandInterface::setToolVoltage(const ToolVoltage voltage)
int32_t val = htobe32(toUnderlying(ScriptCommand::SET_TOOL_VOLTAGE));
b_pos += append(b_pos, val);

val = htobe32(toUnderlying(voltage) * MULT_JOINTSTATE);
val = htobe32(round(toUnderlying(voltage) * MULT_JOINTSTATE));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already an int, so no need to round this.

b_pos += append(b_pos, val);
}

for (auto const& selection : *selection_vector)
{
val = htobe32(static_cast<int32_t>(selection * MULT_JOINTSTATE));
val = htobe32(static_cast<int32_t>(round(selection * MULT_JOINTSTATE)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

b_pos += append(b_pos, val);
}

val = htobe32(static_cast<int32_t>(type * MULT_JOINTSTATE));
val = htobe32(static_cast<int32_t>(round(type * MULT_JOINTSTATE)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@urrsk urrsk force-pushed the Spline_protective_stop_ci branch from 6c451b9 to ff72c9c Compare August 7, 2023 09:25
@urrsk urrsk merged commit c88ce84 into UniversalRobots:master Aug 7, 2023
17 checks passed
@urrsk urrsk deleted the Spline_protective_stop_ci branch August 7, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants