Controlling RGB value of Move controller

39 views
Skip to first unread message

Kieran Coulter

unread,
Mar 22, 2022, 10:05:22 PM3/22/22
to psm...@googlegroups.com
Hello,

I believe this is a longshot as most likely a stable light frequency is needed for PS Move tracking to work.
But I wanted to confirm - since it was not possible using the PSMove.me API provided by Sony themselves -
Is there any way to control RGB value of Move controller in a continuous fashion using psmove API? 
Something similar to a Philips Hue bulb. If possible some very nice projects could be created I think.

Thanks!

Alexander Nitsch

unread,
Mar 24, 2022, 4:35:21 AM3/24/22
to psm...@googlegroups.com
> I believe this is a longshot as most likely a stable light frequency is
> needed for PS Move tracking to work.
> But I wanted to confirm - since it was not possible using the PSMove.me API
> provided by Sony themselves -
> Is there any way to control RGB value of Move controller in a continuous
> fashion using psmove API?

You can use psmove_set_leds() to set any RGB triplet you want. See the
sources in examples/c/example.c for an interactive example of how to
change the red channel depending on how much the controller's trigger
button is pressed.

I am not exactly sure though what tracking has to do with it. If you are
asking whether tracking still works if you constantly change the color,
the answer is: it depends, but most likely not for all colors. The
controller needs to be initially registered for tracking to work. This
includes its current color. And even though there is some tolerance to
the color detection, deviating too much from the registered color will
break the tracking.

You could of course modify the tracker to mostly/only work with the
shape and luminance. But this will likely be less robust than the
current approach.

Thomas Perl

unread,
Mar 24, 2022, 1:21:32 PM3/24/22
to psm...@googlegroups.com
If you are just interested in the use case as an "Ambient Orb"[1] kind
of device, that works with psmove_set_leds() as Alexander mentioned.
In this case, the tracking is of course fully optional, and it doesn't
even need a camera if you don't need tracking. You need to call the
set LEDs regularly, as the controller will disable the light if it
doesn't regularly (~ once per second) get the color value transmitted.

I did have some local script at some point where I could start a long
compile process on my computer (let's say), and when the command
finished successfully, the controller would light up green and
vibrate, and if it failed, it would light up red and vibrate. Let the
computer run, take the (connected) Move controller with you (e.g. into
the living room) and when it's done, you will be notified). Slightly
reminiscent of the "pizza ready" thingies in Vapiano restaurants.

Since it's quite trivial to do this, and use cases vary (e.g. you
could monitor CI and if a build fails, it turns red, while it's good,
it stays green, and you put it in the center of the office, so that
everyone sees how CI is doing), there's no ready-made script, but yeah
you can treat a PS Move controller as a single RGB pixel easily.


HTH,
Thomas

[1] https://en.wikipedia.org/wiki/Ambient_device

Am Do., 24. März 2022 um 09:35 Uhr schrieb Alexander Nitsch
<nit...@ht.tu-berlin.de>:
> --
> You received this message because you are subscribed to the Google Groups "psmove" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to psmove+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/psmove/85e8f54e-4e99-d627-0f72-d3469ac7a68b%40ht.tu-berlin.de.

Kieran Coulter

unread,
Mar 24, 2022, 4:52:57 PM3/24/22
to psm...@googlegroups.com
This is great to know, and I like this idea of a build success/failure and CI status indicator, I will try it for fun!

For my main project, I can see that I should investigate how responsive this psmove_set_leds() method is in real-time compared to the Hue lights (which I find a bit slower to respond than a DMX light would be). Fortunately in this project, the Hue tracking is optional if I can achieve further sensor fusion with Kinect or Kinect 2 sensor data, but that data source can sometimes be problematic.

My goal is to map the color of the Hue controller light to the sound frequency generated, the modulation parameter, and/or the 3D spatialization of the connected audio object to each controller. It sounds like it is possible!

PS: You can see some brief description of the project from when I was a student, and now I will pick it up from the shelves again as I know better where I'd like to go with it:
https://cycling74.com/products/max-in-education



Kieran Coulter

unread,
Mar 31, 2022, 5:27:43 PM3/31/22
to psm...@googlegroups.com
Here is my report after building for Windows:

First, an error is returned when running
call scripts/visualc/build_msvc.bat 2019 x64

I worked around it by manually cloning these repos into the external subfolders, but it seems the script will need to be updated to meet github's change of policy as of January 11th, 2022.
hidapi must be cloned from latest release snapshot: https://github.com/libusb/hidapi/releases/tag/hidapi-0.11.2
I later also needed to manually clone PSEYEDriver to externals folder.

Also, I think the libusb patch to link to dynamic rather than static is out-of-date, the lines for MultiThreadedDebug and MultiThreaded are no longer in the same place in the current libusb repo, so the patch cannot apply for older VS versions. It would also be possible to add patches for VS2017 and VS2019.

Anyhow, I updated the Windows build script as far as VS2019 (I think VS2022) could also be added, aside from what I mentioned above, and issued a PR.  
Reply all
Reply to author
Forward
0 new messages