-
Notifications
You must be signed in to change notification settings - Fork 14
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
Create a generator-enabled trajectory #168
Comments
By the way, still not sure if a new class, or reusing an old class and setting duration to a reserved negative number, etc. |
Following a straight line (at constant speed) is implemented in
And this one should be achieved with plain
Idea: don't over-complicate BasicCartesianControl and prefer external trajectory generators. I would wrap my generator routine in a |
When I opened this issue, it was an idea inspired by the generator pattern I saw in Python, as I believed there could be some easy and portable similar mechanism in C++. It turns out that SO points out some (imho) pretty convoluted implementations (ref). Maybe some day C++ will support Python-style generators with a proper TLDR: How about closing this issue as a |
I agree that iterators are (and have always been) the C++-ish way to go, at least for now. I am not sure though about the scope of this issue. Where and how is this hypothetical generator supposed to fit? I'm not convinced to have it embedded in BasicCartesianControl since it would probably require another rework on the ICartesianControl interface. As I see it, such more advanced trajectory generation techniques are better placed outside the controller (separation of concerns), be it C++ or Python code. In that case, you can trick KDL motion API into generating endless trajectories: #134 (comment). More complex stuff involves resorting to In other words, I think you can already have "generation-enabled" trajectories today.
Since you agree, I'm proceeding to do so. Please feel free to re-open and/or provide further details on your proposal. PS see exampleScrewTheoryTrajectory regarding the implementation of a basic |
Create a generator-enabled trajectory.
I've become very fond of the generator design pattern, and I think it makes sense in at least 2 scenarios we are going to find:
Extra points if the generator is wrapped and can be programmed outside of C++, aka Python!
PS: This idea is in line with #135, oriented at designing and running more complex trajectories, so blocked by #134 as well.
The text was updated successfully, but these errors were encountered: