-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/queue controller #10
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Also change the QueueStatesPrediction service for the MetricPrediction service since it could be used for more than the queues (like the penalty in the queue_controller).
- Added a service named "get_serve_state" to manually get the size of the queues from the queue server. - Fixed a typo in a variable name to indicate that it's an class's attribute. - Removed an unused and outdated message header file. - Updated the ros_queue's README
- Added a new subscriber called "virtual_queue_manual_changes" that, when called, will applied changes specified in the messages to the specified virtual queues. - Update the queue_server's readme
- Added the inverse_control_and_steps flag that indicates if the update step should be done before or after the control step. It will mainly affect if the queues will be updated based on current system state or based on the last chosen action. - Added expected arrival and departure services name to the queue's configuration. They are use by the controller to evaluate how each metric will change if a given action is taken.
- Added the queue_controller_node that start a queue_controller - Added the unfinished QueueController class. -- Added all the parameters and services found in the config/min_drift-plus-penalty_template.yaml -- Added the fetch and the parsing of all the queue controller parameters -- Added the dependency to rosparam_utils since to help to fetch parameters
- Added the queue_controller_node that start a queue_controller - Added the unfinished QueueController class. -- Added all the parameters and services found in the config/min_drift-plus-penalty_template.yaml -- Added the fetch and the parsing of all the queue controller parameters -- Added the dependency to rosparam_utils since to help to fetch parameters
- Added a queue_server_utils file in the queue_server. - Added a check to see if a queue type is virtual or not. So if another node gets the parameters of a queue from the queue server, it could know if the queue is virtual or not. - Adpated the CMakeList.txt to add the utils in the queue_server_lib
- Added a service definition that takes an action set in input and output a list a prediction of the metric for all the actions.
- Changed serviceClient smart pointers for direct serviceClient object since it's non trivial to create a unique ptr of a serviceClient. Instead the whole ControllerQueueStruct will be a pointer instead.
…plus drift penalty algorithm without renewal - Added a new method populateQueueStructures() to populate the internal queue configuration needed for the controller from the parsed parameters. Also makes checks about the parsed parameters. if a parameter is missing, the queue will not be registerd internally. It also checks if the queue server is up and if the queue exists in the queue server. -
- Added a package dependency to the queue_controller in the ros_queue_tests package - Changed the name of of the launchfile virtual_queues_with_poisson to queues_with_poisson since there is a real queue also in it. - Added a new launchfile that starts a queue_server, a distribution server and a queue controller. Mainly for testing manually the queue controller parameters parsing. - Added a new controller configuration connected to the queue server queues.
- Added all the declarations related to the controller steps of the min drift-plus-penalty algorithm - Added data structures to pass results between controller steps - Removed unused attribute current_action_set_ since the action sets are now local variables
…definitions Since the queue controller uses services that require to know the action msg definition, building multiple controllers with different action definition will make compilation errors. To enable the creation of multiple controller with different action definitions, a templated version of the controller will allow to create controller's node based on specified messages. - Moved the definitions of QueueController from its .cpp to a templated version in the hpp - Added the partial definition of getParametersForControlStep to get the parameters from the queue for each action. Missing the expected time, the queue sizes and the service call to get queue size has departure or arrival. - Removed the queue_controller.cpp file since its now unused - Added a bernoulli_action_controller_config since the present action_message is of type Bernoulli
- Added the PredicitionService that creates ROS services based on the config prediction_servers.yaml. It either creates a service that uses a transmission_vector as a service request or a service that returns a static value. - Added the prediction_server_node that creates a PredictionServer that starts predictions services. - Added a Transmission vector action server that exposes 3 possibles actions corresponding to a 3 queue with two server action set. - Updated the controller ros_queue_tests's launchfile to add the prediction_server_node and the transmission_vector_server - Changed the definition of the ros_queue_msgs/PotentialAction
…ed missing request in penalty service call
… time - Added a last_renewal_service_server to the queue controller that uses the async_spinner_queue_ that it got from a new NodeHandle (async_nh_). - Added an asynchronous spinner that calls the async_spinner_queue_ in parallel of the main thread. It thus allows the last_renewal_service_server callbacks to be called even if the queue controller doesn't call the ros::spin(). - Added a mutex to protect the last_renewal_time access. -Moved the fetch of the expected times in a block that is only executed if controller is renewal.
…e definition. Change from bernoulli to transmission vector since most of the system has already been refactored with this name
…enewal controller
- Changed the name of the node from queue_controller_node.cpp to transmission_vector_queue_controller_node.cpp which is specifig to the the type of action it's dependent on. -
…terized launchfile - Changed the name of the queue_controller_template launchfile to juste queue_controller.launch - Added an argument in the launchfile to specify which action-specific controller to use (based on the cmake target name).
- With MathJax
Since there is no requirements to get the parameters for the control setep except for the action set, all the service calls could be done in parallel. To prevent to add even more message definitions by using actionlib, another approach is used that puts the services in threads and just waits for the results. The approach uses std::future. - Added a structure AsyncMetricFutureStruct to interact with the asynchronous calls of the services. - Added an enumeration to give a mechanism to know which type of parameter is being fetched. - Added methods to create an asynchronous service call and add it to a future vector to wait for the results. One method is for services that use an action in their request and the other one for ros_queue_msgs::FloatRequest messages. - Adapted the getParametersForControlStep() method so the penalty, renewal time, arrival and departures are called in parallel ant to wait for their results at the end. -
…whenever they are triggered to update - Based on std::future
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the queue_controller node to stabilize queues of a queue_server while minimizing a penalty.