Search found 7 matches

by coder212
15 Sep 2021, 14:01
Forum: General questions
Topic: How to set the damping value for a pure shape (cuboid) generated from a script?
Replies: 1
Views: 4304

How to set the damping value for a pure shape (cuboid) generated from a script?

I am generating cuboids for my projects to be moved along a conveyor through a script using sim.createPureShape When I put my cuboid in a basket with an opening at the bottom to get the cuboid out, it looks like the cuboid is vibrating on the spot. I am planning to increase the damping factor. Is it...
by coder212
14 Sep 2021, 23:38
Forum: General questions
Topic: Cuboid does not move along with the conveyor belt
Replies: 2
Views: 5033

Re: Cuboid does not move along with the conveyor belt

Hello, well, you just commented the part out that is in charge if moving stuff lying on top of the conveyor belt. So no wonder that nothing moves. What the code does is similar to moving the entire conveyor a bit towards the movement, then removing the conveyor from the simulation, then adding it a...
by coder212
14 Sep 2021, 23:36
Forum: General questions
Topic: Is it possible to call a function from a separate Python script even if the whole project is in Lua?
Replies: 1
Views: 4048

Is it possible to call a function from a separate Python script even if the whole project is in Lua?

I use Lua in my project. But there is a task I need to be done, which I cannot find a way to code it Lua so I coded it with Python. Is it possible to call a function from a separate Python script using Lua?
by coder212
11 Sep 2021, 14:50
Forum: General questions
Topic: Cuboid does not move along with the conveyor belt
Replies: 2
Views: 5033

Cuboid does not move along with the conveyor belt

Conveyor belts in version 4.1 has this comment under the sysCall_actuation() function. --Here we "fake" the transportation pads with a single static rectangle that we dynamically reset -- at each simulation pass (while not forgetting to set its initial velocity vector) I am trying to send ...
by coder212
11 Sep 2021, 11:18
Forum: General questions
Topic: How to hide a dummy and cuboid grouped with it
Replies: 1
Views: 3706

How to hide a dummy and cuboid grouped with it

I want to get cuboids continuously on a conveyor belt. To do this, I added a cuboid and a dummy. Then grouped that dummy under the cuboid (box). Then in the child script for the conveyor belt, I added a code to copy-paste boxes onto the conveyor belt. box = sim.getObjectHandle("Cuboid") bo...
by coder212
10 Sep 2021, 13:57
Forum: General questions
Topic: Lua - How can I select numbers from a list randomly, with different probabilities of getting selected for each number?
Replies: 3
Views: 3965

Lua - How can I select numbers from a list randomly, with different probabilities of getting selected for each number?

I have 4 numbers [1, 2, 3, 4] I want to pick numbers out of this list randomly while giving the most probability to 1 (approx 0.43), next 3 (approx 0.38), and least and equal probabilities to 2 and 4 (approx 0.09 each). How can I do this in Lua? This is what I have tried so far. codeList = {1, 2, 3,...