Sure. I wouldn't do it that way, but it could be done that way.
The reason I said that I wouldn't is that you loose the multi-threading that is possible with multiple scripts. Each control runs in its own thread (a script being a control). There will be a lot of things going on with navigation that would probably be best done in parallel. Because of this, I would break it out to multiple scripts.
Also, it is a good practice to get into to compartmentalize your code. By this, I mean to do one thing, test it, make sure it works great, then start another script to do another thing. This lets you then have a master type script that calls all of these tested components.
You can set variables (which are global)
and then call other scripts as needed.
You can open example projects to see some examples...
https://synthiam.com/Tutorials/Lesson/22?courseId=6
A good example in exactly what you seem to be asking is Procedural 4 (Threading)
Can One Script do every thing, meaning, from Ping to moving the wheels on the robot, all on one script ?
Sure. I wouldn't do it that way, but it could be done that way.
The reason I said that I wouldn't is that you loose the multi-threading that is possible with multiple scripts. Each control runs in its own thread (a script being a control). There will be a lot of things going on with navigation that would probably be best done in parallel. Because of this, I would break it out to multiple scripts.
Also, it is a good practice to get into to compartmentalize your code. By this, I mean to do one thing, test it, make sure it works great, then start another script to do another thing. This lets you then have a master type script that calls all of these tested components.
https://synthiam.com/Community/EZCloud/RobotApps.aspx?c=-1&a=1534&sc=1&sr=1&k=roam
Here are some great examples for you to use.
Ok, Thank you very much for the information, I will follow your suggestions.
BTW, Welcome to the community!
Thank You!