Hello,
Is there how embedded CoppeliaSim 3D view inside a Java Application?
Embedded CoppeliaSim 3D view inside Java Application.
-
- Posts: 10
- Joined: 09 Jan 2018, 17:14
Re: Embedded CoppeliaSim 3D view inside Java Application.
Hello,
you can do this via a relatively simple script, that basically does following: (a) make the shape's mesh data available to your Java application, and (b) continuously stream the absolute position/orientation of all shapes.
For that you'd use sim.getShapeMesh / sim.getShapeViz and sim.getObjectPosition / sim.getObjectQuaternion / sim.getObjectOrientation / sim.getObjectPose, and loop over all shapes with sim.getObjectsInTree.
Depending how you'd set-up things, you can do that in various ways, e.g. via the remote API which would call / stream data. Or you can do low-level communication via sockets directly, or via ZMQ. See also other available means of communication.
Cheers
you can do this via a relatively simple script, that basically does following: (a) make the shape's mesh data available to your Java application, and (b) continuously stream the absolute position/orientation of all shapes.
For that you'd use sim.getShapeMesh / sim.getShapeViz and sim.getObjectPosition / sim.getObjectQuaternion / sim.getObjectOrientation / sim.getObjectPose, and loop over all shapes with sim.getObjectsInTree.
Depending how you'd set-up things, you can do that in various ways, e.g. via the remote API which would call / stream data. Or you can do low-level communication via sockets directly, or via ZMQ. See also other available means of communication.
Cheers