-
Notifications
You must be signed in to change notification settings - Fork 107
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 trigger service to enable/disable the standalone node #43
base: master
Are you sure you want to change the base?
Add trigger service to enable/disable the standalone node #43
Conversation
} else { | ||
enabled_ = false; | ||
response.success = true; | ||
response.message = "costmap converter stopped."; |
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.
why not disabled? (or started above)
if (request.data) { | ||
enabled_ = true; | ||
response.success = true; | ||
response.message = "costmap converter enabled."; | ||
} else { | ||
enabled_ = false; | ||
response.success = true; | ||
response.message = "costmap converter stopped."; | ||
} | ||
return true; |
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.
if (request.data) { | |
enabled_ = true; | |
response.success = true; | |
response.message = "costmap converter enabled."; | |
} else { | |
enabled_ = false; | |
response.success = true; | |
response.message = "costmap converter stopped."; | |
} | |
return true; | |
if (request.data) { | |
response.message = "costmap converter enabled."; | |
} else { | |
response.message = "costmap converter stopped."; | |
} | |
enabled_ = request.data; | |
response.success = true; | |
return true; |
S: less duplication
@@ -85,13 +85,17 @@ class CostmapStandaloneConversion | |||
costmap_update_sub_ = n_.subscribe(costmap_update_topic, 1, &CostmapStandaloneConversion::costmapUpdateCallback, this); | |||
obstacle_pub_ = n_.advertise<costmap_converter::ObstacleArrayMsg>(obstacles_topic, 1000); | |||
marker_pub_ = n_.advertise<visualization_msgs::Marker>(polygon_marker_topic, 10); | |||
trigger_ = n_.advertiseService("enable", &CostmapStandaloneConversion::triggerCb, this); |
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.
S: dynamic reconfigure parameter instead of service
Adding a service to stop the node for obstacle computation (costmap is still updated).