-
Notifications
You must be signed in to change notification settings - Fork 58
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
EasyFullControl #235
EasyFullControl #235
Conversation
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
* Update API Signed-off-by: Yadunund <yadunund@openrobotics.org> * Changes to impl Signed-off-by: Yadunund <yadunund@gmail.com> * Implemented more functions Signed-off-by: Yadunund <yadunund@openrobotics.org> * More impl changes Signed-off-by: Yadunund <yadunund@gmail.com> * Delete the right file Signed-off-by: Yadunund <yadunund@gmail.com> * Fix build Signed-off-by: Yadunund <yadunund@gmail.com> * Style Signed-off-by: Yadunund <yadunund@gmail.com> * Bindings WIP Signed-off-by: Yadunund <yadunund@gmail.com> * Return correct values Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix dangling reference Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Update bindings for RobotState and Configuration Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Undo constructor arg Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix bug Signed-off-by: Yadunund <yadunund@openrobotics.org> * Fix bug Signed-off-by: Yadunund <yadunund@openrobotics.org> * Do not stop for new paths Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update charger only when state changes Signed-off-by: Yadunund <yadunund@openrobotics.org> * Make config optional Signed-off-by: Yadunund <yadunund@openrobotics.org> * Default value of remaining time Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update bindings to new API Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Spin adapter to declare nodes Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update bindings Signed-off-by: Yadunund <yadunund@openrobotics.org> * run -> wait Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Reliability fixes Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Decrease lane merge distance Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Further reduce lane distance Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Add documentation Signed-off-by: Yadunund <yadunund@gmail.com> * Correct typo (#245) Spotted during ROSCon open-rmf workshop. Signed-off-by: Yadunund <yadunund@openrobotics.org> Signed-off-by: Yadunund <yadunund@gmail.com> Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Andrew Ring <andrew@andrewring.dev>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org> Signed-off-by: Michael X. Grey <grey@openrobotics.org> Co-authored-by: Michael X. Grey <grey@openrobotics.org>
I think this promises to be a huge usability improvement over the existing full control API. There's really only one aspect of it that I think should be reworked.. although unfortunately it's a big one. I believe the update callbacks are sort of "inverted" from how they should be. As an example
This implies that when a navigation request is issued to the user side, we expect them to return a
to us, which we will then poll to figure out when the request has been completed. I see this as problematic for two reasons:
So I believe we need to invert this relationship, maybe like this:
Note that I changed a few things about the The user would be responsible for triggering the update functions in I think the same principles should be applied to I apologize that I didn't have time to make these changes myself before going on PTO, but I don't think I'd feel comfortable with moving this API out of experimental until these changes are made. |
/// trajectory. This should not be used while tasks with automatic schedule | ||
/// updating are running, or else the traffic schedule will have jumbled up | ||
/// information, which can be disruptive to the overall traffic management. | ||
void override_schedule(std::string map_name, rmf_traffic::Trajectory trajectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry had a error in my previous comment
void override_schedule(const std::string& map_name, const rmf_traffic::Trajectory& trajectory);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -152,6 +152,16 @@ class RobotUpdateHandle | |||
/// (warning tier) | |||
void blocked(std::optional<std::string> text); | |||
|
|||
/// Trigger this when you require a replan for your navigation or | |||
/// docking request | |||
void replan(bool request_replan); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to pass in a bool arg for this function. Users can simply call this function to request for a replan. It can return a bool depending on if the replanning succeeded/failed.
bool replan();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Helper function to transform between RMF and robot coordinate systems. | ||
/// Depending on the Transformation defined, this function can be used to | ||
/// transform robot coordinate system to RMF's coordinate system or vice versa. | ||
const Eigen::Vector3d transform( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this function outside this Transform class but in the same header/namespace and have it accept a transform object (Same as how it was in EasyFullControl.hpp).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Xi Yu Oh <xiyuoh@intrinsic.ai>
Signed-off-by: Xi Yu Oh <xiyuoh@intrinsic.ai>
Sorry for not making this part clear: I think we should get rid of
I'm going to experiment a bit with how to straighten out these details. Ideally I'd like us to have an API where the user (system integrator) never needs to touch a mutex, unlike the current situation where we've found that every function in the command handle of |
That's a lot better 👍🏼 |
Signed-off-by: Michael X. Grey <grey@openrobotics.org> Signed-off-by: Xiyu Oh <xiyu@openrobotics.org> Co-authored-by: Xiyu <xiyu@openrobotics.org>
rmf_fleet_adapter/include/rmf_fleet_adapter/agv/EasyFullControl.hpp
Outdated
Show resolved
Hide resolved
rmf_fleet_adapter/include/rmf_fleet_adapter/agv/RobotUpdateHandle.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Xiyu Oh <xiyu@openrobotics.org>
…to issues in the underlying middleware implementation Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
…/rmf_ros2 into feature/easy_full_control
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org> Signed-off-by: Yadunund <yadunund@openrobotics.org> Signed-off-by: Luca Della Vedova <luca@openrobotics.org> Signed-off-by: Michael X. Grey <grey@openrobotics.org> Signed-off-by: Xi Yu Oh <xiyuoh@intrinsic.ai> Co-authored-by: Yadunund <yadunund@openrobotics.org> Co-authored-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Michael X. Grey <grey@openrobotics.org>
This PR continues from #189 to implement an
EasyFullControl
API for users to create their own fleet adapters more easily.This PR can be tested with open-rmf/rmf_demos#158. You can run any full control demo world with
easy_fleet:=1
:Further to-do: