Dewb / CosmicPraise

The BRC 2014 six o'clock keyhole installation - a 52' climbable steel tower covered in LEDs with a cosmic-ray-detecting spark chamber, covered in LEDs
http://douglasruuska.com/cosmic-praise
6 stars 5 forks source link

Wheel Simulator Not Incrementing Wheel_Position #19

Open dforegger opened 8 years ago

dforegger commented 8 years ago

It looks like the wheel_position is not getting updated running on linux-mint.

simulator/linux-mint16_64/gl_server layout/wheel.json mapping server address 10.0.0.32:7890 to channel 0 OPC: Listening on port 7890 OPC: Client connected from 127.0.0.1 OPC: Client closed connection

I modified dewb-wheelSpinEffect to print wheel_position, ie: def wheelSpinEffect(system, state): print state.wheel_position for pixel in system:

...

The result:

python client/python/wheel.py -l layout/wheel.json -f 60 --sim -i WARNING: python-rtmidi not found, MIDI event input will not be available. Listening for OSC messages on port 7000 Client 0 at 127.0.0.1:7890 protocol opc on channel 0 *\ sending pixels forever (control-c to exit)... Press ENTER to cycle effects Running effect dewb-demoEffect Running effect dewb-alignTestEffect Running effect dewb-anotherSimpleExampleEffect Running effect dewb-demoEffect Running effect dewb-radialExampleEffect Running effect dewb-simpleExampleEffect Running effect dewb-wheelSpinEffect 0.0 0.0 0.0 0.0 0.0

(Some output whitespace modified for github formatting)

If you don't have any ideas offhand I'll take a look tonight at the source to try to debug it. Thanks! ~DF

Dewb commented 8 years ago

Wheel speed defaults to 0. You can send an OSC message like /wheel/speed 0.3 to port 7000 to start it spinning, but that doesn't make it super easy to simulate. The default should have been nonzero for easier simulation, but I didn't want to make physical setup confusing. I'll think about this a bit.

In the meantime, you can just change line 99 in wheel.py to something other than zero to see the wheel spinning in simulation. Sorry for the confusion!

dforegger commented 8 years ago

Thanks! I assumed the /wheel/speed was being used elsewhere but couldn't find it. I've got it working by adding a param to the options that only works if --sim is used. It then sends a message with the speed when the simulator is started. I'll clean it up and send a pull request later tonight.