Borrar filtros
Borrar filtros

how to obtain the location of a point with respect to the global coordinate system in vrml

2 visualizaciones (últimos 30 días)
I have created a vrml project of a robotic arm with the code for controlling the simulation in matlab. Trouble I am facing is how to obtain the global coordinate of a center of a shape like a box. which is a children of a transform node and not in the top level. I tried the following code but it gives center with respect to the local coordinate system
wh=vrworld('Robot1.wrl');
open(wh);
view(wh);
a=wh.gripper.center

Respuestas (1)

Jan Houska
Jan Houska el 20 de Dic. de 2012
If you want to read global coordinates, it is recommended to wrap the object by a Transform node. Then, it is possible to read the coordinates of that Transform node with the "_abs" suffix, which returns global coordinates. E.g.
Node.translation_abs
Please see the
vrmanipul_global
model for an example of reading global coordinates.

Categorías

Más información sobre Simulation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by