How to measure distance between wheel robot frame and uneven ground during motion in simscape multibody?

4 views (last 30 days)
Mikhail Golovin
Mikhail Golovin on 26 Jul 2021
Answered: Steve Miller on 25 Nov 2021
Hello!
I model a wheel robot with 4 legs and a control system for it. Interaction between wheel and ground by Spatial Contact Force. I try to use a ground profile modeled in other program, but there in no interaction between it and wheels. So now I model uneven surface by combining different Solid blocks.
I measure distance between the robot frame and flat surface by Transform Sensor, it is OK. How to measure the distance between robot frame and inclined or uneven surface during robot motion?

Answers (1)

Steve Miller
Steve Miller on 25 Nov 2021
If you are measuring vertical distance only (z), you can measure the distance to a flat surface using the Rigid Transform block and then add on the height above World at that position using a lookup table based on x and y.
If you want to measure the distance between the wheels and the closest position on a set of solid blocks, zou can use the Spatial Contact Force block and output the separation distance between the robot and the floor. If it is connected to multiple solids to measure the floor, you can use the min block to find the smallest distance.
--Steve

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by