Search found 709 matches

by fferri
24 Feb 2021, 14:56
Forum: General questions
Topic: Real-time simulation slowdowns robot motion
Replies: 2
Views: 17

Re: Real-time simulation slowdowns robot motion

Hi, as described in Simulation loop , when real-time is enabled, the simulator tries to keep the simulated time synchronized with real time. With real-time disabled, the simulation (therefore, simulation time) advances as fast as possible, so the speed of the simulation can vary from machine to mach...
by fferri
24 Feb 2021, 09:17
Forum: General questions
Topic: Confusing on function parameter
Replies: 1
Views: 9

Re: Confusing on function parameter

From CoppeliaSim version > 4.1.0 rev1, sim.setShapeMassAndInertia and sim.getShapeMassAndInertia are deprecated. Use instead sim.setShapeMass, sim.getShapeMass, sim.setShapeInertia and sim.getShapeInertia.
by fferri
22 Feb 2021, 11:49
Forum: General questions
Topic: Evaluate whether object name exists or not
Replies: 4
Views: 1866

Re: Evaluate whether object name exists or not

From sim.getObjectHandle:
objectName: If the name is appended by a "@silentError" suffix, then no error will be output if the object does not exist.
So, sim.getObjectHandle('Floor@silentError')
by fferri
22 Feb 2021, 11:45
Forum: General questions
Topic: How to change the default settings?
Replies: 2
Views: 36

Re: How to change the default settings?

It is not clear what you are asking: if you are asking how to change the embedded script of a specific model, simply add it to the scene, modify the script, and re-export the model if you want a piece of script to be executed whenever some robot is added to the scene, then you can define a sysCall_a...
by fferri
22 Feb 2021, 11:33
Forum: General questions
Topic: How sim.getShapeMesh works?
Replies: 1
Views: 30

Re: How sim.getShapeMesh works?

For example, for a pure shape cuboid, it gives me normals like below: {0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, ...
by fferri
19 Feb 2021, 09:48
Forum: General questions
Topic: How to use callScriptFunction in threaded script?
Replies: 4
Views: 66

Re: How to use callScriptFunction in threaded script?

Have a while loop running continuously in the main thread function, like it's done in the default threaded script.
by fferri
18 Feb 2021, 10:03
Forum: General questions
Topic: Feed in array from command line as -g parameter
Replies: 4
Views: 53

Re: Feed in array from command line as -g parameter

I'm not using square brackets as substitute for curly ones.

Square brackets denote arrays. Curly braces denote objects. It's the JSON spec. Check out www.json.org

Lua on the other hand uses curly braces also for arrays.
by fferri
18 Feb 2021, 09:58
Forum: Bug reports
Topic: Path Object Does Not Exist Issue
Replies: 1
Views: 36

Re: Path Object Does Not Exist Issue

Not a bug.

Use sim.getObjectHandle('Path#') instead.

Read more at Accessing objects programmatically.
by fferri
17 Feb 2021, 20:53
Forum: General questions
Topic: Feed in array from command line as -g parameter
Replies: 4
Views: 53

Re: Feed in array from command line as -g parameter

You might want to consider using a serialization format (e.g. JSON) to encode your data into a single value to be passed as a CoppeliaSim argument (e.g. -g"[[1,2],[3,4]]" ). Use dkjson (bundled with CoppeliaSim) to decode the value into a Lua table: > json=require'dkjson' > encodedData='[[1,2],[3,4]...
by fferri
17 Feb 2021, 20:49
Forum: General questions
Topic: Change appearance of sensor cones
Replies: 6
Views: 68

Re: Change appearance of sensor cones

Vision sensors do not have detection volume.

Vision sensors have a frustum, which depends on the rendering properties (near/far clipping planes, and perspective angle if any).