-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create 3 navigate_to
is not using computed timeout
#34
Comments
You found a bug! I went to all the trouble of computing a timeout and then forgot to use it 🤦 |
navigate_to
is not using computed timeout
The timeout that you generate is usually longer than the journey it takes so it hangs if its short. If I traveled for 1 second and then travel back to where I was the timeout is always longer than 1 second. When in reality if it took 1 sec to travel back then it should be completed by the time it gets there which is 1 sec. So the timeout should be 1 sec. I ran into this problem a year ago. I adjusted it by adding a timeout call to the function and setting that instead. Then I would just pass in
|
The timeout should be longer than the journey -- that's why it's a timeout. The |
That's how I would expect it to work. I wrote a reverse navigation that saves its location every 1 sec then once it is told to stop it will follow along its path backwards. I kept having issues with the timing it wouldn't work properly eventually I just wrote that override above and it fixed my issues. |
I see. I need to investigate what is going on, and that will take some time. Thanks for making me aware of the issue. |
I can share my code with the override for you to use as a testing platform if you wish |
An example describing what you are trying to do, what you think should happen, what actually happens, and the steps you took to try to fix it are always welcome. It occurs to me that perhaps you are trying to get the robot to use its ROS 2 actions (the BLE interface is just a ROS 2 node under the hood) faster than it is able to respond (especially if you are issuing goals once per second), but perhaps there is something else going on. |
I was just trying to write some cool code within the web python app, that students could use to learn about the robot before ROS2 is taught. I wrote a working wall following program, and thought it would be cool if it could backtrack itself out of a maze without any sensors. So I stored the position every 1 sec interval and basically loop though it and waited for it to complete before sending the next nav. I honestly barely remember what was happening in detail. As for the steps I backed tracked the code and followed the trail eventually leading to me overriding it completely. The timing was all messed up in my observations. I just did lots of testing. I think it took me a few days to figure out what was happening. What I think should happen is that it shouldn't take at least a minimum of 7 sec to complete a navigation, if it doesn't send a completed message (now that I think about it that might of been one of the problems too. I know I wrote some test code to output the Bluetooth received data at one point. So I was reading the raw data). What's funny is I wrote the wall follower in ROS2 just recently and its slower to respond than the web python LOL. I'm certain other variables are at work there. Not important. Here is my code I uploaded it to my repo Script. For testing have it run and then click the single dot button on the bot to have it backtrack. To see what was going before with the issues just remove the |
Yes I have my bot on with the H.2.3 already and will tryout the navigation. H.2.4 and G.5.4 is not on the Docs yet. or on the latest-fw links Much appreciated. |
That's correct, they are not yet officially released. PR here: iRobotEducation/create3_docs#505 |
Found unused and useless line at 162 in create3.py. Became useless after this commit 76cd642
timeout = self.DEFAULT_TIMEOUT + int(math.sqrt(x * x + y * y) / 10) + 4 # 4 is the timeout for a potential rotation.
https://github.com/iRobotEducation/irobot-edu-python-sdk/blob/1a81d6f533937498bee43621b2c10fb2e6f81d1a/irobot_edu_sdk/create3.py#L162C9-L162C17
The text was updated successfully, but these errors were encountered: