Posts: 557
Threads: 40
Likes Received:
444 in 306 posts
Likes Given: 213
Joined: Aug 2023
Reputation:
20
02-06-2025, 11:50 AM
(This post was last modified: 02-06-2025, 12:53 PM by litdev.)
You are right, we will not be able to achieve exact rotation at all, the best will be to within maybe around 10 degrees, similar for forwards movement. So the little step-by-step approach is that we rotate or move in the smallest possible step in the direction we want to head, and incrementally update this and go slowly where we want. This is what I did in the code I shared. Note that after each small step I update where we actually are (or how much rotated) and work out how to turn or move from where I am, so the errors are not compounde, I just keeep updating, which is why I put a good sized delay after each small step to ensure all movement is finished before I reassess how to move next.
However, you have found that the tollerance is roughly constant and therefore we can move or rotate a larger a amount in a single step (with similar accuracy) rather than using lots of small steps as I did. This would make the robot faster than I had it.
Posts: 557
Threads: 40
Likes Received:
444 in 306 posts
Likes Given: 213
Joined: Aug 2023
Reputation:
20
02-06-2025, 09:58 PM
(This post was last modified: 02-06-2025, 10:16 PM by litdev.)
Yes partly, but different users could also be sending to the server at the same time and the browser window(s) are also sending and receiving continuously to the server.
The change I mentioned in the post #41 was to with this - what it does is queue up server requests and handles them one a time in the order they appear at the server, so you are OK to send requests from any thread.
So there is no issue from the server's point of view, but if you use Timer threads you cannot be sure of the order of requests with respect to calls made on the UI thread, so my later examples moved away from using the Timer thread and uses the logic I mentioned in post #44.
Posts: 557
Threads: 40
Likes Received:
444 in 306 posts
Likes Given: 213
Joined: Aug 2023
Reputation:
20
Updated so that if 2 or more users are present at the same time they can be seen. This should also work using the 'name' feature in settings running with 2 different browsers. This is a precursor towards some environment where AI SB controlled robots can interact or compete in some way - once they can move reasonably of course.