diff --git a/rmf_traffic/include/rmf_traffic/schedule/Database.hpp b/rmf_traffic/include/rmf_traffic/schedule/Database.hpp index 6318012f..2d27b4b1 100644 --- a/rmf_traffic/include/rmf_traffic/schedule/Database.hpp +++ b/rmf_traffic/include/rmf_traffic/schedule/Database.hpp @@ -113,7 +113,7 @@ class Database : public ItineraryViewer, public Writer, public Snappable // Documentation inherited from Viewer std::shared_ptr get_participant( - std::size_t participant_id) const final; + ParticipantId participant_id) const final; // Documentation inherited from Viewer Version latest_version() const; @@ -125,11 +125,11 @@ class Database : public ItineraryViewer, public Writer, public Snappable // Documentation inherited from ItineraryViewer std::optional get_itinerary( - std::size_t participant_id) const final; + ParticipantId participant_id) const final; // Documentation inherited from ItineraryViewer std::optional get_current_plan_id( - std::size_t participant_id) const final; + ParticipantId participant_id) const final; // Documentation inherited from ItineraryViewer const std::vector* get_current_progress( diff --git a/rmf_traffic/include/rmf_traffic/schedule/Mirror.hpp b/rmf_traffic/include/rmf_traffic/schedule/Mirror.hpp index 14c3c9e5..f6a6108d 100644 --- a/rmf_traffic/include/rmf_traffic/schedule/Mirror.hpp +++ b/rmf_traffic/include/rmf_traffic/schedule/Mirror.hpp @@ -51,11 +51,11 @@ class Mirror : public ItineraryViewer, public Snappable // Documentation inherited from Viewer std::shared_ptr get_participant( - std::size_t participant_id) const final; + ParticipantId participant_id) const final; // Documentation inherited from Viewer std::optional get_itinerary( - std::size_t participant_id) const final; + ParticipantId participant_id) const final; // Documentation inherited from Viewer std::optional latest_version() const; diff --git a/rmf_traffic/src/rmf_traffic/schedule/Database.cpp b/rmf_traffic/src/rmf_traffic/schedule/Database.cpp index 3f6dd48c..2377692e 100644 --- a/rmf_traffic/src/rmf_traffic/schedule/Database.cpp +++ b/rmf_traffic/src/rmf_traffic/schedule/Database.cpp @@ -1303,7 +1303,7 @@ const std::unordered_set& Database::participant_ids() const //============================================================================== std::shared_ptr Database::get_participant( - std::size_t participant_id) const + ParticipantId participant_id) const { const auto state_it = _pimpl->descriptions.find(participant_id); if (state_it == _pimpl->descriptions.end()) @@ -1320,7 +1320,7 @@ Version Database::latest_version() const //============================================================================== std::optional Database::get_itinerary( - const std::size_t participant_id) const + const ParticipantId participant_id) const { const auto state_it = _pimpl->states.find(participant_id); if (state_it == _pimpl->states.end()) @@ -1345,7 +1345,7 @@ std::optional Database::get_itinerary( //============================================================================== std::optional Database::get_current_plan_id( - const std::size_t participant_id) const + const ParticipantId participant_id) const { const auto state_it = _pimpl->states.find(participant_id); if (state_it == _pimpl->states.end()) diff --git a/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp b/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp index 4c1d7105..e84006a0 100644 --- a/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp +++ b/rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp @@ -255,7 +255,7 @@ const std::unordered_set& Mirror::participant_ids() const //============================================================================== std::shared_ptr Mirror::get_participant( - std::size_t participant_id) const + ParticipantId participant_id) const { const auto p = _pimpl->descriptions.find(participant_id); if (p == _pimpl->descriptions.end()) @@ -272,7 +272,7 @@ std::optional Mirror::latest_version() const //============================================================================== std::optional Mirror::get_itinerary( - const std::size_t participant_id) const + const ParticipantId participant_id) const { const auto p = _pimpl->states.find(participant_id); if (p == _pimpl->states.end()) @@ -297,7 +297,7 @@ std::optional Mirror::get_itinerary( //============================================================================== std::optional Mirror::get_current_plan_id( - const std::size_t participant_id) const + const ParticipantId participant_id) const { const auto p = _pimpl->states.find(participant_id); if (p == _pimpl->states.end()) diff --git a/rmf_traffic/test/unit/schedule/test_Spacetime.cpp b/rmf_traffic/test/unit/schedule/test_Spacetime.cpp index e96cfb62..140ac524 100644 --- a/rmf_traffic/test/unit/schedule/test_Spacetime.cpp +++ b/rmf_traffic/test/unit/schedule/test_Spacetime.cpp @@ -41,8 +41,8 @@ SCENARIO("Testing intersection of spacetime with trajectories") const auto region_box_shape = rmf_traffic::geometry::make_final_convex< rmf_traffic::geometry::Box>(10.0, 1.0); - std::chrono::_V2::steady_clock::time_point lower_time_bound = time; - std::chrono::_V2::steady_clock::time_point upper_time_bound = time+10s; + std::chrono::steady_clock::time_point lower_time_bound = time; + std::chrono::steady_clock::time_point upper_time_bound = time+10s; rmf_traffic::internal::Spacetime region = { &lower_time_bound, @@ -117,8 +117,8 @@ SCENARIO("Testing intersction of various spacetimes and trajectories") using namespace std::chrono_literals; auto time = std::chrono::steady_clock::now(); Eigen::Isometry2d tf = Eigen::Isometry2d::Identity(); - std::chrono::_V2::steady_clock::time_point lower_time_bound; - std::chrono::_V2::steady_clock::time_point upper_time_bound; + std::chrono::steady_clock::time_point lower_time_bound; + std::chrono::steady_clock::time_point upper_time_bound; const auto region_box_shape = rmf_traffic::geometry::make_final_convex< rmf_traffic::geometry::Box>(10.0, 1.0); @@ -1210,8 +1210,8 @@ SCENARIO("Testing intersection of curved trajectory with various spacetimes") GIVEN("spacetime that encompasses the trajectory in space and time") { //creating space to create spacetime - std::chrono::_V2::steady_clock::time_point lower_time_bound = time; - std::chrono::_V2::steady_clock::time_point upper_time_bound = time+10s; + std::chrono::steady_clock::time_point lower_time_bound = time; + std::chrono::steady_clock::time_point upper_time_bound = time+10s; Eigen::Isometry2d tf = Eigen::Isometry2d::Identity(); rmf_traffic::internal::Spacetime region = { @@ -1227,8 +1227,8 @@ SCENARIO("Testing intersection of curved trajectory with various spacetimes") GIVEN("spacetime that encompasses the trajectory in space but not time") { //creating space to create spacetime - std::chrono::_V2::steady_clock::time_point lower_time_bound = time+20s; - std::chrono::_V2::steady_clock::time_point upper_time_bound = time+30s; + std::chrono::steady_clock::time_point lower_time_bound = time+20s; + std::chrono::steady_clock::time_point upper_time_bound = time+30s; Eigen::Isometry2d tf = Eigen::Isometry2d::Identity(); rmf_traffic::internal::Spacetime region = { @@ -1244,8 +1244,8 @@ SCENARIO("Testing intersection of curved trajectory with various spacetimes") GIVEN("spacetime that partially intersects the trajectory in space and time") { //creating space to create spacetime - std::chrono::_V2::steady_clock::time_point lower_time_bound = time; - std::chrono::_V2::steady_clock::time_point upper_time_bound = time+10s; + std::chrono::steady_clock::time_point lower_time_bound = time; + std::chrono::steady_clock::time_point upper_time_bound = time+10s; Eigen::Isometry2d tf = Eigen::Isometry2d::Identity(); rmf_traffic::internal::Spacetime region = { @@ -1263,8 +1263,8 @@ SCENARIO("Testing intersection of curved trajectory with various spacetimes") SCENARIO("Testing multi-waypoint trajectories with various spacetimes") { using namespace std::chrono_literals; - std::chrono::_V2::steady_clock::time_point lower_time_bound; - std::chrono::_V2::steady_clock::time_point upper_time_bound; + std::chrono::steady_clock::time_point lower_time_bound; + std::chrono::steady_clock::time_point upper_time_bound; const auto small_circle_shape = rmf_traffic::geometry::make_final_convex< rmf_traffic::geometry::Circle>(0.5);