-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add dynamic reconfigure #6
Conversation
Only supports the following parameters: * wheel_separation_multiplier * left_wheel_radius_multiplier * right_wheel_radius_multiplier * k_l * k_r This implementation is NOT real-time safe!
c3255cd
to
f45ed8d
Compare
@@ -298,6 +314,27 @@ namespace diff_drive_controller | |||
|
|||
void DiffDriveController::update(const ros::Time& time, const ros::Duration& period) | |||
{ | |||
// UPDATE DYNAMIC PARAMS | |||
// Retreive dynamic params: | |||
DynamicParams dynamic_params = *(dynamic_params_.readFromRT()); |
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.
This is going to update all these parameters on control cycle, which seems like a lot. Would it be safe to use a boolean flag across threads to notify of update?
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.
The problem is that there's not write from RT methods supported: see this proposal.
I could add a comment with that link, and we can go back to this discussion when this goes upstream; this is fast enough anyway. What do you think?
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.
Comment added. Merging...
LGTM, as per prior discussion |
8595a5d
to
03fabb0
Compare
03fabb0
to
fb4b05e
Compare
Add dynamic reconfigure (only) for calibration parameters.
This is useful to tune this calibration parameters on the fly.
RT-safe implementation achieved on the second commit.