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

Fix build with Apple Clang #98

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions rmf_traffic/include/rmf_traffic/schedule/Database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Database : public ItineraryViewer, public Writer, public Snappable

// Documentation inherited from Viewer
std::shared_ptr<const ParticipantDescription> get_participant(
std::size_t participant_id) const final;
ParticipantId participant_id) const final;

// Documentation inherited from Viewer
Version latest_version() const;
Expand All @@ -125,11 +125,11 @@ class Database : public ItineraryViewer, public Writer, public Snappable

// Documentation inherited from ItineraryViewer
std::optional<ItineraryView> get_itinerary(
std::size_t participant_id) const final;
ParticipantId participant_id) const final;

// Documentation inherited from ItineraryViewer
std::optional<PlanId> get_current_plan_id(
std::size_t participant_id) const final;
ParticipantId participant_id) const final;

// Documentation inherited from ItineraryViewer
const std::vector<CheckpointId>* get_current_progress(
Expand Down
4 changes: 2 additions & 2 deletions rmf_traffic/include/rmf_traffic/schedule/Mirror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ class Mirror : public ItineraryViewer, public Snappable

// Documentation inherited from Viewer
std::shared_ptr<const ParticipantDescription> get_participant(
std::size_t participant_id) const final;
ParticipantId participant_id) const final;

// Documentation inherited from Viewer
std::optional<ItineraryView> get_itinerary(
std::size_t participant_id) const final;
ParticipantId participant_id) const final;

// Documentation inherited from Viewer
std::optional<Version> latest_version() const;
Expand Down
6 changes: 3 additions & 3 deletions rmf_traffic/src/rmf_traffic/schedule/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ const std::unordered_set<ParticipantId>& Database::participant_ids() const

//==============================================================================
std::shared_ptr<const ParticipantDescription> 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())
Expand All @@ -1320,7 +1320,7 @@ Version Database::latest_version() const

//==============================================================================
std::optional<ItineraryView> 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())
Expand All @@ -1345,7 +1345,7 @@ std::optional<ItineraryView> Database::get_itinerary(

//==============================================================================
std::optional<PlanId> 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())
Expand Down
6 changes: 3 additions & 3 deletions rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const std::unordered_set<ParticipantId>& Mirror::participant_ids() const

//==============================================================================
std::shared_ptr<const ParticipantDescription> 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())
Expand All @@ -272,7 +272,7 @@ std::optional<Version> Mirror::latest_version() const

//==============================================================================
std::optional<ItineraryView> 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())
Expand All @@ -297,7 +297,7 @@ std::optional<ItineraryView> Mirror::get_itinerary(

//==============================================================================
std::optional<PlanId> 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())
Expand Down
24 changes: 12 additions & 12 deletions rmf_traffic/test/unit/schedule/test_Spacetime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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);
Expand Down