To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 1181
1180  |  1182
Subject: 
Multiple Motors/Synchronizing Movement
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sat, 22 Sep 2012 13:02:55 GMT
Viewed: 
20956 times
  
Hi all,

I'm only just now making the transition from RCX to NXT.  The power of the new
servos is really something.  For years I've "hard-coded" my own servo code to
couple a rotation sensor to a gearmotor to do setpoint-based positioning for
manipulators (pick and place robots).  That is to say, I have a task running for
each motor on the RCX, watching it's current position, and a variable (a
setpoint) of where I want the motor to be.  If there's a difference, the motor
moves and sets a flag when it's done.

I like to program these "drive" tasks so they run in the background, and my main
loop of code can just be a repetition of:

-Set the positions
-Tell it to go
-Wait for it to get there.

I want to do the same thing with NXT, but I want to go a step further.  Let's
say I have a 3-axis cartesian robot.  I know where I am (using the rotation
sensor block), and I can set a variable (a setpoint) for each of the 3 axes.
But now I want all 3 axes to move together so they all end up at the same
setpoint at the same time.

I figure I need to figure out what the error of each axis is (how far it is from
the setpoint), and let the motor that moves the furthest "drive" the other two
as slaves.  Divide the error of the other 2 motors by the error of the "drive"
motor and use that with the HiTechnic PID block.

Does any of this make sense?  Am I totally overcomplicating what I'm trying to
do?  Surely I can't be the first person to want two or three motors to arrive at
a destination at the same time.  :)

Thanks for any suggestions,

-Iain



Message has 3 Replies:
  Re: Multiple Motors/Synchronizing Movement
 
(...) That sounds like a sensible solution. Play well, Jacob (12 years ago, 24-Sep-12, to lugnet.robotics.nxt)
  Re: Multiple Motors/Synchronizing Movement
 
(...) I recently had a MOC where I wanted to do something similar (only 2 axes though). After spending a little while on it, I gave up, and just moved both axes at the same speed until both reached their target. Means they usually arrive at (...) (12 years ago, 9-Oct-12, to lugnet.robotics.nxt)
  Re: Multiple Motors/Synchronizing Movement
 
I got it to work, only almost a year late replying :) (URL) crickets in Lugnet, eh?) -Iain (11 years ago, 16-Nov-13, to lugnet.robotics.nxt)

4 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR