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

Feat/persistent service client refactor #11

Closed
wants to merge 153 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
4fe46e7
Added new time average metrics to the queues and added metrics to the…
Mar 7, 2024
0749e13
Added maintainer name in the ros_queue readme
Mar 7, 2024
df0a42c
Added the ros_queue_experiments package
Mar 7, 2024
ec7e882
Added a message for the states of the auv experiment system
etienn8 Mar 11, 2024
bd66d49
Added a state manager to simplified manipulation between the system i…
etienn8 Mar 11, 2024
0e6ea66
Added AUVStates namespace to add the transmission vector and zone con…
etienn8 Mar 11, 2024
26de59f
Added base class to hold the service server in the auv_system
etienn8 Mar 11, 2024
7c5ed11
Moved the metric_services class to a more specific directory
Mar 13, 2024
4f6021b
Removed unused constructor of the AUVStateManager
Mar 13, 2024
7fe503f
Added the renewal time prediction services
Mar 13, 2024
b096719
Fixed incorrect else if usage
Mar 13, 2024
15a34fa
Added an initial config files for the temperatures and expected times
Mar 13, 2024
1ff1868
Added temperature services
Mar 14, 2024
dd55d38
Added AUV state initialization
Mar 14, 2024
dd23569
Added methods to get the renewal time base from the current state to …
Mar 14, 2024
0c2ca52
Fixed conversion error from the bool array of ROS messages to vector<…
Mar 14, 2024
86e8f5e
Added core class of the AUV that will propogate the dynamic, holds th…
Mar 14, 2024
cc332b5
Added the main auv node
Mar 14, 2024
11e2b1f
Added localization metrics services
Mar 14, 2024
53ba895
Added the missing fetching of parameters for the real model of the te…
Mar 14, 2024
9dc3ae9
Trailing space
etienn8 Mar 14, 2024
42b1cfe
Added DualMetricServices for metrics that have arrival and departures
etienn8 Mar 14, 2024
aa72693
Added the departure services to the temperature services
etienn8 Mar 14, 2024
801cc45
Added the departure services of the localization metrics
etienn8 Mar 14, 2024
3396e1d
Added the localization target in the config file
etienn8 Mar 14, 2024
d21a6ff
Trailing spaces
etienn8 Mar 14, 2024
c78ccfe
Added TaskPublisher
etienn8 Mar 15, 2024
615f129
Added a service to indicate how many bytes could be transmitted based…
etienn8 Mar 15, 2024
f2eabc5
Added the penalty services based on the traveled distance
etienn8 Mar 18, 2024
523a9a0
trailing space
etienn8 Mar 18, 2024
72e103b
Added a pointer to the AUVSystem in the AUVStateManager
etienn8 Mar 18, 2024
41aeb50
Added the dynamic change of the metrics
etienn8 Mar 18, 2024
353a88a
Added the server to get all the potential actions in the ros_queue_ex…
etienn8 Mar 19, 2024
621cce8
Added two messages for the communication between the AUV system node …
etienn8 Mar 20, 2024
9f1a0c2
Added the action perturbation node and the CMakeList file
etienn8 Mar 20, 2024
a5c3d6f
Typo in action server name
etienn8 Mar 21, 2024
bdc8e1c
Added the service on the AUV system side to received disturbed command
etienn8 Mar 21, 2024
85284fd
Added the real renewal time service compuation
etienn8 Mar 25, 2024
e38fce0
Trailing space
etienn8 Mar 25, 2024
105454f
Added test file to manually verify that the parameters and services w…
etienn8 Mar 25, 2024
5285b5f
Changed the model to remove displacements between zones.
etienn8 Mar 25, 2024
a4e65cc
Added missing localization state updates in the AUVStates msg
etienn8 Mar 25, 2024
8ab534c
Fixed converted queue bytes that wouldn't be transmitted if the remai…
etienn8 Mar 25, 2024
4a53904
Made the ConverteRemainingMean more specific to blocked queues and no…
etienn8 Mar 25, 2024
35d6770
Removed the spinning rate of the AUVSystem node to get the fastest ca…
etienn8 Mar 25, 2024
581bcbf
Changed the action service callback system to enable the reception an…
etienn8 Mar 26, 2024
8459d6d
Fixed bug where the task that could be sent was never reset between s…
etienn8 Mar 26, 2024
5c666bd
Added the auv_state publisher and added metrics to see the proportion…
etienn8 Mar 27, 2024
c52a82d
Scaled the arrival and departures of the read metrics to have their s…
etienn8 Mar 27, 2024
ba1c636
Fixed error where localization returned the temperature
etienn8 Apr 1, 2024
0b2c16c
Fixed transmission bug where the data transmission was reduced one me…
etienn8 Apr 1, 2024
addf0c2
Added messages to get the internal costs of each action in a controll…
etienn8 Apr 2, 2024
ede9f05
Added internal controller cost topic
Apr 2, 2024
10b770f
Added a service to get the queue server stats
Apr 11, 2024
e9cee43
Added classes to monitor the time average arrivals of metrics
Apr 12, 2024
faec58e
Added the arrival performance of the localization and added the perfo…
Apr 12, 2024
986d212
Added missing localization_monitor file from last commit and added me…
Apr 12, 2024
123949f
Added the mean arrival and departure monitoring of the real queue and…
Apr 17, 2024
1c514f8
Fixed the missing publication of the controller costs for the renewal…
Apr 17, 2024
1caa5be
Added services for rate and changes for each metrics
Apr 19, 2024
869dae8
Fixed mistmatch between the trigger services request from the virtual…
Apr 19, 2024
8d8c17c
Added the real arrival and departure change for the localization and …
Apr 22, 2024
512726c
Added potential missing include files that might cause a dependency p…
Apr 22, 2024
9012222
Added the launchfile that starts a non renewal controller with no ste…
Apr 22, 2024
568bcaf
Added the queue_controller config file and the queue server config file
Apr 22, 2024
c037ac5
Added generic metric for the auv system and the config file for the p…
Apr 22, 2024
987c598
Added a action performance publisher in the disturbed action server
etienn8 Apr 23, 2024
d3e2467
Added non-periodic mode to the queue controller to start a controller…
etienn8 Apr 24, 2024
038d20b
Removed word duplication in queue controller's README
etienn8 Apr 24, 2024
77d9bba
Added real predictions of queue changes for the optimal controller co…
Apr 29, 2024
dc25e4d
Added a parameter to the disturbed action server to make dummy to rec…
Apr 30, 2024
f3cbc91
Removed unused library ros_boosted_utilities dependency
Apr 30, 2024
4271f3c
Added a synchronization mechanism for the queue controllers
Apr 30, 2024
08dfea9
Added a multi controller setup to compare the controller with expecte…
Apr 30, 2024
a5f7359
Added a wait for existence on the topic that a controller depends on …
May 1, 2024
bb1b848
Added the real expected metric of the penalty and the renewal time an…
May 1, 2024
6f87eea
Added a approximate message to synchronise the output of the controll…
May 2, 2024
bb7a6d4
Trailing space
May 2, 2024
98331fc
Remove unfinished sentence
May 2, 2024
aa8e67e
Added flag to prevent a queue controller from sending changes to a qu…
etienn8 May 3, 2024
08cdd97
Setup the multicontroller setup in the experiments so only the optima…
etienn8 May 7, 2024
29bd515
Added 5 types of experimental setup for model and action uncertainty
etienn8 May 7, 2024
ce33a66
Added a metric to see the diffirence of estimation between the server…
etienn8 May 7, 2024
42d3f85
Added the support of relative topic names for the queue controller an…
May 8, 2024
7fb552f
Removed unused file
May 8, 2024
a92c192
Added launchfile to start multiple queueing system with similar fault…
May 15, 2024
4b50eda
Added a gitgnore to prevent committing experiment results
May 15, 2024
829fda4
Changed output directory for more a convenient name
May 15, 2024
054e124
Added a rosbag recorder in the experiment launchfile that listens to …
May 15, 2024
895e66a
Added the computation of the theoretical mean the continuous metrics …
May 16, 2024
9e32d78
Made a queue_controller_utils library and added a util to know if the…
May 17, 2024
1f0b308
Exposed queue_controller_utils_lib to other packages
May 17, 2024
22d5c5c
Removed jitter and delay noise in monitoring by moving the publish au…
May 17, 2024
eb8596a
Added elapsed time in the queue server stats messages
May 20, 2024
00a4371
Added the exposition through the monitoring message of the differenc…
May 20, 2024
4affeb5
Moved the monitoring sample between the controller start even and opt…
May 20, 2024
2821758
Removed useless static variable from queue_controller
May 21, 2024
3ae9ff1
Added the controller execution time in the last renewal message and s…
May 23, 2024
1659b32
Fixed Inversted step real queue changes computation of the temperatur…
May 23, 2024
d1b2164
Added the change that happened during the last controller execution
May 23, 2024
0ed0da8
Reafactored the average means of the queue server stats to time avera…
May 23, 2024
99456d1
Moved the definitions of the MeanStats classes to a cpp to remove pot…
May 23, 2024
f45a18d
Unified estimation error by addinfg the arrival_mean of queues in ros…
May 24, 2024
bcb5698
Fixed the double integral of the renewal target for renewal system
May 24, 2024
69e9e5a
Added a aunch file to plot estimation error and control error
May 24, 2024
36176ba
Added a single controller launchfile for debugging and testing
May 24, 2024
ce155c3
Changed parameters line placement for clarity in the experiment_launcher
May 24, 2024
882591c
Changed the arriving message to a valu of 8 per seconds to put the sy…
May 27, 2024
80fab5c
Set the localization rate for the bad predictions case so its value i…
May 27, 2024
2e1049d
Removed unused files
May 27, 2024
f494648
Reduced the weight of the localization and temperature queue to remov…
May 27, 2024
bd9cf98
Added a new queue that makes the temperature to above 0 deg
May 28, 2024
252c630
Compute the monitoring of the time average queue arrival of queues wi…
May 30, 2024
51a7b1f
Added an index in the ActionPerformance message to indicate the taken…
May 30, 2024
391d088
Added missing low temp target
May 30, 2024
1556ceb
Added the penalty measurement of the controller action in addition to…
May 30, 2024
922aa0e
Added penalty monitor that measures the last value, the mean and the …
Jun 3, 2024
876ae69
Moved sources files of ros_queue_experiments to subfolders for clarity
Jun 3, 2024
4e1f69a
Added missing pragma once to an include file
Jun 3, 2024
973734f
Added a python experience manager to launch experiments for a given time
Jun 3, 2024
bc8559c
Added some scripts to launch the first experiment and read its rosbag
Jun 5, 2024
ed82b8f
Added the extraction of the metric performances and the queue server …
Jun 5, 2024
22dc1b0
Added a createCSV function to save arbitrary series in a CSV with an …
Jun 5, 2024
54440f9
Transformed all the queue_performance measurements in series
Jun 6, 2024
25a0dfe
Added the science matplotlib style
Jun 7, 2024
4d9464f
Added the python requirements
Jun 7, 2024
d7b0e93
Added the low_temperature metric performance, made the QueueEndValues…
Jun 7, 2024
16c7fe0
Fixed synchronization mechanism in queue_controller
Jun 10, 2024
1030a50
Added the persistent service client to the disturbed action server an…
Jun 11, 2024
6d2bbee
Added the reading of the queue sizes from the queue server from the d…
Jun 18, 2024
eeb9406
Typo in the syncrhonized action monitoring and adding missing control…
Jun 18, 2024
5d5b437
Adding missing building dependency for the perturbation action node
Jun 18, 2024
cae6afe
Ignore file from the Python's cache
Jun 18, 2024
ee63f64
Added the ActionSeries data structure in the python analyser
Jun 18, 2024
9b46695
Missing typo correction in header
Jun 18, 2024
2a0251b
Added a flag to prevent automatic output generation and a flag to aut…
Jun 18, 2024
77553c4
Added the action performance reading from the pertubation node
Jun 18, 2024
126448d
Added the plots for the experiment 1
Jun 18, 2024
289ea26
Adjusted action perturbation to be less agressive
Jun 19, 2024
9738ba0
Typo and add early break in a the for loop to find init time in exper…
Jun 19, 2024
208d299
Added absolute estimation error, refactored ActionSeries for ActionPe…
Jun 19, 2024
dc5dd8c
Added the second experience to see the effect of perturbations on the…
Jun 19, 2024
6e1be06
Removed unused commented code from the experiment2
Jun 19, 2024
ed94b05
Changed graph titles to indicate that we use the absolute value of es…
Jun 19, 2024
7acecce
Removed unused launchfile
Jun 19, 2024
659971a
Added the graphics of the estimation errors of the low-temperature qu…
Jun 19, 2024
1924447
Specified acquired bags for the output generation of the experiment 2…
Jun 19, 2024
66fec4f
Changed the weights of the controller to see the see the impact of t…
Jun 19, 2024
07c27be
Added the build dependencies to the PersistentServiceClient for the r…
Jun 20, 2024
a39ee79
Changed all the service client from the ros_queues for persistent client
Jun 20, 2024
8d5f15f
Refactored the service client of the QueueController for persistent s…
Jun 20, 2024
beca71e
Updated READMEs to include ros_boosted_utilities
Jun 20, 2024
d86532f
Added waitForExistence() on the persistent service client of the ros_…
Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added base class to hold the service server in the auv_system
-Added the MetricServices class to serve has a base class for the metrics that needs to be fetched by the system.
- The has a pointer towards  a AUVStateManager to have an interface to get the current state of the system via the getCurrentStates() method.
- Four callbacks are defined. Two of them are used as the service callback and they each call a virtual method that will need to be overridden by a child class.
- In the callback, two of them is linked to the real measure of the metric will the other one is the service to get a predicted value of the metric for given actions.
etienn8 committed Mar 11, 2024
commit 26de59f1427f745ea0025b1447b9120464c2c335
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#pragma once

