4 Wheel Drive

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

4 Wheel Drive

Postby Jochi » Wed Feb 27, 2008 1:22 pm

Hi,

I have built my robot in a similar way to that of the Mapping robot in the book 'Maximum NXT'. So I have two motors driving two rear wheels, which then through gears also drive two front wheels.

This though causes issues as if I call rotateTo(x degrees) or rotate(x degrees) the robot doesn't turn the specified angle (it always under turns). Now this is because I have specified a track width of the distance between the two rear wheels, but this is not where the turning circles mid point is.

Does anybody know how to resolve this problem? I have tried changing the track width to various different values to no effect, and have also tried over compensating the angle to turn (i.e. specify 180 degrees when I want to turn just 90). However this still doesn't turn enough and if I put the angle higher than 180 the robot turns in the opposite direction as that is the shorter distance...

Loosing two wheels and replacing them with a flywheel isn't really practical for the robots size.

Any help would be greatly appreciated!

Thanks,
Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK

Postby gloomyandy » Wed Feb 27, 2008 1:34 pm

Seem to remember that for tracked vehicles you should use the diagonal distance as the wheelbase rather than the distance between the two parallel wheels. I suspect that a four wheel drive is the same...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4240
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby Jochi » Mon Mar 03, 2008 6:49 pm

Hi Andy,

Thanks for your reply. I have tried using that measurement but the results are the same :(

However if I set the track width to a high number like 24cm (the actual diagonal width is 16cm), the robot turns correctly (within reason). This is not the best solution but it will do for now.

If anyone can think of a better way round this problem please let me know!

Thanks,
Jochi
User avatar
Jochi
Novice
 
Posts: 26
Joined: Tue Nov 06, 2007 8:17 pm
Location: Guildford, UK


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff