T-Code Serial Controller v1.2
Added 2019-12-18 23:50:32 +0000 UTCThis is an update to the T-Code Serial Controller that addresses a previous issue with double-digit COM ports (ie COM10 and higher).
Downloadable file is attached.
Or else download link: https://mega.nz/#!xB0miaJR!OYVrnZnUAtJCXePGQqBPOtzhBqvxKMONYLufoY6ZYS8
Enjoy!
-----------------------------
The T-Code Serial Controller plugin allows direct control of an Arduino controlled robot sex toy (eg OSR3) via a USB serial connection. The Robot Sex Machine (RSM) is also supported.
There are three main parts:
- VaM plugin (.cs)
- Arduino sketch (.ino)
- VaM demo scene (.json)
The plugin communicates with the Arduino using a simple alphanumeric protocol called T-code, which is generic and intended for Arduino toy innovation. The plugin also supports the RSM, ie direct control of two servos via a Pololu Maestro servo controller.
The VaM plugin features:
- Serial port & Baud rate selection
- T-code/RSM mode selector
- 3 Axis output (up-down, forward-backward, roll left-right)
- Axis limit controls
- Axis trim
- Axis inverters
- Axis overrides
- Reference atom (Male) selection
- Target atom (Female) selection
- Target point (hip, head, hands) selection
- Automatic motion range tracking
- Range limit controls
- Lag inducer control
The Arduino sketch features:
- Self-contained T-code decoder
- Support for long and short form T-code commands
- 3 linear channels (L0,L1,L2)
- 2 vibration channels (V0,V1)
- Servo mixing setup for Open Stroker Robot 3-Axis (OSR3)
- Comments making it easy to use this sketch as a template for other applications.
Put simply, the above is everything you need to link your own Arduino controlled device to VaM.
The demo scene showcases serial output controlled by a hand animation.
The serial controller plugin is installed in the black sphere on the bed. You’ll have to open it to activate the serial connection. Also check that the target point is set to the right hand.
Comments
Time to get coding. You can say you aren’t a programmer, but then neither am I. This plugin is actually my first go at C#. Following up an idea is how you learn. :)
TempestVR
2020-01-23 19:59:00 +0000 UTCAfter a short search, it looks like After Effects has some of this type of motion tracking built in. The question then, is how to output the positional information.
TDK
2020-01-23 18:01:11 +0000 UTCI can't help but wonder if the same principle couldn't be a stand alone reader for 2D video...perhaps by assigning a stick figure skeleton to recorded points on the video, for instance 2 horizontal points across the pelvis or 2 points on top and bottom of a closed hand. The software would have to recognize those points as defining x,y and then translate the position to the bot. It might be possible to create a z position via perspective...meaning that the software records the distance across the initial point skeleton, then assumes z axis value according to wider = closer and narrower = farther away. Unfortunately, I'm not a programmer. So, this is just an idea of how it might be approached. I don't know if a program exists that might already be able to read these values. But, I can't help but think that something as simple as those goofy phone video apps that add spectacles or horns to a moving face, are already doing just that.
TDK
2020-01-23 17:50:37 +0000 UTCSomehow I completely missed that there were a ton of new features in addition to double digit COM ports, as I haven't had time to spend more than 5 minutes tinkering with VaM in over a month. *sheepish facepalm* I've been able to put the changes I added in to the v1 plugin into the new version (defaulting to RSM,9600 on COM5, and using StartSerial() at the end of the try before the exception catch for "load and go" zero setup functionality in any scene. I now see you also addressed two of the things I never got around to looking into. * A way to limit Z so it's not capable of moving to some crazy angle. Found where I can set a smaller default value, too. Thanks for that! * Adjusting Z so it's always centered around a value of 0 (Z Trim does the same thing on a per-scene basis) I had a few scenes where I had to disable Z because the values were, like, -58 to -52 instead of -3 to +3. Trim fixes that per scene. Great update, once I figured out that I didn't need to add the plugin to the guy (the old way) in the demo scene... *grin* That just caused there to be no output at all. /sigh
TomahawkJackson
2020-01-15 04:41:14 +0000 UTCOr else, swap the servo leads over should also work.
TempestVR
2019-12-19 19:52:23 +0000 UTCThe “Invert X axis” checkbox should do it?
TempestVR
2019-12-19 19:50:11 +0000 UTCThanks for the update, Tempest! Can you add a checkbox for inverted RSMs? Upright: // Calculate reference coordinate system refLineX = refB - refA; Inverted: // Calculate reference coordinate system refLineX = refA - refB; I just haven't been able to figure out the C# syntax to get it working with a checkbox and IF statement...
Jonathon Barton
2019-12-19 16:51:35 +0000 UTCthanks for the update
Clayfacer
2019-12-19 04:04:24 +0000 UTC