question

Ryusuke T avatar image
0 Likes"
Ryusuke T asked Ryusuke T commented

How to get the "Stop for Turns" count in A* Navigator

I can set "Stop for Turns" in A* Navigator.

Is there a way to know how many times this "Stop for Turns" has been done?

1647408639924.png

FlexSim 21.2.4
a star navigationstop for turns
1647408639924.png (15.0 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Ryusuke T, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Ryusuke T commented

Here is one idea how this could be done:

I an instanced process flow with the task executer as instance object, I listen to the "OnAStarNavigatePath" event. This happens when the task executer starts traveling and let's you assign the node with the kinematics info to a label on the token.

I then use the "getkinematics()" command (see link below) to search the kinematics for rotations and store their start times in an array. The token then waits for the start time of the first rotate kinematic and increments a label on the task executer. It then loops around until there are no more entries in the array (no more rotations in the travel path).

I also write the current token to a label on the task executer. When it becomes blocked as has to take a new path, this allows me to prematurely release the counting token from the loop so only the rotations that actually happen are counted.

https://docs.flexsim.com/en/22.1/Reference/DeveloperAdvancedUser/Kinematics/Kinematics.html#other

AStar_RotationCount_fm.fsm

Edit: added 21.2 version of model

AStar_RotationCount_21_2_fm.fsm


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ryusuke T avatar image Ryusuke T commented ·

@Felix Möhlmann ,


Sorry for the late reply.

This is exactly what I wanted to do!

Thank you for your answer.

2 Likes 2 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.