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

joint_trajectory_controller setHoldPosition could lead to unexpected delay in RT loop when called from inside of RT thread #598

Open
farshbafdoustar opened this issue May 19, 2022 · 0 comments

Comments

@farshbafdoustar
Copy link

The curr_trajectory_box_.set(hold_trajectory_ptr_); in setHoldPosition is putting the hold_trajectory_ptr_ in the box.
If the pointer already in the box, is the last pointer to the current trajectory, the memory pointed by the pointer will be released after the set function. This could lead to an unexpected delay if the current trajectory in the box is a big QuinticSplineSegment (ex. 500 points).

I encountered this delay when I tried to setHoldPosition in update method of my custom controller inherited from joint_trajectory_controller. Have I missed sth?

One workaround could be having a private extra pointer , pointing to the current trajectory in the box and resetting it in a non-RT thread (service call or goalCB). But then it is in opposite to the box concept. Any idea?

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

No branches or pull requests

1 participant