Robot Engage Blog Buy Now

Misty Community Forum

Future Skill: Detect Floor Type and Set Turn Speed

Description: Depending on the type of floor, some Misty actions can generate wobble. This skill may be a little dance that Misty does while monitoring the IMU and afterward recommend an optimal turn speed.

Why is this a good Misty Skill? There are differences in the ability for Misty to gracefully turn at speed depending on floor type. This skill would allow Misty to tell the difference between concrete, carpet, tile and hardwood floors. Then Misty would set or suggest a recommended max turn speed for other skills to use that require stable operation.

Subscribe to IMU message - zAcceleration, at fast collection rate
turn left TBD (2-5?, as small as possible angle) degrees at high(ish) speed
turn right TBD degrees at high speed
if Misty Stable, repeat with higher angle/speed
Repeat up to 3x and then set a recommended turn speed

There may be other and better ways to accomplish this. And maybe Misty could remember the floor type for each room so this would only be run when Misty is introduced to a new house.

1 Like

@MorningR This is a great idea! Knowing the driving surface has many positive implications. In addition to adjusting the control system for better stability, it could inform how much energy is required to get back to the charging station, and settings in the hazard system to avoid false hazard triggers.

I like your pseudo code. It is sort of a step-sweep across motor speeds. This could probably be done more quickly with a continuous sweep or searching algorithm since the resonant frequency of the instability varies with surface. A subroutine would look for instability from the IMU data, and then using the motor speed + resonant frequency to correlate to surface type. Motor current could also be incorporated since some surfaces require more torque to turn at a given speed.

@steven Do you think this could be done at the skill level? Or would the skill need to call a routine in FW to allow faster sampling? Since we’re looking for a resonant instability, it seems like the sample rate wouldn’t need to be particularly fast.


Doing it at the skill level is questionable. Might be possible, and should certainly be investigated. Would really need to know the highest observable frequency of the instabilities on different surfaces, which could likely be determined via a video of the robot’s motion, and the incoming rate of data at the skill (we can ask one of the guys working on the API what the smallest debounce ability for the data is). So long as the incoming data in the skill is at or above the Nyquist frequency, then the skill is the best place for it. Eventually I’ll be writing something into the FW for “dance” detection which may also be able to determine if its doing a tango or a foxtrot. :stuck_out_tongue:

Definitely an interesting idea though, to determine the surface its on by how easily it bounces on a surface and/or the frequency of the bouncing!

So would this then be a submission for a “Future Skill” idea?

@Ben Yes, it is a Future Skill. Changed it.

@steven I think you are asking for video of the robots motion on different floors. When I get a chance I will do that, and post them here. Is there any other information you need me to collect at the same time? Writing this skill is above my capabilities, but I would be willing to test and take data.


@steven I’m not sure Nyquist is necessary because we aren’t so much looking for resonant frequency of the IMU data, but correlating motor speed to when the mechanical system is in resonance. It seem then that we only need to look for erratic IMU data, i.e. greater than some threshold, or look for a discontinuity in slope (as the motors sweep up in speed, we should see the acceleration magnitudes peak at the resonance, then subside as we pass through). Or am I missing something? Maybe we never pass through the resonance band?

I often have my Misty II up on the guest bed moving on a large collapsed cardboard box. This arrangement makes it much easier to see Misty’s face. Not sure cardboard would need to be added, but thought I’d mention my setup.

@BoulderAl Has she ever fallen off the bed? That’s a great point that there are more dimensions in the driving surface that affect the robot than just friction. Compliant surfaces are pretty difficult for the control system. Since our cliff detectors are close to the wheels, she may topple off the edge even if she detects it and brakes. Using the IMU to estimate compliance certainly seems possible.

She unerringly recognizes when she has reached the end of the cardboard, at which point she stops. Of course I don’t have her traveling very quickly when she’s on the bed.

Nice! Good to hear she’s working as intended on a surface/location I never would have thought about. :stuck_out_tongue: