ROS and the 3 second latch?



This is probably best for @gordonb or @wsnook but anyone who knows, please share.

Why do most of the actuators have a 3 second latch? The only one that doesn’t is the air_flush actuator. It latches on/off permanently. I could see this being a safety feature to prevent something like a heater from running all day but it makes the openag_ui manual controls super annoying. Having to press them every 3 seconds to try to test a sensor. Wooo!

Can this time be overridden?




it was intended as a safety feature, and I agree it does create some annoying surprises. We’ve gone back and forth over whether to remove it. After all, you could always unplug the thing. I think it’s worth some discussion here, if you care to give your view.


Thanks @gordonb!

Both of my PFC1s are up and running (configs here). I’ve got the docker booting and binding to PFC1 hardware with the exception of gc0011 which is WIP. I have openag_brain running using this configuration.

Right now I’m trying to test actuator impact on sensors. So run the heater core for 10 mins and see temp go up. It’s not super easy to do that when I have to submit manually every 3 seconds. I can, however, understand why the water refill pump on the PFC2 should not run unsupervised because it will make a heck of a mess.

Would it be possible to add an override parameter to the API that allows longer latch? Even a 10 minute latch would work for my tests. And it would be easy to put into the UI code. We should definitely keep a maximum of like 10 minutes to prevent the heater or water refill pump from doing damage but those two are the only ones that would be hazardous to the environment (not plants) I think.

What do you think?


ahh Actually I have all air sensors up. No water sensors up yet.


I think the UI should continue to poll the API while something is toggled, and not change the safety mechanism of the openag_brain/firmware.

This way, if someone closes a tab and forgets about their manual input things will just stop, instead of continuing to run unsupervised for n minutes.


I think that’s fine. I’m curious what artifacts @gordonb is seeing with the current approach. I’d have to assume that the ROS infrastructure polls the api as well.

I’ve not coded using Reflex, but it looks pretty straight forward. I can poke at it and see if I can build a polling module for binary_actuators.


Hmm taking a look at the code. It’s definitely possible to put a loop on the post action. It’s a little dirty but whatevs. My only concern now is I’m sending posts every second (or two) for each channel I wish to persist. It seems like the little RPI might get overwhelmed. Maybe we back the latch to 30 seconds to reduce command traffic to the pi and the already unstable arduino pairing.