29-06-2023, 07:07 AM
(This post was last modified: 29-06-2023, 07:15 AM by josemendez.)
Hi!
That's impossible to do. To achieve an exact length of 28 given a control input of 28 you'd have to have both perfect convergence - which means the engine would have to run for an infinite amount of time - and no floating point error. You must assume there's always going to be some error between your real measure (in this case, the simulation) and your desired/target values. Same is true in the real world: for a system to match your input you'd have to have perfect sensors to measure its state and perfect actuators to modify it, but neither exist.
Nope, that's the point of having a controller in the first place. Think of your basic PID controller: the proportional term "P" assumes there's an offset between the actual measure and the control input, and its job is to compensate for it.
If you could directly map the desired state of a system to some control input, your controller would just consist of assignment ("=") operators and we could just wipe control theory off the face of the earth .
Yes, but I don't think this will help in your case. You can access the "lambdas" array in the constraint batches, these contain lagrange multipliers for each constraint. See:
http://obi.virtualmethodstudio.com/manua...aints.html
Also, you can take a look at the rope's ApplyTearing() method as reference/example. It checks the force at all constraints in the rope and tears it where they exceed a threshold.
let me know if you need further help,
kind regards
(26-06-2023, 05:57 AM)rohit_dhak Wrote: If I have a load attached to 4 cables as shown in the scene.
And If i give control inputs to the cables as [28, 28, 28, 28] where the inutial cable lengths at the start are [25, 25, 25, 25].
I would like to have the cable lengths to be exactly [28, 28, 28, 28] but at the moment I get something like [27.830832 27.834806 27.824314 27.820284]
And If i change the cable lengths again to [25, 25, 30, 30] the results induced more offset from the applied control input and I get [25.510212 25.506298 29.991457 29.995811].
That's impossible to do. To achieve an exact length of 28 given a control input of 28 you'd have to have both perfect convergence - which means the engine would have to run for an infinite amount of time - and no floating point error. You must assume there's always going to be some error between your real measure (in this case, the simulation) and your desired/target values. Same is true in the real world: for a system to match your input you'd have to have perfect sensors to measure its state and perfect actuators to modify it, but neither exist.
(26-06-2023, 05:57 AM)rohit_dhak Wrote: I just want to know if there is a way to set the exact cable lengths I give as control inputs.
Nope, that's the point of having a controller in the first place. Think of your basic PID controller: the proportional term "P" assumes there's an offset between the actual measure and the control input, and its job is to compensate for it.
If you could directly map the desired state of a system to some control input, your controller would just consist of assignment ("=") operators and we could just wipe control theory off the face of the earth .
(26-06-2023, 05:57 AM)rohit_dhak Wrote: Also I would like to know if there is a way in Obi rope to get cable forces at the points where the cables are attached to the load object (or ideally at different points of the cables)?
Yes, but I don't think this will help in your case. You can access the "lambdas" array in the constraint batches, these contain lagrange multipliers for each constraint. See:
http://obi.virtualmethodstudio.com/manua...aints.html
Also, you can take a look at the rope's ApplyTearing() method as reference/example. It checks the force at all constraints in the rope and tears it where they exceed a threshold.
(26-06-2023, 05:57 AM)rohit_dhak Wrote: Is it possible in Obi rope to moved the attached load and the cables just extend according to the load position?No, as that would entirely ignore physics (momentum).
Like inverse kinematics.[b]
let me know if you need further help,
kind regards