![]() |
Jaguar Input Values
I am programming a chunk of code to interface with tankdrive.vi and I need to know what the input range is on the axis values. I have already run over a mentor when I miscalculated the values so I need to know what the valid range is.
I need this to run somewhat slowly, so somewhere about 1/4 total speed is what I'm shooting for. |
Re: Jaguar Input Values
The inputs are -1 to 1. The joystick Y axes usually output -1 when pushed fully away from the driver and 1 when pulled towards the driver.
|
Re: Jaguar Input Values
Is +-1 the full speed value? How do I calculate intermediate speeds?
I notice that the joystick get command has a scaler of 127. What is this for? Thanks for the fast replies! |
Re: Jaguar Input Values
The HID value for the joysticks is a two byte value, typically between -32768 and 32767. That is converted to an single byte value -128 to 127 to communicate from the DS to the robot, and on the robot it is scaled from an integer byte into a single precision float. The float will go from -1 to +1 with multiples of 1/127 for the inbetween values.
Greg McKaskle |
Re: Jaguar Input Values
So I should pick a value from 1 to 127 then multiply it by 1/127 and/or -1 to achieve a properly scaled output factor? Can someone please post and example of the formatting of the corrected output number.
|
Re: Jaguar Input Values
Quote:
|
Re: Jaguar Input Values
Just realized i did that wrong. It is 1/256 increments. Anyway, that was just answering your question. the motor and RobotDrive blocks take in -1 to 1. So if you want 1/4 power forward, the value is?
Greg McKaskle |
| All times are GMT -5. The time now is 09:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi