-
Notifications
You must be signed in to change notification settings - Fork 346
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
Preallocate JTC variables to avoid resizing in realtime loops #340
Preallocate JTC variables to avoid resizing in realtime loops #340
Conversation
1e0590e
to
dcb42a6
Compare
672acbc
to
4bd432d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
7ca39b0
to
d54e877
Compare
I don't understand why quite a few unit tests are failing. Marking as draft until that's fixed. |
OK, it does look like this PR does not make the test failures worse. Re-marking it as ready for review. |
d54e877
to
5f17111
Compare
This pull request is in conflict. Could you fix it @AndyZe? |
8cc92fe
to
2a6255c
Compare
The only possibly-controversial thing I see is error handling in case
This could be turned into an |
2a6255c
to
77eef92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this very good! Thanks! Just one small comment.
resize_joint_trajectory_point(state_current_, dof_); | ||
resize_joint_trajectory_point(state_desired_, dof_); | ||
resize_joint_trajectory_point(state_error_, dof_); | ||
resize_joint_trajectory_point(last_commanded_state_, dof_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we resize those in on_configure
? Since this should be, if possible, real-time capable method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Done and tested.
77eef92
to
001c703
Compare
The failing CI things are OK. Merging this. |
last_commanded_state_
was previously used for open-loop control. I think it's redundant withstate_desired_
now, so delete it