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

Final acceleration phase to allow target states outside of limits #72

Open
Fubini2 opened this issue Sep 17, 2021 · 7 comments
Open

Final acceleration phase to allow target states outside of limits #72

Fubini2 opened this issue Sep 17, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@Fubini2
Copy link

Fubini2 commented Sep 17, 2021

Dear Pantor,

another feature that would be useful in the environment of real-time control of laser scanners is the deliberate violation of the permissible range at the end. This is essentially a symmetric problem to the initial braking phase when the start conditions are outside the allowed range only that you want to accelerate out of it.

We are mainly testing your code as a time-optimal transistion trajectory with the laser off between two process sections where the laser processing takes place. Here it is common to assume that at the beginning of the programmed process trajectory you are already at laser process speed. It is sometimes the case that additional external kinematics, which are very slow compared to the laser, place the workpiece in the laser scanner image field. If the laser process states would be immediately commanded as the limit for the connection trajectory, the scanner runs away from the external feed kinematics and leaves the image field. In this respect, you actually want to run at the maximum speed of the external kinematics for a long time during the transistion motion and only accelerate the scanner to the process states at the end. I hope this is understandable.

Technically, this would be easiest to solve if one had an (optional) final acceleration phase in addition to the initial braking phase. Mathematically, this is a symmetrical problem to the initial braking phase and could actually be calculated in exactly the same way with subsequent time inversion.

Best wishes
Fubini

@Fubini2 Fubini2 changed the title Final accelearation phase Final acceleration phase Sep 17, 2021
@pantor pantor added the enhancement New feature or request label Sep 22, 2021
@pantor
Copy link
Owner

pantor commented Sep 22, 2021

Am I understanding correctly that this only applies (and will support) target states outside of the kinematic limits?

I haven't thought about that possibility yet, so thanks for your input! I think this could be a very good default setting so Ruckig would really support arbitrary target states.

@Fubini2
Copy link
Author

Fubini2 commented Sep 22, 2021

Hi @pantor,

exactly. We want to bring the target state outside of the kinematic limits.

I already started a prototypical implementation based on your brake phase of this feature inside my local copy of your repository. If interested I could provide it for you as a start off. Not thoroughly tested by now and I am sure I missed a few things in your code ...

Fubini

@pantor pantor changed the title Final acceleration phase Final acceleration phase to allow target states outside of limits Sep 22, 2021
@Fubini2
Copy link
Author

Fubini2 commented Sep 23, 2021

Dear @pantor,

you can find my current implementation for this feature in my fork of your repo:

https://github.com/Fubini2/ruckig/tree/accel_phase

Feel free to reuse or discard anything from it. Comments welcome!

Fubini

@ahoarau
Copy link
Contributor

ahoarau commented Sep 29, 2021

@pantor This is indeed a nice feature. Are you planning to integrate it upstream ?

@pantor
Copy link
Owner

pantor commented Sep 30, 2021

@ahoarau Nothing concrete planned yet, but in the following months, yes.

@ahoarau
Copy link
Contributor

ahoarau commented Sep 30, 2021

@Fubini2 maybe a PR then ?

@Fubini2
Copy link
Author

Fubini2 commented Sep 30, 2021

@ahoarau Whats a PR? Sorry I only started working with GitHub quite recently.

Also I have to admit my prototype here https://github.com/Fubini2/ruckig/tree/accel_phase is not complete and still has bugs. It was just a quick proof of concept.

For example I know there is still an issue with the check when to add an profile to the list of potentially optimal profiles at the end of

template<JerkSigns jerk_signs, Limits limits, bool set_limits = false>
bool check(double jf, double vMax, double vMin, double aMax, double aMin) {

As the comment of @pantor already states

    // Velocity limit can be broken in the beginning if both initial velocity and acceleration are too high

the check of the initial values is left out here because the initial brake phase algorithms does not always find a solution precisely on the kinematic limit. Of course the same is true for the start of the acceleration phase. What I am currently not sure about is whether leaving out the checks on the target state will not lead to unexpected behavior when adding profiles violating the kinematic constraints unconditionally to the set of possible time optimal profiles.

Fubini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants