Good example of GCS?

Typically: "How do I... ", "How can I... " questions
Post Reply
mfloyd
Posts: 21
Joined: 29 Oct 2014, 23:06

Good example of GCS?

Post by mfloyd » 06 Aug 2015, 19:34

I wanted to learn some more about the capabilities of V-rep and was looking at the Geometric Constraints Solver. From what I could find on the forum, IK is always preferred over GCS when possible for speed and reliability. Are there any good examples of where GCS is used?

A possible benefit of GCS that I found in the documentation geometricConstraintSolverModule and geometricConstraintSolverOperation is that supposedly you could interact with a mechanism directly with the mouse, but while still obeying mechanical constraints, such as with a door. I tried to get something simple to work in that mode by calling simSetNavigationMode(sim_navigation_ikmanip) in a script as suggested in the documentation, but sim_navigation_ikmanip caused the script to have a runtime error. Code completion within the script editor wouldn't suggest sim_navigation_ikmanip after typing sim_navigation_... at all, so has that functionality been removed from V-rep?

coppelia
Site Admin
Posts: 7450
Joined: 14 Dec 2012, 00:25

Re: Good example of GCS?

Post by coppelia » 07 Aug 2015, 09:55

Hello,

yes, that is correct, the IK module is more accurate and faster. Additionally, you are completely in control of what you are doing. With the geometric constraint solver (GCS) things happen magically ;)

Here you have an example of how you could manipulate a GCS mechanism with the mouse.

Cheers

mfloyd
Posts: 21
Joined: 29 Oct 2014, 23:06

Re: Good example of GCS?

Post by mfloyd » 07 Aug 2015, 19:12

Thanks for the example. It seemed odd at first because the whole model floated around. It felt like the base should stay still while manipulating it. I added a dummy outside of the model and then added a gcs constraint between the new dummy and Mechanism_base, then it seemed to behave well (at least how I would expect it to).

The technique used for mouse manipulation seems to me that it could apply equally well to other mechanisms as well that use IK or dynamic overlap constraints? The script intelligently moves the location and changes the parent(s) of the tip and target dummies according to the mouse selection and location.

Post Reply