#include "ros/ros.h"

#include <string>
#include <memory>

#include "auv_state_manager.hpp"

#include <ros_queue_msgs/FloatRequest.h>
#include <ros_queue_msgs/MetricTransmissionVectorPredictions.h>
#include <ros_queue_experiments/AuvStates.h>


class MetricServices
{
public:
MetricServices(ros::NodeHandle nh, std::string metric_name, std::shared_ptr<AUVStateManager> auv_state_manager);

protected:
std::string metric_name_;

ros::NodeHandle nh_;

ros::ServiceServer real_metric_service_;
ros::ServiceServer expected_metric_service_;

std::shared_ptr<AUVStateManager> auv_state_manager_;

virtual bool realMetricCallback(ros_queue_msgs::FloatRequest::Request& req,
ros_queue_msgs::FloatRequest::Response& res) = 0;

virtual bool expectedMetricCallback(ros_queue_msgs::MetricTransmissionVectorPredictions::Request& req,
ros_queue_msgs::MetricTransmissionVectorPredictions::Response& res) =0;

ros_queue_experiments::AuvStates getCurrentStates();
private:
bool realServiceMetricCallback(ros_queue_msgs::FloatRequest::Request& req,
ros_queue_msgs::FloatRequest::Response& res);

bool expectedServiceMetricCallback(ros_queue_msgs::MetricTransmissionVectorPredictions::Request& req,
ros_queue_msgs::MetricTransmissionVectorPredictions::Response& res);


};
30 changes: 30 additions & 0 deletions ros_queue_experiments/src/metric_services.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "ros_queue_experiments/metric_services.hpp"

MetricServices::MetricServices(ros::NodeHandle nh, std::string metric_name, std::shared_ptr<AUVStateManager> auv_state_manager): nh_(nh), metric_name_(metric_name), auv_state_manager_(auv_state_manager)
{
real_metric_service_ = nh_.advertiseService(metric_name_ + "/real_metric", &MetricServices::realServiceMetricCallback, this);
expected_metric_service_ = nh_.advertiseService(metric_name_ + "/expected_metric", &MetricServices::expectedServiceMetricCallback, this);
}


bool MetricServices::realServiceMetricCallback(ros_queue_msgs::FloatRequest::Request& req,
ros_queue_msgs::FloatRequest::Response& res)
{
return realMetricCallback(req, res);
}

bool MetricServices::expectedServiceMetricCallback(ros_queue_msgs::MetricTransmissionVectorPredictions::Request& req,
ros_queue_msgs::MetricTransmissionVectorPredictions::Response& res)
{
return expectedMetricCallback(req, res);
}

ros_queue_experiments::AuvStates MetricServices::getCurrentStates()
{
if(auv_state_manager_ == nullptr)
{
ROS_ERROR("AUVStateManager is not set");
return ros_queue_experiments::AuvStates();
}
return auv_state_manager_->getCurrentStates();
}