04-15-2009 10:56 AM
Hi All...
Apologies if this is re-hashing what I imagine could be an old topic or such, I've not been able to find it if so, hence the post.
I am trying to implement a PD controller for a wall follower application for the Lego Mindstorms NXT robots here using LabVIEW 8.5 and the Direct Command Tool sets... at the moment I'm using the Motor Unlimited VI to control Port B and Port C motors as the RHS and LHS motors of my robot. HOWEVER, things don't seem to be working... the robot seems to be continually veering to the LHS irrelevant of what inputs I give the motor... I've even tried hard-coding the power settings to 20% on both motors, which I would have expected to drive it in a straight line, but it still veers to the LHS!
So, I am trying to implement some form of more precise or better motor control using the Direct Command Toolset, and am wondering if people could point me in the right direction to start with... I've browsed a few of the discussions, and have seen mention of items such as NXTOutput & NXTOutputMulti Property Nodes, Turning Ratio vs Power Inputs to the Motors, SendDirectCommand.vi and the Fantom SDK, etc etc but am drawing a blank when it comes to finding much in the line of documentation for any of these... am I just looking in the wrong place or something?
I've attached the VI I'm currently toying with to run the motors... is there something obviously wrong maybe that I'm doing there either? I can't see an easy way of synchronising the 2 motors to start/move at the same time, even, which strikes me as being something common that people would want to do?
Anywise, Thanks for all the help I'm hoping to get ,
Mike.
11-16-2009 07:08 AM
Hi all,
i am having the same problem.
i built a car like model and my car doesnt go in a NXT straight line, it tands to go
to the left.
what can i do to make the car more precise?
i thought about the compass sensor from LEGO but labview dont have a model for
it in the tool kit.
does anyone have a suggestion?
11-18-2009 11:09 AM
11-19-2009 08:34 AM
hi mark,
thanks for the reply, by "property aligned" do you mean if they are in one line? if so than i am sure because the
built is symmetrical.
any idea how to fix this drift?
if i build a properly aligned wheeled car i am not suppose to get a drift?
itai.
11-22-2009 08:19 PM
In a perfect world your program would work... but alas it's not. Due to error in the building process, lego parts are rarely the same size, if ever. Because of this slight error your motors will not run at exactly the same speed causing the drift. One way to achive a perfectly straight line would be with a duel differental drive. There are many examples of this, i can not describe it accurately to you nor can i point you in the dierection of finfing one. I have seen them built with an NXT so i know they are there. I hope this helps.
Justin
11-25-2009 02:51 PM
hi again,
i wish to add a compass sensor from hitechnic to the robot car i am building
in order for it to go on a straight line.
is the compass sensor module in the labview toolkit? i know it have an NXT-G module.
itai.
11-30-2009 08:49 AM
What version of the LabVIEW NXT Toolkit are you using? The latest version, NXT Module 2009, does include a VI for the HiTechnic compass sensor.
05-04-2010 07:13 AM - edited 05-04-2010 07:16 AM
To Irish-XXX
You say that you're creating a wall follower (I presume you've created some kind of car that rides next to a wall, and follows that wall). If I would build this kind of car I should made one with the ultrasonic sensor on the left side of the car and then use the information of that sensor to control your left and right wheels. If the distance to the wall increases, the motor of the right wheel should turn faster and if the distance decreases the motor of the left wheel should turn faster. This can be controlled by some kind of PID-controller.
Is this an option for your problem?
To itaibd
Maybe a simple solution but have you ever tried to make your left motor turn slighty faster then the right one?
06-22-2010 11:34 PM
Use a close loop control algorithm to make your robot move straight. Do not just command the motor with direct signal. There are no 2 identical motors in the world, so you will still see this even when you use the most expensive motor
07-27-2010 09:06 AM
Hi , There is example in the nxt/example/motor/Straight_Line_PControl.vit
this takes the differece in the position of the encoders on each of the motors. Will this resolve your problem?