Mainly, I do believe I can get a Quaternion or a set of Euler Angles, but after that it requires a comparison with where you desire to go and at what rate. And that is the NEXT step after getting a nice gizmo presenting an image on a computer screen... a real robot in motion.
Yes indeed. Theory and simulation and "seat of the pants" ideas are one thing. Actually doing it and making it work is another.
As they say: "In theory, theory and practice are the same. In practice they are different".
I would not worry so much about using quaternians or Euler angles or whatever. With a bit of trig you can easily get from one to the other and back again. The conversions take processing time so we have to be careful where we use what.
And yes, we have many steps here. Measurement, "fusion", control decision, command.
Measurement is done, we have these amazing gyro, accel, compass chips today.
Fusion may well be a solved problem. We have Madgwick and Kalman and whatever software magic black boxes.
The control algorithms I have not even begun to think about. Depends on what you want to control I guess.
The "command" part is also a mystery to me. If the control algorithm determines we need x amount of force in the X direction the motor command system had better do that by whatever means.
In the mean time I have learned a lot by dinking around with that Madgwick code and simulated inputs. It's kind of fascinating how it responds to input stimuli. For example just now I showed it to my coworker and he said "It moves just like a real old fashioned compass needle".
Once into the topic of IMUs, it seems to grow on you.. doesn't it?
A year or two ago, I got into reading for a two-wheel balancing bot; but pretty much gave up due to the array of hardware that was on my shopping list. Since IMUs now are so cheap and motors with encoders have become reasonable as well, my enthusiasm has been revived.
Of course, the topic didn't stand still while I set it aside and we now have Madgwick and Quaternions in play. 9Dof sensors are really overkill for a two-wheeled balancing bot. I just need one gyro and one accelerometer to keep the balancing right. The actual motion control for wandering comes under two states of motion control -- backward/forward motion, and spinning left/right. Both occur while balancing continues to pull the center of gravity under the wheels. Of course, some limit to speed and rotation are wise.
All that 'other stuff' for quad copters and fixed wing flight gets more complex. And each is a separate case as the quad copter gets its lift from motors alone, and fixed wing gets lift from the motors and wing in foward motion (you even have to consider stall conditions with fixed wing).
Quad copters use the propellers of four motors to adjust position and motion, the motors are varying their lift to do so. Fixed wing tends to just have the motor provide full on power when there is a desire to climb. And the control surfaces take care of heading and dominate changes in altitude.
I have a fixed wing glider. So I suppose I will actually include an IMU and Propeller on that long before I get into a Quad-copter. And I could stay with that for quite awhile before feeling the next to move over to a Quad-copter. After all, it is all paid for.
Comments
to bot balance I have used only one axis. One of the problems I have is determining the actual balance point angle among others. I think it is like
Heater says you have to figure which way is up (the balance angle) you can probably use quarternions, Eular or anything that shows gravities
effect on an angle. Get better soon!
As they say: "In theory, theory and practice are the same. In practice they are different".
I would not worry so much about using quaternians or Euler angles or whatever. With a bit of trig you can easily get from one to the other and back again. The conversions take processing time so we have to be careful where we use what.
And yes, we have many steps here. Measurement, "fusion", control decision, command.
Measurement is done, we have these amazing gyro, accel, compass chips today.
Fusion may well be a solved problem. We have Madgwick and Kalman and whatever software magic black boxes.
The control algorithms I have not even begun to think about. Depends on what you want to control I guess.
The "command" part is also a mystery to me. If the control algorithm determines we need x amount of force in the X direction the motor command system had better do that by whatever means.
In the mean time I have learned a lot by dinking around with that Madgwick code and simulated inputs. It's kind of fascinating how it responds to input stimuli. For example just now I showed it to my coworker and he said "It moves just like a real old fashioned compass needle".
A year or two ago, I got into reading for a two-wheel balancing bot; but pretty much gave up due to the array of hardware that was on my shopping list. Since IMUs now are so cheap and motors with encoders have become reasonable as well, my enthusiasm has been revived.
Of course, the topic didn't stand still while I set it aside and we now have Madgwick and Quaternions in play. 9Dof sensors are really overkill for a two-wheeled balancing bot. I just need one gyro and one accelerometer to keep the balancing right. The actual motion control for wandering comes under two states of motion control -- backward/forward motion, and spinning left/right. Both occur while balancing continues to pull the center of gravity under the wheels. Of course, some limit to speed and rotation are wise.
All that 'other stuff' for quad copters and fixed wing flight gets more complex. And each is a separate case as the quad copter gets its lift from motors alone, and fixed wing gets lift from the motors and wing in foward motion (you even have to consider stall conditions with fixed wing).
Quad copters use the propellers of four motors to adjust position and motion, the motors are varying their lift to do so. Fixed wing tends to just have the motor provide full on power when there is a desire to climb. And the control surfaces take care of heading and dominate changes in altitude.
I have a fixed wing glider. So I suppose I will actually include an IMU and Propeller on that long before I get into a Quad-copter. And I could stay with that for quite awhile before feeling the next to move over to a Quad-copter. After all, it is all paid for.