|
|
Iain Hendry wrote:
> 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.
That sounds like a sensible solution.
Play well,
Jacob
--
Jacob's LEGO trains:
http://lego.sparre-andersen.dk/Transport/Tog/
|
|
|
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
|
|
|
Hi I'm trying to read direct command sent to NXT via Bluetooth (i.e. via
SetOutputState) in a NXC program.
the goal is to remote control an NXT robot with a mobile phone, having the
program direct access to the data sent to the robot.
i.e. I want to know the direction and speed of both motor sent to the robot.
is this possible or maybe I have to use other type of message?
thank you
Cristian
|
|
|
> you 4 have only 4 NXT
...I meant "you can have only 4 NXT" !!!
Philo
|
|
|
> I don't know what the numeric limit is, but there is a limit of some sort, as I
> heard that Monster Chess ran into it and the central computer has to continually
> set up and tear down connections to the 32 different pieces, it cannot be in
> constant contact with all of them at once. So the limit has to be less than 32,
> for sure.
>
> I vaguely recall mention of 7? Not sure.
>
> Hopefully Steve H or another MC builder will comment
As far as I know the only limit is that you 4 have only 4 NXT connected together
at one time, one master and three slaves. This explains why the Monster Chess
that contains at least 32 NXT must constantly make and break connections. But
you can have a much higher number of NXT operating in the same room (eg. the
Monster Chess) without problems. There can be many masters talking at the same
time to 3 slaves each. One thing I heard (didn't experiment myself), the
discovery phase can take a VERY long time if there are many BT devices in the
same room. But if the NXT know each other this is not an issue either.
Philo
|
|
|