Skip to content

Releases: grotius-cnc/s-curve-motion-planning

motion block

22 Dec 13:24
752e2f9
Compare
Choose a tag to compare

Shared c-c++ library

21 Dec 11:04
92f6935
Compare
Choose a tag to compare

example

21 Dec 09:40
ccb34c6
Compare
Choose a tag to compare

In this example there is only one function to create a acceleration or deceleration s-curve.
Also a lineair velocity stage example is included.

This example can now be used as bases to build motion blocks.

scurve_acc_dcc

example

21 Dec 08:16
ccb34c6
Compare
Choose a tag to compare

This is a tiny code example of a

  • Acceleration scurve
  • Deceleration scurve

Specs:

  • Curves can use acceleration begin & acceleration end values.
  • It shows 2 identical functions, where in the dcc curve function ***** signs are applied to show where and how the scurve mirroring is done.

Picture showing acc s-curve and dcc s-curve.
scurve_example

Advanched S-curve Motion Planner

21 Jun 14:13
1f40d48
Compare
Choose a tag to compare
  1. Qt project written in c++ containing a s-curve implementation.
  2. Linuxcnc hal component including a header only s-curve library, a translated c++ project into c kernel style.
simplescreenrecorder-2021-06-21_10.23.16.mp4

fresh code

19 Jun 21:00
1f40d48
Compare
Choose a tag to compare

new fresh code

Added more options.

screen4

Fresh qt coded s-curve with no "kink" in displacement curve

18 Jun 20:57
1f40d48
Compare
Choose a tag to compare

screen
Fresh qt coded s-curve.

Uses the opencascade library.
If you have problems installing qt or opencascade, take a look here : https://sourceforge.net/projects/linux-11-pro/
It will install qt and opencascade for you.

Advanched S-curve Motion Planner

22 Apr 11:22
5e5b785
Compare
Choose a tag to compare

Qt project to compute a s-curve. This code took quite a while to set up.
So far it's more advanched then my previous attempts.

Curve = Concave (upwards curve) + Convex (downwards curve)
Grey = Travelled in time
Black = Acceleration

If the "vel" (velocity) can not be reached by the users motion input values, the "vel" is sampled until max "vel" value fit's the path lenght.
This code includes Vo (initial velocity value) and Ve (velocity at end of motion).

The program code stategy.

  1. It uses a path calculator, which calculates motion path's in classical lineair way. At this stage no s-curve implementation is used.
  2. When path lenghts (L1,L2,L3), and path times (T1,T2,T3) are known, we do a s-curve calculation.

The program implementation.

  1. The program can be used as pre-processor for cnc- ,robotic movements.
  2. Within the s-curve calculation's, path lenght's are calculated as "Sa, Sb" etc. This value's can be used to interpolate to your current path x,y,z coordinate, for example Sa/Stotal * yourpathlenght will give you an idea where you are.
  3. You can push multiple point's into the waypoint buffer to create your path, example is inside.

The s-curve coding

  1. The attached pdf document provides the basic formula's for coding the s-curve. Jerk is implemented.
  2. The front curve is the most important. This formula's are quite clear to walk trough.
  3. The back end curve is in fact a mirror function of the front curve. This back end curve is harder to understand to all kind of mirror pollution.
  4. Visualising the output code is a must. Without visualising the output in a graph, coding failures are hard to spot.
  5. When you agree with the code, you can strip down the code to your own program, maybe you compile it as shared library?

motion-0
motion-1
motion-2
motion-3

1.0

17 Dec 04:18
ef38c9d
Compare
Choose a tag to compare
1.0

Pdf:
s-curve-motion
Graphic result:
result-in-grapf