Help with adding a bumper switch as a safety backup

Hello,

I would like to add a bumper switch to my skidsteer rover which has 50 kg and most of the power converted to torque.I dont want it to harm any humans in case someone apears near and all my fancy sensors fail for one or another reason.I would like a simple endswitch to trigger some reversing routine but continue mission after some delay.I was thinking to add another arduino to alter servo outputs, but it would be better to do it within Pixhawk.

@AnJu, I think this could be done with Lua scripts using Rover-4.0.0. We have some documentation here on how to setup lua scripts although it’s still quite limited.

Wow, that looks like a whole new paralel world :grinning: .That might be quite a challenge for me, but there is a tutorial on how to add new bindings to lua, so that may help.Thank you rmackay9.

@AnJu, the only documentation we have at the moment is in the link above including some limited docs on adding new bindings near the bottom. Without adding bindings I think you could make a bumper disarm the vehicle but not make it backup (yet).

Thanks, if i add arduino i would simply modify PWM upon event. My skills are just about at a level to do that. I was able to modify some stuff back with old Ardupilot 2.4 within arduino ide, but i dont have an environment for modifying the code since Pixhawk.But i can see it would be well worth investing some time in that.Thanks for response. I have another question about nongps nav which i will post in proper theme.

1 Like

I have been playing with some lua samples on SITL.It really has potential.I am looking forward the AP_button binding to be properly included in the Rover by @IamPete1 .So @rmackay9 i hope for a new beta to have that included.

I haven’t installed such a system but rather only suggested it.
I would simply cut off power to the drive motors once the push bar switch is activated.
Or in the event that we are talking about a larger type of vehicle with some weight behind, I would go as far as short circuiting the drive motors in such an event as this would create an electric brake like effect.
On a petrol/diesel powered vehicle I would install a fuel solenoid shut off valve.
…I personally would stay clear of the control side of things for such an emergency stop system as this can lead to problems and delays as seen years ago with the Toyota Prius deaths that occured in the US.

1 Like

Yeah, i am tempted to implement some smart back up.But you are right the bump would mean that all the fancy stuf failed and is time to stop the machine.