-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix for #43 #59
base: master
Are you sure you want to change the base?
Fix for #43 #59
Conversation
@@ -51,12 +52,16 @@ class LocomotorActionServer | |||
void publishFeedback(const locomotor_msgs::NavigationState& nav_state); | |||
void completeNavigation(); | |||
void failNavigation(const locomotor_msgs::ResultCode& result_code); | |||
|
|||
// Note: This is a separate method so as not to change the previous constructor parameter list | |||
void setPremptionCallback(PreemptionCallback cb) { preemption_cb_ = cb; } |
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'd recommend just having a virtual void onPreemption() {}
method that the user can override.
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.
In which class?
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.
In this one. Rather than setting a callback functor, you can just let the user override the onPreemption
method if they want to trigger some callback. These 2 actions will have equal output.
Hello, what is the status of this? @SteveMacenski, if @DLu does not have the time i can integrate the changes you requested into a fork and create a new merge request. |
Potential fix for #43.
@cf-zhang Does this work for you?