-
Notifications
You must be signed in to change notification settings - Fork 30
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
Adds SE2BoxConstraint #135
Merged
Merged
Changes from 24 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
dc493c5
Adds SE2 constraint
gilwoolee ca0a0c0
Merge branch 'master' into SE2constraint
gilwoolee fe1c182
Merge branch 'master' into SE2constraint
jslee02 ce374d6
Merge branch 'master' into SE2constraint
jslee02 801326c
Fix build errors and warnings
jslee02 337e715
Merge remote-tracking branch 'origin/master' into SE2constraint
jslee02 757352e
Fix minor styles issues
jslee02 3481930
More style update
jslee02 c573de5
Use slightly better Eigen operators accordingly
jslee02 4486492
Merge branch 'master' into SE2constraint
jslee02 cf3d06d
Fix typo
jslee02 1454a93
Fix conversion between SE(2) and 3-dim vector
jslee02 85878fa
Address Brian's comments
jslee02 9b37286
add se2BoxConstraint header
1252d83
nit: formatting
f34a1a1
nit
3ee9d34
add documentation to the member variables
ea56ec0
make conditions more intuitive(?)
fafa1d7
weighted distance for SE(2) group
96771e3
nit and syntax error fix
9c932f7
enforce weight vector to be of dimension 2 via type
bb4e0af
remove unused variable - warnings
61daeb9
create test scripts for SE2 constraint and distance files
e296d6b
remove ambiguity -> removes build errors
0c74175
introduce tests for SE2Weighted Distance
00cbd78
tests for SE2 Distance
22376f6
tests for SE2BoxConstraint
3b2c7c8
add more tests for SE2BoxConstraint
4e6e26d
Merge branch 'master' into SE2constraint
jslee02 3257249
Fix code format
jslee02 86b03a3
Fix style
jslee02 a094477
Fix SE2Weighted::distance to return always positive distance
jslee02 2f3b2cb
Try to use DART 6.1
jslee02 d525eb8
Try to use DART 6.1 (reverted from commit 2f3b2cb4eefaa6df49274006bcb…
jslee02 efc96e3
simplified logic statements; fixed threshold
99204b9
remove weighted.cpp
c44447e
introduce cartesianproduct files and make changes in affected files
69f7802
Edit affected test files
156baef
warn that weighted is deprecated
ee789b1
alias
920d75f
include namespace for weighted
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 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
This file contains 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
This file contains 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
This file contains 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,78 @@ | ||
#ifndef AIKIDO_STATESPACE_SE2BOXCONSTRAINT_HPP_ | ||
#define AIKIDO_STATESPACE_SE2BOXCONSTRAINT_HPP_ | ||
|
||
#include "../../statespace/SE2.hpp" | ||
#include "../Differentiable.hpp" | ||
#include "../Projectable.hpp" | ||
#include "../Sampleable.hpp" | ||
#include "../Testable.hpp" | ||
|
||
namespace aikido { | ||
namespace constraint { | ||
|
||
/// A BoxConstraint on SE2. | ||
/// This class does *not* allow constraint on rotation. | ||
/// For each dimension x and y, this constraint has lowerLimit and upperLimit. | ||
class SE2BoxConstraint | ||
: public constraint::Projectable | ||
, public constraint::Sampleable | ||
, public constraint::Testable | ||
{ | ||
public: | ||
using constraint::Projectable::project; | ||
|
||
/// Constructor. | ||
/// \param _space Space in which this constraint operates. | ||
/// \param _rng Random number generator to be used for sampling. | ||
/// \param _lowerLimits Lower limits on the state, only on x and y. | ||
/// \param _upperLimits Upper limits on the state, only on x and y. | ||
SE2BoxConstraint( | ||
std::shared_ptr<statespace::SE2> _space, | ||
std::unique_ptr<util::RNG> _rng, | ||
const Eigen::Vector2d& _lowerLimits, | ||
const Eigen::Vector2d& _upperLimits); | ||
|
||
// Documentation inherited. | ||
statespace::StateSpacePtr getStateSpace() const override; | ||
|
||
// Documentation inherited. | ||
bool isSatisfied(const statespace::StateSpace::State* state) const override; | ||
|
||
// Documentation inherited. | ||
bool project( | ||
const statespace::StateSpace::State* _s, | ||
statespace::StateSpace::State* _out) const override; | ||
|
||
// Documentation inherited. | ||
std::unique_ptr<constraint::SampleGenerator> | ||
createSampleGenerator() const override; | ||
|
||
/// Returns lower limits of this constraint. | ||
Eigen::Vector2d getLowerLimits() const; | ||
|
||
/// Returns upper limits of this constraint. | ||
Eigen::Vector2d getUpperLimits() const; | ||
|
||
private: | ||
std::shared_ptr<statespace::SE2> mSpace; | ||
std::unique_ptr<util::RNG> mRng; | ||
|
||
/// Lower limits on the state. The first element encodes the rotational limit | ||
/// and the last two elements encode the translational limits. | ||
Eigen::Vector3d mLowerLimits; | ||
|
||
/// Upper limits on the state. The first element encodes the rotational limit | ||
/// and the last two elements encode the translational limits. | ||
Eigen::Vector3d mUpperLimits; | ||
|
||
// DOFs of joint that have limits, in this case translational DOFs. | ||
// TODO: Confirm this with Gilwoo | ||
size_t mRnDimension; | ||
// DOF of the joint | ||
size_t mDimension; | ||
}; | ||
|
||
} // namespace constraint | ||
} // namespace aikido | ||
|
||
#endif // AIKIDO_STATESPACE_SE2BOXCONSTRAINT_HPP_ |
This file contains 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
This file contains 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
This file contains 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
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.
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.
@gilwoolee : is the docstring for this variable right?