locked
Motor Accuracy - redux RRS feed

  • Question

  • About a year ago, I posted on the forums on problems controlling a Lego NXT motor accuractely.   I notice there have been couple of more posts in the intervening time (I've been off chasing other rainbows).   I've just returned to MRDS and am back to trying to control my robot with some degree of accuracy (Car style steering).   

     

    To get around the delay problem which seems unsolvable with RDS directly, I've implemented an NXT-G program that accepts a bluetooth message containing a specified rotation.   I use VPL's LegoBrickIOv2 to send the message.   The NXT-G program works properly in isolation.   The messages sent are correct (using Simple Dialog to watch the messages).   I am posting messages at approximately 1500ms (yes, 1.5 sec) intervals and I still find that I'm apparently either losing messages or somehow overdriving the brick.   I am using MRDS to drive two other motors simulateously using direct I/O.   (they also are restricted to commands every 1500 ms)  I've very surprised to find that I'm losing track of position (it's "correct" inside the program - it just is not consistent with the physical hardware). 

     

    I'm looking for ideas one what might be going on.  Suggestions appreciated.    I know that I can (will be forced to??) create BT messages on the brick to report the position of the encoders to try to synchronize the position of the hardware with the software.

     

     --Don

     

    Suggestion to MS - why not create a small on-brick program designed to coordinate with the built in commands that can manage the motors with much higher accuracy.  Also, provide some guidance on whether the brick is being overloaded.  --dwo

    Thursday, January 29, 2009 11:06 PM

Answers

  • Hi Don,

    In V1.0 of RDS there was a small program on the brick that the services communicated with. Then in V1.5 the services were changed to use the Bluetooth APIs published by LEGO. Perhaps we will go full circle and end up with a program on the brick. It has been discussed internally, but we are not planning to do so at the moment.

    As for the delay, it sounds very strange. You should be able to make changes faster than 1500ms. There is of course a Bluetooth delay due to the transmission time, but not that long.

    Trevor

     

    • Marked as answer by dwotx Thursday, February 5, 2009 3:24 PM
    Tuesday, February 3, 2009 8:22 PM

All replies

  • Hi Don,

    In V1.0 of RDS there was a small program on the brick that the services communicated with. Then in V1.5 the services were changed to use the Bluetooth APIs published by LEGO. Perhaps we will go full circle and end up with a program on the brick. It has been discussed internally, but we are not planning to do so at the moment.

    As for the delay, it sounds very strange. You should be able to make changes faster than 1500ms. There is of course a Bluetooth delay due to the transmission time, but not that long.

    Trevor

     

    • Marked as answer by dwotx Thursday, February 5, 2009 3:24 PM
    Tuesday, February 3, 2009 8:22 PM
  • Trevor,
    Thanks - glad to hear you are considering returning to a brick-side package at least.  
     --Don
    Thursday, February 5, 2009 3:26 PM