Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1
Send Topic Print
the 'M' motor speed command (Read 902 times)
admin
YaBB Administrator
*****




Posts: 3676
the 'M' motor speed command
01/26/08 at 8:11am
 
We received this support email about the 'M' command ...
 
>I tried to control the SRV-1 using the protocol commands. In order to  
>test the behaviour of the robot, i connected via telnet and typed the  
>M-Command 'M323200'. According to the documentation, the robot should  
>go forward indefinitely with 50% speed on each side. But in reality,  
>it only drives for approx. 100ms.  All other commands are fine.
>
>What's wrong with my M-command?
 
The 'M' command is different from most of the other commands, in that it is designed for control by an 8-bit binary interface rather than 7-bit ASCII terminal control.  So the SRV-1 recognized the M, then processed the '3' as 0x33, the '2' as 0x32, and the '3' as 0x33, and ignored the remaining characters.
 
The first '3' and '2' would produce left/right motor of 51% and 50% respectively (0x33 converts to 51 decimal, and 0x32 converts to 50 decimal), but the final '3' should produce a delay of 0x33 or 51 * 10 milliseconds = 0.51 seconds.  What you're looking for is an ASCII character that would generate a binary pattern of 0x00, but I don't think that's possible from the keyboard - control-@ might be the right character.  The largest delay you might get would come from the '~' character with a binary pattern of 0x7E, which would give you a delay of 1.26 seconds.
 
As a side note, you can see how all of the commands are represented as hex characters in SRV1Console's srv.config.  You can modify the default settings of the keys in this file.  Negative values are 2's complement format, so -1 is represented as FF, -32 as E0, -50 as CE, etc.
 
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1
Send Topic Print