loading

Joystick Driving

 Download the Joystick drive robofile.

  1. First double click on the Surveyor_SRV1b module in the processing pipeline. It may take a while to appear since it will immediately try to connect to the default SRV setting at 192.168.1.15. When it does appear change the IP address to the one you are using. If you do not know the IP address of the robot you will have to check your router information or see the Surveyor forum for more information.

    If you have already configured the SRV in a previous robofile then the IP address should already be configured for your robot assuming the "Remember as default" in the SRV GUI interface is set.

  2. Once you get the right IP address you should see the image from the SRV in the main RoboRealm GUI. From here double click on the Joystick module and select your joystick device in that GUI interface. If configured correctly you should see the gauges move in that interface in response to your joystick movements. You should also notice that the SRV is also moving based on your joystick commands with much better control than using the keyboard.

  3. The reason for the better control fidelity using the joystick rather than the keyboard is that the joystick position is scaled accordingly to the maximum motor range of the SRV. The joysticks produce movements from -1000 to 1000 whilst the SRV motors accept numbers from 0 to 255. In order to perform the needed scaling you need a VBScript module in the middle to create that appropriate mapping. In other words if the joystick value is -1000 that needs to change to 0, 0 as a joystick value needs to be 128, and 1000 as a joystick value needs to be 255 as an SRV value. See the embedded VBScript that performs this scaling function.

  4. Note that a speed of 128 is neutral (no movement) whilst 0 is all back and 255 is all forward.

  5. Note how the laser_variable is tied to button 5? Can you specify the appropriate variable in the SRV configuration to accept that value and power on the laser when the fire button is pressed?