Page 1 of 1

How can I show the relative coordinate between two Dummy

Posted: 12 Sep 2019, 11:24
by Ken
Hi
I build the 5-Axis mill machine in the VRep. The AxisX is not connect to the AxisY(as below). So I put the differen dummy on both them. Now I want to show the relative distance with x,y,z between two Dummy and show them in the 3D Graph. So that I can get the tools path in the graph.
Image

Who can tell me the method or how to do it.

Any help would be appreciated.Thank you.

Re: How can I show the relative coordinate between two Dummy

Posted: 12 Sep 2019, 11:30
by Ken

Re: How can I show the relative coordinate between two Dummy

Posted: 12 Sep 2019, 14:50
by fferri
sim.getObjectPosition: the second argument indicates the handle of another object relative to which reference frame we want the position.

Re: How can I show the relative coordinate between two Dummy

Posted: 13 Sep 2019, 12:07
by coppelia
To display user data in a graph, add a graph to the scene and add a new data stream to record of type Various: user-defined. Then use sim.setGraphUserData in each simulation step.

Cheers

Re: How can I show the relative coordinate between two Dummy

Posted: 14 Sep 2019, 05:45
by Ken
Thank you the answer both of you. @coppelia @fferri . according to your tips I solved out and the method is simple and useful.
I show my works to here and hope to help somebody like me.

In the end I really appreciate it and thank you again.

https://drive.google.com/open?id=1_3B0B ... Vl7sgScpwt
https://drive.google.com/open?id=1ovdtZ ... Q_nmgNdJnA
https://drive.google.com/open?id=1s6KJH ... KKnleaeAz2