Hi guys (and gals?)
I'm new to Mindstorms but recently managed to build a robot that is balancing on two wheels (you might call it a nxtway).
I'm quite satisfied so far
Now i want to have it drive forwards or backwards, i.e. controlling the position. But i don't really know how to do that.
For balancing, I control the light value from the sensors by adjusting the motorpower with a PID controller.
How do i control the position? Another PID controller controlling the position (i.e. the value of degrees that the motors rotated) by using the motorpower, too?
I guess the controllers would kind of work against each other.
But how could you do it? Any ideas or advices for me?
balancing and position control
-
- Posts: 48
- Joined: 12 Jan 2011, 18:40
- Contact:
balancing and position control
link to my youtube channel under my avatar!
-
- Posts: 125
- Joined: 29 Sep 2010, 18:07
- Contact:
Re: balancing and position control
I have no idea what your program is but it would appear that you (1) take a reading, (2) store it as the calibrated reading, (3) check all readings from then on against the first one.
If that's so, you could increase/decrease the stored value and it would think it was leaning forward/backward (respectively) and thus attempt to 'fix' itself.
Just an idea.
If that's so, you could increase/decrease the stored value and it would think it was leaning forward/backward (respectively) and thus attempt to 'fix' itself.
Just an idea.
- Stryker AKA Jordan
http://nxtbystryker.wordpress.com
http://nxtbystryker.wordpress.com
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: balancing and position control
Generally, you just want it to lean forward, or backward, and continue to stay balanced. If the robot is leaning forward, it must drive forward to stay balanced.hergipotter wrote:Hi guys (and gals?)
Now i want to have it drive forwards or backwards, i.e. controlling the position. But i don't really know how to do that.
One way to make it lean forward, is to drive the wheels backwards a small amount. This will cause it to tilt forward, then roll forward to balance.
Another way is to tell it that the "balance point" is just a bit ahead of where it really is.
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
-
- Posts: 48
- Joined: 12 Jan 2011, 18:40
- Contact:
Re: balancing and position control
Thx for your two answers!
I think the idea of altering the stored balance point is a good start, i will try that first!
I think the idea of altering the stored balance point is a good start, i will try that first!
link to my youtube channel under my avatar!
Who is online
Users browsing this forum: No registered users and 5 guests