This repository was archived by the owner on Jul 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Develop/dispatcher demo #217
Merged
Merged
Changes from 135 commits
Commits
Show all changes
146 commits
Select commit
Hold shift + click to select a range
82549c8
Initial commit
Yadunund b221cc1
Added unit tests for PowerSystem
Yadunund f434cb0
Completed implementation of SystemTraits
Yadunund 9328547
Fixed test
Yadunund 34e4c08
Refactored MechanicalSystem
Yadunund bbd6e33
Added EstimateBattery
Yadunund ec6ec27
Moved soc implementation to SimpleBatteryEstimator
Yadunund ca5ddd9
Debugging soc
Yadunund ea82351
Debuggin messages
Yadunund e54d6b3
More debugging
Yadunund b8dfe02
Initial signs of working discharge model
Yadunund d601928
Added more tests
Yadunund acfbdb1
Fixed tests
Yadunund f38c52d
Removed message printouts
Yadunund be47d46
Replaced KE with energy for acceleration
Yadunund 73a832e
Added documentation and linted
Yadunund 257ff63
Added CleaningTaskPlanner
Yadunund 6a0a84f
Added CleaningTaskPlanner.cpp and corrected unit test
Yadunund d7fd00b
Added CleaningTaskPlanner
Yadunund 05ab68d
Added virtual destructor
Yadunund 0f1a1bf
Debugging
Yadunund 8f51274
Fixed test for CleaningTaskPlanner
Yadunund 7d6f9de
More tests
Yadunund 771ef0d
Restructured CMakeLists and fixed warnings
Yadunund de34ba6
Refactored
Yadunund a8d214b
Merge branch 'master' into feature/battery_planning
Yadunund 4616684
Setting up rmf_tasks package
aaronchongth 81c5c8e
Basic setup
aaronchongth 934d0bf
AGV state defined and implemented
aaronchongth d71b508
Request abstract API and derived API for delivery
aaronchongth 1446974
Delivery request estimation implemented
aaronchongth ccb1721
ChargeBattery request implemented
aaronchongth c2a4ee2
Using finish_duration instead of finish_time
aaronchongth 12ee027
Switching back to using Time instead of Duration for finish_time
aaronchongth 3fd6724
Migration to using this library is done
aaronchongth e80a7c5
Increased sim_step to 0.5
Yadunund 1aa471f
Cleaned up unused source files and cmake commands
aaronchongth 78217ce
Merge branch 'feature/battery_planning' into feature/rmf_tasks
aaronchongth f171713
Initial commit
Yadunund 8bd1550
Started implementation
Yadunund c392c1c
Completed migration and added toy ptoblem as unit test
Yadunund 5f4aab8
Moved threshold_soc into StateConfig class
Yadunund 510525b
Fixed UB in pop_unassigned
Yadunund 8ff32e8
Fixed UB in Candidates::make()
Yadunund 24a03a8
Updated expand_candidate and implemented correct_assingments() to add…
Yadunund 5a81c8f
Fixed UB in greedy_solve()
Yadunund cf7562e
estimate_finish() of Delivery checks if robot can return to its charg…
Yadunund 1d01e35
Added Clean request
Yadunund 9f17b57
Cleanup
Yadunund 33e8a84
Using rmf_traffic::agv::Plan::Start for holding waypoint and time inf…
aaronchongth 1145a08
Removed unused efficiency from PowerSystem and added estimate_voltage…
Yadunund ad9bb28
Merge branch 'feature/battery_planning' into feature/task_planner
Yadunund 268d165
Switched to new BatterySystem API
Yadunund 04707f3
Renamed rmf_tasks to rmf_task
Yadunund c19713f
Merge branch 'master' into develop/dispatcher_demo
Yadunund 4206f58
Update schedule with docking itinerary (#190)
Yadunund dff6785
Replaced task_id with request in Assignment
Yadunund d9e378e
Renamed earliest_start_time to deployment_time in assignment. Modifie…
Yadunund b1f4dff
TaskPlanner::Configuration no longer takes in a charging request. The…
Yadunund 9006a4b
update msgs for dispatcher (#193)
youliangtan 6da2d9f
Fixed dynamic cast
Yadunund 2efbf3f
Merge branch 'master' into feature/task_planner
Yadunund 5fefd29
Merge branch 'feature/task_planner' into develop/dispatcher_demo
Yadunund a4c2182
Using magnitude of w and alpha in compute_change_in_charge()
Yadunund f156b4d
Merge branch 'master' into feature/battery_planning
Yadunund cacaf1c
Merge branch 'feature/battery_planning' into feature/task_planner
Yadunund 9cb4a31
Fix lifetime of variant_duration variable (#197)
mrushyendra fb937cb
Added new Clean task, changed TaskProfile and SubmitTask to use expli…
aaronchongth d6186c3
add eval enum to submit task srv (#201)
youliangtan 69c9b1d
Develop/task planner integration (#199)
Yadunund 5e4a6bb
ChargeBattery task creates WaitForCharge phase with 0.99 max threshol…
Yadunund febea6d
Added equality constraint in PowerSystem::valid()
Yadunund 90068db
Merge branch 'feature/battery_planning' into feature/task_planner
Yadunund 15cbc5b
Add unit test to detect implicit charging task at the start of Assign…
mrushyendra 4a9ada7
Deal with implicit charging before first assignment (#209)
Yadunund 033de08
Fixed test after merging fix for implicit charging request at start
Yadunund 005e88b
Reduce heuristic overestimation and ignore charging task costs in Tas…
mrushyendra 54e1c32
Loop and Delivery integration with dispatcher framework (#211)
Yadunund 4e833c4
Merge branch 'feature/task_planner' into develop/dispatcher_demo
Yadunund 7ae6fd7
Updated tests after merging in heuristic changes for task planner
Yadunund cb122b7
Change id field of Request to string and modify TaskPlanner to use in…
mrushyendra 9ccca61
Fixed merge conflicts
Yadunund d578407
Updated FleetUpdateHandle and Tasks to use string request id
Yadunund 92d3202
Cache estimated values to speed up TaskPlanner (#212)
mrushyendra 15fdae9
few liners to populate start and estimated finish time (#216)
youliangtan bb363a4
Cleaned up commented code
Yadunund e5513b1
Merge branch 'develop/dispatcher_demo' of github.com:osrf/rmf_core in…
Yadunund af7c3ab
Made ChargeBattery ids unique
Yadunund 22c649e
add fleetname to task summary
youliangtan c516bcd
Debug/task planner candidates (#218)
Yadunund 0f4849e
Updated API documentation in FleetUpdateHandle
Yadunund fc08b9e
TaskPlanner returns an std::variant (#221)
Yadunund 993fa5d
Automatic retreat for battery recharging (#222)
Yadunund 09d795e
Take into account battery drain while idling in TaskPlanner estimates…
mrushyendra a34c251
Resolved merge conflict in Adapter.cpp
Yadunund 081306d
Removed commented code from Adapter.cpp
Yadunund bbd626e
Powersystem does not require string name
Yadunund d416f83
Added documentation for MechanicalSystem
Yadunund eb4ac73
Removed BatteryProfile. Switched to make() pattern in rmf_battery
Yadunund 1b9af99
Addressed suggestions for rmf_battery
Yadunund 91d6624
Added account_for_batery_drain()
Yadunund 0688fa5
Added unstable API extension to RobotUpdateHandle
Yadunund be64e8c
Log error message when battery percentage in RobotState is out of range
Yadunund e78dd79
Removed TODO in Task and iostream header
Yadunund b8d61d6
Renamed state() to current_task_end_state() in Robotcontext
Yadunund ece42e9
TaskManager queue.clear() is protected by mutex
Yadunund 81ee72b
Protected read instances of queue with mutex
Yadunund d0fcd46
Added warning when robot has insufficient charge to automatically ret…
Yadunund d907d54
Removed clear_queue() and moved begin_next_task into private
Yadunund 12e5b75
Added TODO to redesign TaskManager
Yadunund f73f689
Bumped printouts for missing fields to ERROR and other corrections to…
Yadunund caf6c69
Resolved merge conflict after adding Tow msg
Yadunund b0402b3
retreat_to_charger() estimates battery drain over all trajectories in…
Yadunund 3e616c9
Battery drain is computed over all trajectories in a generated plan
Yadunund 3f20bb9
Iterate over all trajectories in plan when computing invariant batter…
Yadunund 6b661b0
Rename inertia to moment_of_inertia
Yadunund ce7c2ab
Added const type specifier and comments for test expectations in rmf_…
Yadunund 51031ae
Use RCLCPP_DEBUG for printing assignments and fix const correctness o…
Yadunund 3beae98
Added TODO to fix request_delivery and request_loop functions in Mock…
Yadunund 17ea62b
Update rmf_fleet_adapter/src/rmf_fleet_adapter/agv/FleetUpdateHandle.cpp
Yadunund 1bab060
Update rmf_fleet_adapter/src/rmf_fleet_adapter/agv/FleetUpdateHandle.cpp
Yadunund aaccae9
Update rmf_fleet_adapter/src/rmf_fleet_adapter/agv/FleetUpdateHandle.cpp
Yadunund 697775d
Update rmf_task/include/rmf_task/agv/TaskPlanner.hpp
Yadunund 96bab55
Update rmf_task_msgs/srv/GetTask.srv
Yadunund 13e6125
Update rmf_task_msgs/srv/CancelTask.srv
Yadunund db40f2a
Fixed CMakeLists.txt and header guards for rmf_task
Yadunund 4d28934
Added setters for other parameters in TaskPlanner Configuration
Yadunund 2ca073b
Removed FilterType from public API. Planner uses Hash type always.
Yadunund 49fdf44
Updated note on friction_coefficient
Yadunund d3880be
Added documentation for requests and fixed comments
Yadunund 91c9c30
Renamed GetTask to GetTaskList
Yadunund 0f57a10
Renamed GetTask to GetTaskList
Yadunund 1488362
Added set_charger_waypoint() to RobotUpdateHandle
Yadunund 940b66f
Hashing in EstimateCache uses sum not xor
Yadunund 8f2f048
Resolved merge conflict with master
Yadunund 050be4f
Renamed StateConfig to Constraints
Yadunund 29f4a28
Reworked PairHash
Yadunund f7e5d4b
Corrected shift in PairHash
Yadunund 5889f1d
Return task_planning_constraints by const ref
Yadunund 228db52
Updated Changelogs
Yadunund 2b73ed4
Feature/task dispatcher (#228)
youliangtan bcba5e7
loop delivery tests for dispatcher (#236)
youliangtan 895e6eb
Merged planner performance
Yadunund 68309b1
Merge branch 'develop/dispatcher_demo' of github.com:osrf/rmf_core in…
Yadunund 89a68c0
Implementation of EstimateCache uses std::mutex object and not shared…
Yadunund dac010c
add changelog and clean printout logs
youliangtan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| cmake_minimum_required(VERSION 3.5) | ||
| project(rmf_battery) | ||
|
|
||
| # Default to C++17 | ||
| if(NOT CMAKE_CXX_STANDARD) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| endif() | ||
|
|
||
| if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| add_compile_options(-Wall -Wextra -Wpedantic) | ||
| endif() | ||
|
|
||
| if(NOT CMAKE_BUILD_TYPE) | ||
| # Use the Release build type by default if the user has not specified one | ||
| set(CMAKE_BUILD_TYPE Release) | ||
| endif() | ||
|
|
||
| # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") | ||
| # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") | ||
|
|
||
| include(GNUInstallDirs) | ||
|
|
||
| # find dependencies | ||
| find_package(ament_cmake REQUIRED) | ||
| find_package(rmf_utils REQUIRED) | ||
| find_package(rmf_traffic REQUIRED) | ||
| find_package(Eigen3 REQUIRED) | ||
|
|
||
| # ===== Battery modelling library | ||
| file(GLOB_RECURSE core_lib_srcs "src/rmf_battery/*.cpp") | ||
| add_library(rmf_battery SHARED | ||
| ${core_lib_srcs} | ||
| ) | ||
|
|
||
| target_link_libraries(rmf_battery | ||
| PUBLIC | ||
| rmf_utils::rmf_utils | ||
| rmf_traffic::rmf_traffic | ||
| ) | ||
|
|
||
| target_include_directories(rmf_battery | ||
| PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
| ${EIGEN3_INCLUDE_DIRS} | ||
| ) | ||
|
|
||
| ament_export_targets(rmf_battery HAS_LIBRARY_TARGET) | ||
| ament_export_dependencies(rmf_utils) | ||
|
|
||
| if(BUILD_TESTING) | ||
| find_package(ament_cmake_catch2 REQUIRED) | ||
|
|
||
| file(GLOB_RECURSE unit_test_srcs "test/*.cpp") | ||
|
|
||
| ament_add_catch2( | ||
| test_rmf_battery test/main.cpp ${unit_test_srcs} | ||
| TIMEOUT 300) | ||
| target_link_libraries(test_rmf_battery | ||
| rmf_battery | ||
| ) | ||
|
|
||
| target_include_directories(test_rmf_battery | ||
| PRIVATE | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/> | ||
| ) | ||
|
|
||
| find_package(rmf_cmake_uncrustify REQUIRED) | ||
| find_file(uncrustify_config_file NAMES "share/format/rmf_code_style.cfg") | ||
|
|
||
| rmf_uncrustify( | ||
| ARGN include src test | ||
| CONFIG_FILE ${uncrustify_config_file} | ||
| MAX_LINE_LENGTH 80 | ||
| ) | ||
| endif() | ||
|
|
||
| install( | ||
| DIRECTORY include/ | ||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
| ) | ||
|
|
||
| install( | ||
| TARGETS rmf_battery | ||
| EXPORT rmf_battery | ||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
| ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
| ) | ||
|
|
||
| ament_package() |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /* | ||
| * Copyright (C) 2020 Open Source Robotics Foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| #ifndef RMF_BATTERY__DEVICEPOWERSINK_HPP | ||
| #define RMF_BATTERY__DEVICEPOWERSINK_HPP | ||
|
|
||
| namespace rmf_battery { | ||
|
|
||
|
|
||
| //============================================================================== | ||
| class DevicePowerSink | ||
| { | ||
| public: | ||
|
|
||
| /// Compute change in state-of-charge of the battery due to an onboard | ||
| /// device over a time period. | ||
| /// | ||
| /// \param[in] run_time | ||
| /// The duration in seconds over which the power system drains charge from | ||
| /// the battery | ||
| /// | ||
| /// \return The charge depleted as a fraction of the total battery capacity | ||
| virtual double compute_change_in_charge( | ||
| const double run_time) const = 0; | ||
|
|
||
| virtual ~DevicePowerSink() = default; | ||
| }; | ||
|
|
||
| } // namespace rmf_battery | ||
|
|
||
| #endif // RMF_BATTERY__DEVICEPOWERSINK_HPP |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| /* | ||
| * Copyright (C) 2020 Open Source Robotics Foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| #ifndef RMF_BATTERY__MOTIONPOWERSINK_HPP | ||
| #define RMF_BATTERY__MOTIONPOWERSINK_HPP | ||
|
|
||
| #include <rmf_traffic/Trajectory.hpp> | ||
|
|
||
| namespace rmf_battery { | ||
|
|
||
|
|
||
| //============================================================================== | ||
| class MotionPowerSink | ||
| { | ||
| public: | ||
|
|
||
| /// Compute change in state-of-charge of the battery due to locomotion | ||
| /// of the robot along a trajectory. | ||
| /// | ||
| /// \param[in] trajectory | ||
| /// A valid rmf_traffic:::Trajectory over which the change in charge has to | ||
| /// to be computed | ||
| /// | ||
| /// \return The charge depleted as a fraction of the total battery capacity | ||
| virtual double compute_change_in_charge( | ||
| const rmf_traffic::Trajectory& trajectory) const = 0; | ||
|
|
||
| virtual ~MotionPowerSink() = default; | ||
| }; | ||
|
|
||
| } // namespace rmf_battery | ||
|
|
||
| #endif // RMF_BATTERY__MOTIONPOWERSINK_HPP |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
|
|
||
| /* | ||
| * Copyright (C) 2020 Open Source Robotics Foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| #ifndef RMF_BATTERY__AGV__BATTERYSYSTEM_HPP | ||
| #define RMF_BATTERY__AGV__BATTERYSYSTEM_HPP | ||
|
|
||
| #include <rmf_utils/impl_ptr.hpp> | ||
|
|
||
| #include <optional> | ||
|
|
||
| namespace rmf_battery { | ||
| namespace agv { | ||
|
|
||
| class BatterySystem | ||
| { | ||
| public: | ||
| /// Returns a BatterySystem object if valid values were supplied for the | ||
| /// various fields else returns std::nullopt. Here valid implies that the | ||
| /// values are greater than zero. | ||
| /// \param[in] nominal_voltage | ||
| /// The nominal voltage of the battery in Volts | ||
| /// | ||
| /// \param[in] capacity | ||
| /// The nominal capacity of the battery in Ampere-hours | ||
| /// | ||
| /// \param[in] charging_current | ||
| /// The rated current in Amperes for charging the battery | ||
| static std::optional<BatterySystem> make( | ||
| double nominal_voltage, | ||
| double capacity, | ||
| double charging_current); | ||
|
|
||
| /// Get the nominal voltage of this battery system | ||
| double nominal_voltage() const; | ||
|
|
||
| /// Get the capacity of this battery system | ||
| double capacity() const; | ||
|
|
||
| /// Get the charging current of this battery system | ||
| double charging_current() const; | ||
|
|
||
| class Implementation; | ||
| private: | ||
| BatterySystem(); | ||
| rmf_utils::impl_ptr<Implementation> _pimpl; | ||
| }; | ||
|
|
||
| using BatterySystemPtr = std::shared_ptr<BatterySystem>; | ||
| using ConstBatterySystemPtr = std::shared_ptr<const BatterySystem>; | ||
|
|
||
| } // namespace agv | ||
| } // namespace rmf_battery | ||
|
|
||
| #endif // RMF_BATTERY__AGV__BATTERYSYSTEM_HPP |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* | ||
| * Copyright (C) 2020 Open Source Robotics Foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| #ifndef RMF_BATTERY__AGV__MECHANICALSYSTEM_HPP | ||
| #define RMF_BATTERY__AGV__MECHANICALSYSTEM_HPP | ||
|
|
||
| #include <rmf_utils/impl_ptr.hpp> | ||
|
|
||
| #include <optional> | ||
|
|
||
| namespace rmf_battery { | ||
| namespace agv { | ||
|
|
||
| class MechanicalSystem | ||
| { | ||
| public: | ||
|
|
||
| /// Returns a MechanicalSystem object if valid values were supplied for the | ||
| /// various fields else returns std::nullopt. Here valid implies that the | ||
| /// values are greater than zero. | ||
| /// \param[in] mass | ||
| /// The mass of the robot in Kilograms(kg) | ||
| /// | ||
| /// \param[in] moment_of_inertia | ||
| /// The moment of inertia of the robot along its yaw axis in kg.m^2 | ||
| /// | ||
| /// \param[in] friction_coefficient | ||
| /// The coefficient of kinetic friction or rolling resistance coefficient | ||
| /// measured at the wheels of the robot. This value is used to compute the | ||
| /// energy loss due to rotation of the vehicle's wheels during locomotion. | ||
| /// This value is the dimensionless constant Crr as described in the | ||
| /// reference below. | ||
| /// Ref: https://en.wikipedia.org/wiki/Rolling_resistance#Rolling_resistance_coefficient | ||
| static std::optional<MechanicalSystem> make( | ||
| double mass, | ||
| double moment_of_inertia, | ||
| double friction_coefficient); | ||
|
|
||
| /// Get the mass of this mechanical system | ||
| double mass() const; | ||
|
|
||
| /// Get the moment of inertia of this mechanical system | ||
| double moment_of_inertia() const; | ||
|
|
||
| /// Get the friction coefficient of this mechanical system | ||
| double friction_coefficient() const; | ||
|
|
||
| class Implementation; | ||
| private: | ||
| MechanicalSystem(); | ||
| rmf_utils::impl_ptr<Implementation> _pimpl; | ||
| }; | ||
|
|
||
| using MechanicalSystemPtr = std::shared_ptr<MechanicalSystem>; | ||
| using ConstMechanicalSystemPtr = std::shared_ptr<const MechanicalSystem>; | ||
|
|
||
| } // namespace agv | ||
| } // namespace rmf_battery | ||
|
|
||
| #endif // RMF_BATTERY__AGV__MECHANICALSYSTEM_HPP | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /* | ||
| * Copyright (C) 2020 Open Source Robotics Foundation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| */ | ||
|
|
||
| #ifndef RMF_BATTERY__AGV__POWERSYSTEM_HPP | ||
| #define RMF_BATTERY__AGV__POWERSYSTEM_HPP | ||
|
|
||
| #include <rmf_utils/impl_ptr.hpp> | ||
|
|
||
| #include <optional> | ||
|
|
||
| namespace rmf_battery { | ||
| namespace agv { | ||
|
|
||
|
|
||
| class PowerSystem | ||
| { | ||
| public: | ||
|
|
||
| /// Returns a PowerSystem object if valid values were supplied for the | ||
| /// various fields else returns std::nullopt. Here valid implies that the | ||
| /// values are greater than zero. | ||
| /// \param[in] nominal_power | ||
| /// The rated nominal power consumption in Watts for this power system | ||
| static std::optional<PowerSystem> make(double nominal_power); | ||
|
|
||
| /// Get the nominal power of this power system | ||
| double nominal_power() const; | ||
|
|
||
| class Implementation; | ||
| private: | ||
| PowerSystem(); | ||
| rmf_utils::impl_ptr<Implementation> _pimpl; | ||
| }; | ||
|
|
||
| using PowerSystemPtr = std::shared_ptr<PowerSystem>; | ||
| using ConstPowerSystemPtr = std::shared_ptr<const PowerSystem>; | ||
|
|
||
| } // namespace agv | ||
| } // namespace rmf_battery | ||
|
|
||
| #endif // RMF_BATTERY__AGV__POWERSYSTEM_HPP |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.