This is my first days using V-Rep, and I am meant to model Dynamical/Kinematical behavior of a robot arm that shall clean a wall, in other meaning, its End-Effector tool shall mate the wall and perform a given path.
( Just like this from a CAD perspective view )https://ibb.co/mw1CQF

For now, I was able to create the complete model, including all the IK, Collision Detection, Sensor implementation and Path Planning tasks and the controller algorithms in embedded Lua script and it works fine ( I have also written a Remote Matlab code to interact with the V-Rep environment but it is still unable to read correct joint position value, neither be able to control the joints).

But

My Problem is:

- I still not able to perform the task with the constraint: End-Effector tool mating the Wall.
I tried the Geometrical Const Solver by coinciding a Reference Plane created on the EE-Tool surface and the Wall but didn't work.https://ibb.co/nPLE5F
Somebody have an idea how to deal with this ?

- I am also getting incorrect values from the ForceTorque sensor.

- I am trying the output in the V-Rep Bar Command the instantaneous distance between the EE-tool and the Wall but I am getting the value 1 all the time, couldn't understand the reason. ( same problem when I used my Matlab code )

try deactivating your threaded child script first, then run your simulation. You will notice that the manipulator converges very slowly to the target position/orientation. This is because you selected the DLS method with a large damping factor. Reduce the damping factor, or select a non-damped resolution method for your IK group. Then manually move the target around, and also rotate it: the manipulator will correctly follow your target.
When you move your target along the path, you should make sure the target is correctly oriented, otherwise the manipulator won't be able to follow. (i.e. do not use the orientation that comes from the path, but compute it yourself).

Your manipulator is still not following the path in a clean manner. A damped resolution is normally not needed, also because you have enough degrees of freedom (7 in your manipulator).
Also, you have some elements of your manipulator that are dynamically enabled, others that are not dynamically enabled. For instance you have dynamic items built on top of static items, themselves built on top of dynamic items. Do not mix-up everything.

I highly recommend that you have a look at the various manipulator models available in the V-REP library, and how they have been built and how the operate. Also, make sure to very carefully read this page.

Why I actually build the model on that way is that at the beginning when I wanted to build a Dynamically enabled model in which the joints are acting in Hybrid mode, the arm fall to the ground when I start the simulation, even though the joints are set in Hybrid mode (IK) !!

All I want to do is:
- Having the robot arm in IK mode in which in its End effector is mounted an FT Sensor that measures the Force/Torque response when the end-effector touch the wall.
- Having the robot arm mounted on top of a controlled mobile platform that consists of 4 wheels! ( I will solve this problem once I have a clean model )

I think I have followed exactly youBotAndHanoiTower.ttm scene! but still, I can't figure out what is going on! I even tried to follow the "How to build a clean model" and the " How to perform dynamic simulation" but:

Problem:

- Joints aren't dynamically enabled and the arm falls during the simulation!

Thanks it works now! ( Model Dynamiquely enable correctly mating a position on the wall and FT sensor getting consistent data ).
I will try to solve the mobile platform controller problem and the path following problem.