Our Misty bot has now started to randomly spin whenever we start to execute code to her, for example, we ran the HelloWorld tutorial on her. When she spins, it’s very fast and aggressive. It doesn’t happen all the time, but it happens every now and then. I know @johnathan and @steven gave me a new config file, it started doing that when we put the new config file. Maybe it can be because of that? Unsure.
There are a few things that could cause her drive system to kick her into a spin, and there should be mechanisms in place to catch/prevent it from happening. Apparently we missed something, or one of them was suppressed. In any case, the new config file shouldn’t be related as there is nothing in there that is related to her drive system.
Can you pull the latest logs from your robot and send them to us?
Do you know if the spinning occurs immediately upon a drive command being issued, or if she has been driving for awhile before it happens? Or both of those (you did say random).
Also, can you go into the command center and get a screenshot of the IMU data? Ideally if you can get a capture of the IMU data while she is spinning, that would also be helpful.
Once we get the logs we will dig in.
Okay sounds good!
I tried to get her to do it again, but I guess it’s really random as we ran the same code and done the same steps and she didn’t do it at all. So once it happens, I will do that (if it happens again).
What is the IMU data?
Most commonly, the spinning is a result of the IMU failing to boot correctly. It should rarely fail, so if the robot spins, power cycling it usually tends to fix the problem. If you’re seeing it spin even after power cycling the robot, we will want to dig in. The IMU data is in the Sensor Data section at the bottom of the command center. There is a section titled “IMU Sensors”. Specifically I am interested in the “yaw” value. When the robot goes into a mad spin, watch to see whether that yaw value is changing at all.
If you sent the logs I’ll look at them today.
Just sent the log file.
Unfortunately nothing in your log stood out as being a cause of random rapid spinning. Would you mind sharing your code with us? We would like to see whether there is anything that stands out as possibly being an issue, and would like to run it on a local robot to see if we can induce the behavior here with some more thorough debugging capabilities.
In the meantime, any time you see this happen, can you do the following:
- Get a quick video of the motion.
- Pull the logs as its happening (if possible) or as quickly as you can after.
- Look at the command center and observe the behavior of the IMU and TOF sensors. Make sure all the data is updating normally. Specifally we are looking for sensors that appear to be stuck, not changing.
- If possible, watch to see if there is a pattern to what moves come just before a rapid spin.
Let us know if you have any questions, comments, or concerns. We’ll get this figured out in no time, so no worries!