Search found 44 matches

by DannyYeong
06 May 2015, 14:06
Forum: General questions
Topic: Mimic Thrust Force Model - Cuboid
Replies: 12
Views: 3016

Re: Mimic Thrust Force Model - Cuboid

coppelia wrote:You are right, the code was copy-pasted from another example, where the drag had to be relative to the shape frame, and only radial to it. See the updated version above.

Cheers
Might need some clarification on the 1.05 constant chosen, how it's that obtained?
by DannyYeong
29 Apr 2015, 10:39
Forum: General questions
Topic: Mimic Thrust Force Model - Cuboid
Replies: 12
Views: 3016

Re: Mimic Thrust Force Model - Cuboid

You need to write a correct controller for your force. You also need drag (the D component of a PID controller). Maybe something like: if (sim_call_type==sim_childscriptcall_actuation) then local pos=simGetObjectPosition(propeller,-1) local accel=simGetArrayParameter(sim_arrayparam_gravity) -- cm i...
by DannyYeong
28 Apr 2015, 15:45
Forum: General questions
Topic: Mimic Thrust Force Model - Cuboid
Replies: 12
Views: 3016

Re: Mimic Thrust Force Model - Cuboid

Hello Danny, the forces/torques you apply with simAddForceAndTorque (or simAddForce) are cumulative in a given simulation step. But the cumulated force/torque will be cleared at the end of one simulation step. But your approach is correct. I would implement a simple P controller for your force, ins...
by DannyYeong
28 Apr 2015, 11:00
Forum: General questions
Topic: Mimic Thrust Force Model - Cuboid
Replies: 12
Views: 3016

Re: Mimic Thrust Force Model - Cuboid

Hello Danny, the forces/torques you apply with simAddForceAndTorque (or simAddForce) are cumulative in a given simulation step. But the cumulated force/torque will be cleared at the end of one simulation step. But your approach is correct. I would implement a simple P controller for your force, ins...
by DannyYeong
27 Apr 2015, 15:36
Forum: General questions
Topic: Mimic Thrust Force Model - Cuboid
Replies: 12
Views: 3016

Mimic Thrust Force Model - Cuboid

I'm trying to make a cuboid rise to a certain height and then stop. The cuboid should keep itself in air till the simulation ends. I'm using the simAddForceAndTorque command and I know that the force and torque are cumulative. How do I keep the object fixed at a certain height after rising? Here's m...
by DannyYeong
27 Apr 2015, 11:46
Forum: General questions
Topic: Model Test (Before Programming)
Replies: 3
Views: 1082

Re: Model Test (Before Programming)

Danny, the best is you try to make a cuboid float first, by applying 4 forces that mimic the thrust from the propellers. You will have to use simAddForceAndTorque , or simAddForce . Cheers Under the "simAddForceAndTorque" description, there's a "table_3" term in LUA Synopsis, what's that referred to?
by DannyYeong
02 Apr 2015, 18:59
Forum: General questions
Topic: Model Test (Before Programming)
Replies: 3
Views: 1082

Model Test (Before Programming)

Hello, I'm building a quadcopter model. The base body and the propellers are imported from Solidworks built by myself. I've put them together in V-rep, following some basic options available in the Quadcopter VREP library. What I need to know is that how do I make it float/ rise at a certain height ...
by DannyYeong
01 Apr 2015, 20:28
Forum: General questions
Topic: How to find out the equations in scripts?
Replies: 3
Views: 1118

Re: How to find out the equations in scripts?

coppelia wrote:Hello Danny,

not sure what script you are talking about. But this is really specific to the coding style and the purpose of the script.

Cheers
My main purpose is the equation, normally how do you define one? Or at least, where to start?
by DannyYeong
14 Mar 2015, 17:49
Forum: General questions
Topic: How to find out the equations in scripts?
Replies: 3
Views: 1118

How to find out the equations in scripts?

Hi! I'm curious to how the equation "0.5-posx" was determined in the coding below: http://s12.postimg.org/69viktujx/Equation_Threaded_Script.png the function just tells the Yaw axis camera to move accordingly with the red sphere's movement.Normally how do you determine the constant values in the equ...
by DannyYeong
14 Mar 2015, 16:39
Forum: General questions
Topic: Threaded Scripting Template
Replies: 1
Views: 917

Threaded Scripting Template

Hi! Currently I'm trying to learn threaded scripting, and quite struggling in the formats and code callings (such as defining objects etc) Note: Ignore the coding as I've taken from a youtuber for practice at the moment. Below is a sample code I've followed from a youtuber tutorial video: https://ww...