Closed RiccardoGrieco closed 2 years ago
@RiccardoGrieco let me know when the PR is ready to be checked (in latest tests was not working properly)
As per discussion with @lrapetti we will implement the following changes:
allow_dynamic_data
) that will allow the module to change the number of wearable sensors exposed by the Remapper at runtime. If the parameter is negative after some first reads from the port, the list of exposed sensor will always be the same. In the second case, the module will need less synchronization points as the underlying map buffer won't change.allow_dynamic_data
.With b0d1127 I also switched from std::map
to std::unordered_map
. The first one has an access time that is O(log(n)) w.r.t. the number of sensor, while the second one's access time is O(1). Since we do not have cases where the order is important, it seems safe to me to switch to that one.
Thanks @lrapetti, merging.
This PR introduces the following 2 changes in
IWearRemapper
:std::mutex
instead ofstd::recursive_mutex
in https://github.com/robotology/wearables/pull/174/commits/3c3a4d7902aba66e86e1384277ad294700fe1413