I'm using a cf2 and want to run a position control. I have seen this post:
https://www.bitcraze.io/2017/04/updated ... an-filter/
and im using the Client with the external tab. I have build a Stereo-System(2 PS-Eye) to track the copter and the kalman filter is giving me good estimations. (I send the external position-data with 5Hz) . Furthermore i changed the Kalman-Estimator. Now my Questions:
1) On the Flight-Tab we have the opstion for Position-Hold. How exactly can i use it and how do i set the Target-Position?
I have seen in the commander-cf-firmware that pitch and roll commands are used as position commands but it doesn't work for me. Where can I check my TargetPosition? I'm using a PS3-Controller with the PS3_Mode_3 Inputmap. Do i have to change something?
2) I have created a new tab where i send CF my Target Positions. For this i have added a new generic Command. This is how the setpoint implementation on the cf-firmware looks like:
Code: Select all
setpoint->mode.x = modeAbs; setpoint->mode.y = modeAbs; setpoint->mode.z = modeAbs; setpoint->mode.roll = modeDisable; setpoint->mode.pitch = modeDisable; setpoint->mode.yaw = modeAbs; setpoint->position.x = -values->x; setpoint->position.y = values->y; setpoint->position.z = values->z; setpoint->attitude.roll = 0; setpoint->attitude.pitch = 0; setpoint->attitude.yaw = 0; setpoint->thrust = 0;