Agent system using trapezoid

Agent system using trapezoid

tsuji_ryusuke
Observer Observer
12 Views
2 Replies
Message 1 of 3

Agent system using trapezoid

tsuji_ryusuke
Observer
Observer

[ FlexSim 21.0.10 ]

I will look at this and ask.

Here the sensor is represented as a rectangle, is it possible to make this sensor a trapezoid?

I understand that it would be easier to do it with slices of a circle, but I'd like to know if it's possible to represent it with a trapezoid.

1661489091819.png

0 Likes
Accepted solutions (1)
13 Views
2 Replies
Replies (2)
Message 2 of 3

moehlmann_fe
Observer
Observer
Accepted solution

To detect collision/proximity you would check if either of two conditions is fulfilled. Either the center point of the other object is within the sensor area or any of the edges of the sensor area intersect with any of the edges of the bounding area of the other object.

The second check just requires the position of the sensor area edges relative to the task executer. These can be determined once and saved in a label or other node for lookup during the model run. As such the sensor area can be an arbitrary polygon without changing the complexity of the math involved.

To check whether the center point is within the area you can still define the trapezoid as part of a circle slice. The midpoint of the circle just doesn't coincide with the center of the task executer.

1661496092566.png

Edit:

collsensor.gif

I build an example model showcasing the detection of an area intersection.

https://drive.google.com/file/d/1iEo1f5HLpFcXPzKtQs-dMvhkCoqoCt-G/view?usp=sharing

Message 3 of 3

tsuji_ryusuke
Observer
Observer

@Felix Möhlmann ,

Thank you for the information and the great sample model.

I would like to explore and utilize this sample model.

I'm really thankful to you!

0 Likes