-
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
Changes from 36 commits
882919f
64baf02
4518d3c
a463312
d755f0e
bbcd0ca
59eef3e
6e3c69a
52d6784
7fb14fb
6006cfa
38ae86b
271cd1b
6be6d55
e58650d
b1c0218
66ce9dd
043ffac
1e9ef02
ce49e6a
c3a1be7
13c19a0
ef42c63
38cbdad
c0ccb59
5848f87
8843f44
e77d61b
e4f2912
8c16ec4
85707b0
8cda989
8765d80
7d2f03a
400282a
607beb2
afef64c
33dc617
0e1c2ae
67079c2
8baba9a
2cff1a6
2662e61
bca14cf
3d00c33
a69ec3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
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( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 |
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.
afef64c