Hi,
A tiny update.
I did some work in the meantime.
1. Created a embedded linux install version for robots.
2. Created a advanched s-curve motion planner. We need this for nice moves.
3. Created a realtime path planner wich behaves like a video player with 1000 frames a second. :laugh: This is really a big thing.
4. Created a c++ halviewer. We have now full control. :blink:
5. Now creating the different robot, cnc machine teach in functions for 3d usage.
This is how the robot path will be when doing a rapid move, green = "teach in points". The path is of type spline.
One thing i really would like to have is a 3d arc motion path. I was working on this for many hours, but no succes so far. :silly:
My math level for this 3d arc is too tiny at the moment, and i found no usefull examples.
The arc teach in, contains from 3 points.
At the moment when using a G2 or G3 you can do this only in one plane at a time.
A G2-3d or a G3-3d does not have to be related to a plane or matrix. It can be a free motion performed from any machine angle.
It could be used by 3d milling operations.
[Edit]
After some research i could get the 3d arc waypoints.
The arc waypoints are retrieved from a function in the opencascade library.
The complete function as in the picture for the yellow cones :
Code:
void Opencascade::test_arc(gp_Pnt point1,gp_Pnt point2,gp_Pnt point3){
//https://www.youtube.com/watch?v=gdSOTQkmHwk
//point1={0,0,0};
//point2={10,10,0};
//point3={20,0,0};
Handle(Geom_TrimmedCurve) aArcOfCircle = GC_MakeArcOfCircle(point1,point2,point3);
TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aArcOfCircle);
GeomAdaptor_Curve acrv(aArcOfCircle);
TColgp_Array1OfPnt pkte(1, 25);
GCPnts_UniformAbscissa algo(acrv, 25);
if(algo.IsDone() && algo.NbPoints() > 0)
{
int n = algo.NbPoints();
std::cout<<"total points:"<<n<<std::endl;
std::cout<<"abscissa dist:"<<algo.Abscissa()<<std::endl;
for(int i=1; i<algo.NbPoints(); i++){
double param = algo.Parameter(i);
gp_Pnt p = aArcOfCircle->Value(param);
//std::cout<<"Px:"<<p.X()<< " Py:" << p.Y() << " Pz:" << p.Z() <<std::endl;
CreateArrow(p.X(),p.Y(),p.Z(),Quantity_NOC_GOLD,0,1);
}
}
//display the edge
Handle(AIS_Shape) aisBody2 = new AIS_Shape(aEdge2);
m_context->SetColor(aisBody2,Quantity_NOC_BLUE4,Standard_False);
m_context->SetMaterial(aisBody2,Graphic3d_NOM_PLASTIC,Standard_False);
m_context->Display(aisBody2,Standard_False);
}
At this stage, we know everything to get a robot teach in program running.