# E2C project, OpenCN 5 axes

**URL:** <http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240>\
**Category:** OpenCN Framework\
**Created:** [November 26, 2021, 7:57am UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240 "2021-11-26T07:57:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raoul](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/raoul/32/21_2.png) [@Raoul](http://discourse.heig-vd.ch/u/Raoul)\
**Post date:** [November 26, 2021, 7:57am UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/1 "2021-11-26T07:57:43Z")

</div>

We are happy to announce that our project “E2C” is accepted and that we got an 18 month funding.

The project E2C will include 5 axes RTCP support of OpenCN with a kinematic module.  
Feedrate planning will also be reworked in order to diminue computation time.

The E2C project will start on january 2022.

best regards,

Daniel Rossier & Raoul Herzog

---

<div class="post-metadata">

**Author:** ![yakunix](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/y/bb73d2/32.png) [@yakunix](http://discourse.heig-vd.ch/u/yakunix)\
**Post date:** [January 2, 2022, 12:28pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/2 "2022-01-02T12:28:28Z")

</div>

Hi Raoul,  
Just for curiosity, will the tool orientation corner smoothing also be conducted in an optimization way like the method mentioned in the paper _Optimal G2 Hermite interpolation for 3D curves_?

---

<div class="post-metadata">

**Author:** ![Raoul](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/raoul/32/21_2.png) [@Raoul](http://discourse.heig-vd.ch/u/Raoul)\
**Post date:** [January 2, 2022, 11:06pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/3 "2022-01-02T23:06:48Z")

</div>

Hi yakunix,

for simultaneous 5 axis CNC machining, the G code is only a “cloud” of points.  
These points are very dense, depending of the parametrization of the CAD-CAM tool.  
It makes no sense to insert “smooth transitions” between these points.  
So, the answer to your question is

- List item YES, we’ll use _Optimal G2 Hermite interpolation for 3D curves_ if the points are far away. This typically happens for CAD-CAM generated G-codes if only 2 axes are working simultanously.

- List item Otherwise, for real 5 axes operation we will “compress” the original points into a B-Spline.

---

<div class="post-metadata">

**Author:** ![yakunix](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/y/bb73d2/32.png) [@yakunix](http://discourse.heig-vd.ch/u/yakunix)\
**Post date:** [January 3, 2022, 3:41am UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/4 "2022-01-03T03:41:13Z")

</div>

Hi Raoul,

For item YES, What if both the position and orientation points are faraway? Maybe the tool waypoint is programmed by the user. In this case, will orientation smoothing also be conducted on the sphere?

 ![image](https://discourse.heig-vd.ch/uploads/default/original/1X/128a2041609c031ef10a72e6de1bafe61760723e.jpeg)

For item Otherwise, do you mean to create two separate B-splines: p(u) for positions and q(u) for orientations (maybe represented as a quaternion spline)? How could their path parameter be synchronized then?

---

<div class="post-metadata">

**Author:** ![Raoul](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/raoul/32/21_2.png) [@Raoul](http://discourse.heig-vd.ch/u/Raoul)\
**Post date:** [January 3, 2022, 3:00pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/5 "2022-01-03T15:00:13Z")

</div>

Hi Yakunix,

for sure, orientation smoothing between transitions will be necessary for waypoints that are far away.

For “compressing”, there are 2 possibilities :  
Either a single B-spline with values in R^5. In this case the knot distribution and the spline degree is the same for position and orientation.  
Or two separate B-splines, one for position, and one for orientation.  
But a common abscissa u running from 0 to 1.

Any ideas from you are welcome.  
Before starting with new ideas it is absolutely necessary to have a literature survey.  
I’m open to read publications you would like to share with me.

best regards,

Raoul

---

<div class="post-metadata">

**Author:** ![yakunix](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/y/bb73d2/32.png) [@yakunix](http://discourse.heig-vd.ch/u/yakunix)\
**Post date:** [January 5, 2022, 5:19am UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/6 "2022-01-05T05:19:20Z")

</div>

Hi Raoul,  
I think it would be great if the orientation is described by the general representation (like quaternion) instead of axis vector of alpha/beta spherical coordinate. Actually I am from the field of robotics and is investigating trajectory planning method for Cartesian space move. Using general description will make the algorithm more versatile also in robotic application. 😁

---

<div class="post-metadata">

**Author:** ![Raoul](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/raoul/32/21_2.png) [@Raoul](http://discourse.heig-vd.ch/u/Raoul)\
**Post date:** [January 5, 2022, 8:01am UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/7 "2022-01-05T08:01:19Z")

</div>

Hi Yakunix,  
that’s a good point.  
Converting the angle information (B, C in our case) included in the G-code to quaternion is easy, and at the end of the computation chain back from quaternion to joint angles B and C is also easy.  
I know that there is litterature about quaternion B-splines and interpolation, I’ll have to search a little bit … any hint from your side is appreciated.

Using OpenCN for robotics is possible.  
We recently had an industrial application in the field of pick & place.

---

<div class="post-metadata">

**Author:** ![yakunix](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/y/bb73d2/32.png) [@yakunix](http://discourse.heig-vd.ch/u/yakunix)\
**Post date:** [January 12, 2022, 1:27pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/8 "2022-01-12T13:27:06Z")

</div>

Hi Raoul,  
This paper may be good start. The orientation spline of tool axis is described by general bezier curve. And the synchronization of position and orientation waypoints is achieved by an additional reparameterization spline.

[A constant feed and reduced angular acceleration interpolation algorithm for multi-axis machining.pdf](http://discourse.heig-vd.ch/uploads/short-url/p2BqbUNy3Vm9f2nYUxLLLvh5UWA.pdf) (1.1 MB)

Another paper proposed a method to construct C3 continuous transition spline both for position and orientation in WCS. But they are not computed in an optimal way to minimize the integral of the path third derivative.  
[https://central.bac-lac.gc.ca/.item?id=TC-BVAU-51195&op=pdf&app=Library&oclc\_number=1032931481](https://central.bac-lac.gc.ca/.item?id=TC-BVAU-51195&op=pdf&app=Library&oclc_number=1032931481)

---

<div class="post-metadata">

**Author:** ![Raoul](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/raoul/32/21_2.png) [@Raoul](http://discourse.heig-vd.ch/u/Raoul)\
**Post date:** [January 12, 2022, 11:06pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/9 "2022-01-12T23:06:39Z")

</div>

Thanks a lot yakunix; i will study these papers

---

<div class="post-metadata">

**Author:** ![jmi](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/jmi/32/125_2.png) [@jmi](http://discourse.heig-vd.ch/u/jmi)\
**Post date:** [May 18, 2022, 12:02pm UTC](http://discourse.heig-vd.ch/t/e2c-project-opencn-5-axes/240/10 "2022-05-18T12:02:08Z")

</div>

Hi everyone,

Some quick news on the E2C project. We were able to:

- Jog on the five axes. The trajectory was computed by the _Simple PG_ component (new component based on `lcct` jogging feature).
- Do our first machine test using a 3 axes G-Code. The rotary axes have been manually set to the home position.

Have nice day  
J-P
