Preallocate JTC variables to avoid resizing in realtime loops#340
Conversation
1e0590e to
dcb42a6
Compare
672acbc to
4bd432d
Compare
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
destogl
left a comment
There was a problem hiding this comment.
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.
can we resize those in on_configure? Since this should be, if possible, real-time capable method.
There was a problem hiding this comment.
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