Search found 39 matches

by Leizah
23 Jul 2021, 15:37
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Re: Dynamic color change in distance calculation

Well, you'll have to do some trigonometry and coordinate transformations! You'll have to start with your two points, and figure out where your other 6 points should be, in order to obtain a cuboid. Cheers Thank you! I managed to get the desired shape, but now I would like to set it's trasparency to...
by Leizah
22 Jul 2021, 08:49
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Re: Dynamic color change in distance calculation

You have several possibilities to create a rectangle or cuboid: sim.createPureShape or sim.createMeshShape : this will create a shape , i.e. a scene object , that you will have to remove later on with sim.removeObject . sim.addDrawingObject : this will add drawing items in the scene (those are not ...
by Leizah
20 Jul 2021, 17:56
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Re: Dynamic color change in distance calculation

Yes You have various item types , e.g. pixel-sized points, pixel-sized lines, triangles, "triangle points", "rectangle points", "disc points", "cube points", "sphere points". Additionally, you can dynamically create and destroy primitive shapes and ...
by Leizah
20 Jul 2021, 10:50
Forum: General questions
Topic: Speed and stop on path
Replies: 9
Views: 10963

Re: Speed and stop on path

Hello, first of all, make sure to use CoppeliaSim V4.2.0. Then, have a look at the child script attached to the model. Around line 160, you could add something like: if currentPosOnPath>pathL*0.5 and walkingDir>0 and not alreadyPausedMiddleWay then alreadyPausedMiddleWay=true pauseUntil=simTime+3 e...
by Leizah
20 Jul 2021, 10:47
Forum: General questions
Topic: Speed and stop on path
Replies: 9
Views: 10963

Re: Speed and stop on path

The robot has to change its speed when a specific action performed by the walking Bill is triggered (i.e. When Bill is moving from Table1 to Table2/colliding with one of the tables, reduce your speed to 50%) UPDATE To achieve this goal, I've added two proximity sensors at the edge of the tables and...
by Leizah
19 Jul 2021, 09:15
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Re: Dynamic color change in distance calculation

Thanks, I knew about that possible solution, but I would like to generate the rectangular mesh fixed between two specific object (If a walking element i.e. Bill passes between these objects, the mesh has not to desappear) and to maintain the line for all the other possible combination. There's a way...
by Leizah
17 Jul 2021, 09:16
Forum: General questions
Topic: Speed and stop on path
Replies: 9
Views: 10963

Speed and stop on path

Hi I'm working on a scene with a walking Bill that follows a path between three different customizable Tables and a UR10 robot that performs a pick-and-place operation. I would like to obtain the following results: Bill has to stop and wait during the path (i.e. Go to the first control point, wait u...
by Leizah
16 Jul 2021, 16:57
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Re: Dynamic color change in distance calculation

It worked, thank you!

I would like to extend my scene with another table, and I would like to mantain the distance line between Bill and each teable, adding a green/red panel (like a door) between the two table according to their relative distance, is that achievable using a similiar script?
by Leizah
16 Jul 2021, 08:08
Forum: General questions
Topic: Dynamic color change in distance calculation
Replies: 11
Views: 11451

Dynamic color change in distance calculation

Hi, I've a scene with two objects, a table ( Object_1 ) and a walking Bill ( Object_2 ). I would like to display the minimum distance between these object with a red line when d < 0.5m and a green one when d > 0.5m. Using this tutorial as reference, I've made the following child script for the table...