well, i am designing a mini weapon station controller which will have handgun, stepper motor, IMU sensor connected with raspberry pi. this mini weapon station is supposed to be able to fit in both ugv and uavs and controlled remotely. Here once the operator sets the target the weapon is to be focused on the target no matter how much the uav changes its position and oriantation at any speed, which is read by imu sensor and than it should be adjusting the motor position accordingly. Since if the motors loose its focus from the target when ugv changes its position/oriantation rapidly while maneuvering i'm trying to approach hard real time control method on the system so that no matter how much the uav/ugv moves the weapon will be always target the target given by the operator even after the recoil so that the system will be very accurate and precise.
For instance could you clarify how you are planning to control the servos and the steppers.
-> i'm planning to control the motors using drivers like this,
https://www.pololu.com/product/2876 which is gpio based or this
https://www.elmomc.com/product/gold-twitter/ or similar driver which is ethernet/ethercat based.
My doubt is can the gpio based driver provide the hard real time features to the system? considering that i use xenomai patched linux to control it.