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

EasyFullControl #235

Merged
merged 46 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
882919f
Initial draft
xiyuoh Mar 25, 2022
64baf02
Added Configuration and make()
xiyuoh Apr 21, 2022
4518d3c
Merge branch 'open-rmf:main' into feature/easyfullcontrol
xiyuoh Aug 23, 2022
a463312
Merge branch 'main' into feature/easyfullcontrol
xiyuoh Aug 26, 2022
d755f0e
WIP draft added partial implementation
xiyuoh Aug 26, 2022
bbcd0ca
Minor cleanup
xiyuoh Aug 26, 2022
59eef3e
Update
xiyuoh Sep 1, 2022
6e3c69a
Working draft without dock
xiyuoh Sep 2, 2022
52d6784
Add docking
xiyuoh Sep 12, 2022
7fb14fb
Merge branch 'main' into feature/easy_full_control
xiyuoh Sep 13, 2022
6006cfa
Fix docking problems
xiyuoh Sep 13, 2022
38ae86b
Add ActionExecutor
xiyuoh Sep 13, 2022
271cd1b
Uncrustify
xiyuoh Sep 13, 2022
6be6d55
Cleanup
xiyuoh Sep 13, 2022
e58650d
Merge branch 'main' into feature/easy_full_control
xiyuoh Sep 19, 2022
b1c0218
Remove easy_main
xiyuoh Sep 19, 2022
66ce9dd
Add python bindings
xiyuoh Sep 19, 2022
043ffac
Add rmf to robot transformer
xiyuoh Sep 20, 2022
1e9ef02
Apply async behavior fixes
xiyuoh Sep 20, 2022
ce49e6a
Add replanning
xiyuoh Sep 20, 2022
c3a1be7
Update parse_waypoints
xiyuoh Sep 20, 2022
13c19a0
Merge branch 'main' into feature/easy_full_control
xiyuoh Sep 20, 2022
ef42c63
Merge branch 'main' into feature/easy_full_control
Yadunund Oct 7, 2022
38cbdad
Refinements to EasyFullControl (#244)
Yadunund Nov 4, 2022
c0ccb59
Iterate on API (#247)
xiyuoh Dec 9, 2022
5848f87
Merge branch 'main' into feature/easy_full_control
xiyuoh May 16, 2023
8843f44
Invert navigation and docking request callback relationship
xiyuoh May 18, 2023
e77d61b
Uncrustify
xiyuoh May 18, 2023
e4f2912
Merge branch 'main' into feature/easy_full_control
xiyuoh May 18, 2023
8c16ec4
Merge branch 'main' into feature/easy_full_control
Yadunund May 29, 2023
85707b0
Pass worker to data
Yadunund May 30, 2023
8cda989
Add Transformation header file
xiyuoh May 30, 2023
8765d80
Update ActionExecution methods and minor fixes
xiyuoh May 30, 2023
7d2f03a
Fix pybind and move transform to Transformation class
xiyuoh May 30, 2023
400282a
Uncrustify
xiyuoh May 30, 2023
607beb2
Missed out removing update_request from header
xiyuoh May 30, 2023
afef64c
Update replan and override schedule
xiyuoh May 31, 2023
33dc617
Move transform out of Transformation
xiyuoh May 31, 2023
0e1c2ae
Merge branch 'main' into feature/easy_full_control
xiyuoh Jun 15, 2023
67079c2
Reactive easy full control (#286)
mxgrey Aug 14, 2023
8baba9a
Merge branch 'main' into feature/easy_full_control
mxgrey Aug 14, 2023
2cff1a6
Fix max merge lane distance import
xiyuoh Aug 17, 2023
2662e61
Turn off rmf_rxcpp tests that are producing spurious CI failures due …
mxgrey Aug 17, 2023
bca14cf
Merge branch 'main' into feature/easy_full_control
mxgrey Aug 17, 2023
3d00c33
Disambiguate type aliasing
mxgrey Aug 18, 2023
a69ec3d
Merge branch 'feature/easy_full_control' of ssh://github.com/open-rmf…
mxgrey Aug 18, 2023
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
416 changes: 416 additions & 0 deletions rmf_fleet_adapter/include/rmf_fleet_adapter/agv/EasyFullControl.hpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ class FleetUpdateHandle : public std::enable_shared_from_this<FleetUpdateHandle>
using FleetUpdateHandlePtr = std::shared_ptr<FleetUpdateHandle>;
using ConstFleetUpdateHandlePtr = std::shared_ptr<const FleetUpdateHandle>;

FleetUpdateHandle::ConsiderRequest consider_all();

} // namespace agv
} // namespace rmf_fleet_adapter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ class RobotUpdateHandle
class ActionExecution
{
public:
/// Update the amount of time remaining for this action
/// Update the amount of time remaining for this action.
/// This does not need to be used for navigation requests.
void update_remaining_time(rmf_traffic::Duration remaining_time_estimate);

/// Set task status to underway and optionally log a message (info tier)
Expand All @@ -147,7 +148,20 @@ class RobotUpdateHandle
/// (warning tier)
void blocked(std::optional<std::string> text);

/// Trigger this when the action is successfully finished
/// Trigger this when you require a replan for your navigation or
/// docking request
void replan(bool request_replan);
Copy link
Member

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();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/// Override the schedule to say that the robot will be following a certain
/// 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);

/// Trigger this when the action is successfully finished.
/// No other functions in this ActionExecution instance will
/// be usable after this.
void finished();

/// Returns false if the Action has been killed or cancelled
Expand Down
73 changes: 73 additions & 0 deletions rmf_fleet_adapter/include/rmf_fleet_adapter/agv/Transformation.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright (C) 2023 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_FLEET_ADAPTER__AGV__TRANSFORMATION_HPP
#define RMF_FLEET_ADAPTER__AGV__TRANSFORMATION_HPP

#include <rmf_utils/impl_ptr.hpp>

#include <Eigen/Geometry>

namespace rmf_fleet_adapter {
namespace agv {

//==============================================================================
/// A Transformation object that stores the transformation data needed to
/// perform transformation between robot and RMF cartesian frames.
class Transformation
{
public:

/// Constructor
///
/// \param[in] rotation
/// The rotation angle (radians) between the two cartesian frames.
///
/// \param[in] scale
/// The scaling factor between the cartesian frames.
///
/// \param[in] translation
/// The 2D translation from one coordinate to another.
Transformation(
double rotation,
double scale,
Eigen::Vector2d translation);

/// Get the rotation of this Transformation
const double rotation() const;

/// Get the scale of this Transformation
const double scale() const;

/// Get the translation of this Transformation
const Eigen::Vector2d& translation() const;

/// 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(
Copy link
Member

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const Eigen::Vector3d& pose);

class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};

} // namespace agv
} // namespace rmf_fleet_adapter

#endif // RMF_FLEET_ADAPTER__AGV__TRANSFORMATION_HPP
Loading