Gimbal POI feature

Hi there,

I’m looking for a gimbal feature with the following behaviour: Set a POI on the map where the camera should point to. If the spot is on the ground and the copter at a certain height the pitch of the gimbal should change while flying towards the spot and maintaining height. Is such a feature implemented in AP?

Thanks

Yes, it is. Please use ArduCopter 4.3.0-beta3 for better results.

Thanks! Sounds promising :+1: I’ ll check it out.
There is another observation I’ve made using a pan gimbal with 4.2.3: Between the various modes (RCTargetting, GPS) there seems to be a different scaling in the pan movement. Is there also something to expect with 4.3?

4.3 ads a lot of features and fixes many bugs. You will have to try it for yourself.

I’m testing with 4.3.0 beta4 and right now I’m missing yaw stabilisation. Seems there isn’t any stabilisation parameter as we had in the version before (MNTx_TILT/ROLL/YAW_STABILIZE). With tilt it just works. I’m using RC-targetting.

@rmackay9 can you help @rst?

Hi, I’ve moved this discussion to the Copter-4.3 category.

For yaw stabilization I think you’ll need to setup an auxiliary switch for “Mount Lock”. So for example set RC9_OPTION to 165 (“Mount_Lock”) and then you’ll find that one position of the switch causes the gimbal to maintain its earth frame heading while the other position leaves it pointing in the same direction as the vehicle.

If you could provide more details on the setup that would also help. For example, which gimbal are you using? Maybe provide an onboard log as well if possible…

:+1:
“Mount Lock” = 163 works.
I’m using a self designed servo gimbal with yaw and tilt.

2 questions now:

  • when the gimbal is turned 90° the tilt servo should act as roll compensation, how could that work?
    (- when setting a POI via MP no reaction is seen at the gimbal.)seemed to be a user error
    Both issues were observed while the copter was still disarmed.

here are now some observations from the flying field:

  • when in Auto Mode the Pan and Tilt correction works with POIs
  • when setting a POI via MP and flying in Loiter the tilt doesn’t show a reaction when flying towards a POI with height=0
  • the flying behaviour in Loiter aud Auto changed, actions seems more aggressive
  • after sending new waypoints there is an internal error reported which needed a restart to clear

Hi @R.S.T,

Txs again for testing.

Re “when the gimbal is turned 90° the tilt servo should act as roll compensation”, so this is only a 2-axis gimbal? I don’t think it will do this but I also don’t think it would do this in previous versions of AP either (e.g. 4.2.x or earlier) although there was a 3-axis transformation that I removed because (as far as I could see) it could never be used without causing other problems.

I think this is the first time you’re using AP’s gimbal (aka mount) controller right? It’s helpful for me to know which issues (if any) are new to 4.3 because it could affect when 4.3 becomes the stable version.

Re, “when setting a POI via MP and flying in Loiter the tilt doesn’t show a reaction when flying towards a POI with height=0”. I just tested this and wasn’t able to reproduce the problem. You’re using MP’s Data screen’s right-mouse-button menu’s “Point Camera Here” feature? My guess is that “0” is being interpreted as the current altitude. I think you’ll find if the vehicle climbs or descends the gimbal’s pitch is reacting.

Re, “Loiter aned Auto” behaviour changed… if you mean the way the vehicle flies is different between the two modes then you’re absolutely right. Loiter is a pilot controlled mode and allows more aggressive accelerations and decelerations while Auto mode is configured by default to use much lower maximum accelerations. Auto can be made more aggressive by changing some WPNAV_xx parameters.

Txs for the report on the internal error. This is from the Position Controller and we should resolve this. I think it can happen if you send two waypoints with exactly the same lat, lon and altitude.

I’m running a servo Pan-Tilt gimbal and had some hassle with unexpected behavior with previous AP versions :crazy_face:

but I got it to work as roll compensation when the pan was at an angle. Don’t know about the accuracy but looked quite well.

Yes, right mouse “Point camera here”. If “0” is current height would the values be relative? I would have expected +/-10 to be at +/-10m above/below takeoff level. But the dialog for entering the value could give some clarification :wink:
Anyway I could check that again the next days.

I meant that copter tunes work different. With 4.2.3 and earlier the copter had a behavior without overshoot, but smooth behavior in pitch and roll. To me it seems that the copter breaks hard if the deflected stick is brought back by just a fraction. Also in Auto the copter is alternating acceleration and braking several times before reaching a waypoint. This wasn’t the case with the former version.
Are there some changes in parameters(names), defaults which could cause these things?

Thank U 2

Hi @R.S.T,

but I got it to work as roll compensation when the pan was at an angle

OK, to be clear. Do you mean you have it working well in 4.3 now? or it was working in 4.2 but it is not working in 4.3?

There haven’t been any significant attitude or navigation controller changes between 4.2 and 4.3 so I don’t think they should fly differently in Loiter or Auto mode.

Thanks again for testing 4.3 and providing feedback!

Yes, it was working in versions < 4.3
Would be great to have it back again :slightly_smiling_face:

I didn’t have a look at the logs so far but I’ll check if there is something visible.

@R.S.T,

Thanks for the clarification.

OK, so for the pitch servo to be used to correct for the vehicle’s roll in some situations (e.g. when vehicle is rolled 90deg) I think we need to restore the more complex matrix calculation that I cut from the AP_Mount library. The calculation was only used when the “yaw stabilization” parameter was set which would lead to the gimbal always moving in earth-frame (e.g. it would never move with the vehicle) which was not what most users wanted (I think). … anyway, I think I can come up with a better than 4.2 version.

@rmackay9 thanks for your effort.
Would it be possible if “yaw stabilization” is set active that the gimbal would look towards a POI if set in Auto mode or by right click “point camera here” in eath-frame and when switching “mount lock” move it with the vehicle?

With the difference in attitude behaviour I couldn’t see a difference in PID parameters from now and then. But here are 2 flights in Auto, not the same path but still somehow comparable I would say. There is some significant difference in pitch and roll behaviour:
around 20°

around 7°

But this was flown using 4.1.4. So could you tell if there have been changes in the control algorythms since then?