loading
 
Joystick is set at a constant value! I need different values!!
Les Fortner from United States  [15 posts]
16 year
Hello STeven, and all at Roborealm;
We have been in the process of building a bot and run into a slight snag using the RR software, and an Idea that would make RR so much easier to use with a joystick, but don't know if it is implemented and perhaps we're not going about it correctly, or perhaps, it can be implemented via an update/or manual script change..  The problem we are looking at stems from the use of a joystick..   Our Joystick comes via a Logitec Wireless Xbox1 controller...  Idealistically we'd like to control both drive motors of the bot via the two analog thumb sticks for forward and reverse, and use the D-pad as a way to control the Cam...  Here's where the snag first comes in, there is no control option for the second thumb stick in the software, which isn't the main concern as of yet... We have a value problem...  As the interface for the keyboard is SOO Smooth, as you input which value you want for what ever key you press..  Can't get much simpler than that..  When using a joystick however, the values are set through the software, with no option to change, and buttons are set at a value of 1, well that makes all buttons the same, and a control that is useless at driving motors or moving the cam..  If there were a simple way to set max values of each direction, or even translating the value to the device (instead of up being equal to 1, you could change it to being equal to the up value of your joystick i.e. 14000 or so...) The previous would be the most ideal, to set the joystick to the parameters that would want to control at a set limit, but the latter, changing the device to accept the joysticks parameters would also work...   I hope you understand what I'm writing in this wish list, and would like any help that could be given on the matter, thanks very much..  
Anonymous 16 year
Les,

Yes, what you're asking for is very common in RoboRealm. You often need to transform a value or values into other scales or used as triggers to create new values. The module you are looking for is the VBScript module which provides a basic scripting environment meant for those kinds of translations. It is a programming environment so you'll have to get comfortable with a little VBScript but what you're asking for does not sound too complex. Here are a couple of (untested) examples that may help you ...

To limit the joystick value contained in JOY_X and JOY_Y (you'd simply type these words into the Joystick GUI interface just below the Joystick graphic) and then follow that module with a VBScript module that would execute something like:

if GetVariable("JOY_X") > 1000 then SetVariable "JOY_X", 1000
if GetVariable("JOY_Y") > 1000 then SetVariable "JOY_Y", 1000

or to scale X into something smaller meant for servo values you could use

SetVariable "servo_x", (GetVariable("JOY_X") * 255) / 1000

assuming servo_x is the new servo value, 255 is the max servo value and 1000 is the max joystick X value ... Y would be done similarly. Note that this creates a new variable to be used in a control module to be sent to a motor/servo/etc.

You can also use it to trigger variable creation like

if GetVariable("BUTTON_1")  = 1 then
  SetVariable "servo_x", (GetVariable("JOY_X") * 255 ) / 1000
else
  SetVariable "servo_x", 128
end if

which would assume that BUTTON_1 is a variable typed into the Joystick GUI in the Button 1 textbox. This script would set servo_x to be the scaled joystick value ONLY when button 1 is pressed.

Hopefully this would give you enough to go on.

STeven.
RNA LABS
Les Fortner from United States  [15 posts]
16 year
Steven,

Thanks for the reply, the information was helpful, and things are progressing. I still could not figure out how to incorporate the second (right hand) joystick controller, on the XBOX1 Controller. I was wondering if this was possible with the way that the joystick module is set up, or if I am just missing something. I appreciate the help, and the software is indeed fantastic!

Great job RR Team, your hard work there is very appreciated!
Anonymous 16 year
Les,

Most likely we just did not have those interfaces on the Joystick module. We've now added two more, the Rudder and Rotation coordinates which we *think* are the values for the right hand joystick. Our joysticks (yes,we have a couple but not one for the XBox) uses the Rudder and Twist for the right joystick. Give the newest version a try ver 1.8.6.8 and see if moving the right joystick changes any of the values. If the rotation X mark moves please let us know as we've not been able to test that interface unit.

Thanks,
STeven.
RNA LABS
Les Fortner from United States  [15 posts]
16 year
Most Excellent, oh wise developers!

(Just a quick note, that the new version listed here, is not the version listed as download... )

Thank you very much, this is most helpful. I appreciate the work, and I am sure that many others appreciate your work as well! I am sure that your efforts here, have been a God send to many people, both garage developers, as well as serious students, and people all alround the world. Hang in there Steven, and the rest of the roborealm workers, it is improving everyday, because we all care!

Thank You, for what you do!!!
Anonymous 16 year
Les,

From all of RoboRealm, thanks very much for that note! We do appreciate the feedback and certainly intend to continue to push the technology as far and as fast as possible with the help of our users. So keep those comments/posts/features/recommendations/bugs/etc. coming!

:-)

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index