-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add zmp generator and populate all outputs of the unycycle trajectory generator #916
Add zmp generator and populate all outputs of the unycycle trajectory generator #916
Conversation
03e1d0e
to
7f78303
Compare
At the code level, it looks good. What I am a bit afraid of is that from outside it is not clear that the different trajectories are not coherent with each other. At the unicycle planner level, you are calling to different generators, so somehow you can expect them to be separate. Here instead, the output is in a single data structure. Maybe it would be useful to have a trigger to turn on or off this output? |
You're right! It makes totally sense. With the commit ecbd51f I tried to make the I like the fact that There's the drawback. This change makes the blf Unicycle Trajectory Generator not backward compatible. But I think the number of users is still low. Let me know what you think. |
It should be fine by changing the version number. On the other hand, another alternative is to apply this change only for the data you added |
src/Planners/include/BipedalLocomotion/Planners/UnicycleTrajectoryPlanner.h
Outdated
Show resolved
Hide resolved
@GiulioRomualdi can we merge this PR? |
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.
Some minor changes
void convertToBLF(const iDynTree::Transform& input, manif::SE3d& output) | ||
{ | ||
output.asSO3() = iDynTree::toEigen(input.getRotation().asQuaternion()); | ||
output.translation(iDynTree::toEigen(input.getPosition())); | ||
output = BipedalLocomotion::Conversions::toManifPose(input); |
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.
Perhaps this can be be removed since there is already BipedalLocomotion::Conversions::toManifPose
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.
The reason why I added it is because I used it as a helper function in the following function templates:
bipedal-locomotion-framework/src/Planners/include/BipedalLocomotion/Planners/UnicycleUtilities.h
Lines 111 to 124 in c2bae6f
template <typename From, typename To> | |
void convertVector(const std::vector<From>& inputVect, std::vector<To>& outputVect) | |
{ | |
outputVect.resize(inputVect.size()); | |
for (size_t i = 0; i < inputVect.size(); ++i) | |
{ | |
convertToBLF(inputVect[i], outputVect[i]); | |
} | |
} | |
} // namespace Conversions | |
} // namespace BipedalLocomotion::Planners::UnicycleUtilities |
If I remove void convertToBLF(const iDynTree::Transform& input, manif::SE3d& output)
, I think I should modify the template function as:
- perform a check on
<From>
type. - if it is
iDynTree::Transform&
then callBipedalLocomotion::Conversions::toManifPose
instead ofvoid convertToBLF(const iDynTree::Transform& input, manif::SE3d& output)
.
Do you have other better alternatives?
Is it worth the change?
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.
You convinced me!
Co-authored-by: Giulio Romualdi <[email protected]>
Some of the outputs of the
UnicycleTrajectoryGenerator
were not being populated.This PR fixes it.
Moreover, the
ZMP generator
(and its outputs) is added to theUnicycleTrajectoryGenerator