ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Copter: Loiter Turns should support circle radius, speed, yaw

Open rmackay9 opened this issue 12 years ago • 6 comments

Some requests from msk7-ripe transferred over from Issue #707.

Some more about desired circle WPs behavior. These WPs should have specific parameters 1 circle radius, 2 circle turns number (for loiter_turns) which should be non-integer value to allow circle leaving in any point, OR circle time for loiter_time

3 circling angular speed (signed degrees/sec to include direction), 4 circle YAW mode (do not change yaw or direct yaw to center, may be tangent and outside yaw directions). When AP sees circling WP in mission it should: 1 fly toward circle center at desired speed until reaching circle radius distance from it 2 start circling according to parameters 3 leave circle at desired turn/angle or desired time towards next WP

rmackay9 avatar Apr 16 '14 11:04 rmackay9

The official list of what Loiter Turns should accept is on this MAVLink page (search for LOITER_TURNS): https://pixhawk.ethz.ch/mavlink/

MAV_CMD_NAV_LOITER_TURNS Loiter around this MISSION for X turns Mission Param 1: Turns Mission Param 2: Empty Mission Param 3: Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise Mission Param 4: Desired yaw angle. Mission Param 5: Latitude Mission Param 6: Longitude Mission Param 7: Altitude

rmackay9 avatar Apr 16 '14 11:04 rmackay9

@rmackay9 I'm integrating Loiter_Turns on DroidPlanner and having this issue finished would be a big step to release the feature.

To have a good control via the UI the following parameters would be great:

  • Turns
  • Radius
  • Angular velocity (turn rate) - I think this is the correct parameter to define the rotation direction, as per math definitions.
  • Yaw Behavior (good but not necessary)

arthurbenemann avatar Jun 04 '14 00:06 arthurbenemann

I've taken an initial crack at changes to allow accepting the radius as part of the mission command. You can see the patches here. The changes are everything from "AP_Common: add LOWBYTE, HIGHBYTE macros". https://github.com/rmackay9/rmackay9-ardupilot/commits/loiter-turn-rad

It doesn't include changing the direction around the object (although this is possible) nor does it include changing the rate (not possible because of the limits on eeprom space).

rmackay9 avatar Jun 11 '14 07:06 rmackay9

I saw the parameter ArduPlane:WP_LOITER_RAD in the complete Parameter List. Is this the Value I can set in Mission Planner for the whole mission? I cant set the Radius per Loiter-WP? If not, should I create a new Issue? Our missions (with a plane) needs different Loiter Radiuses depending on geografical possibilities (within the mountains).

NiqueIt avatar Sep 23 '14 08:09 NiqueIt

Hello. I'm in the process of creating a functionality using cmd MAV_CMD_NAV_LOITER_TURNS. I would like implement 2 features, but I cannot get them working. First one, during the execution of this command, I wanted yaw to keep moving in the direction of the flight.

Mission Param #4 | Forward moving aircraft this sets exit xtrack location: 0 for center of loiter wp, 1 for exit location. Else, this is desired yaw angle |

Did not work, yaw is always directed towards the center of loiter wp

Second functionality, I would like to be able to define degrees of the loiter. For example when i set param1 (turns) 0.5f ( 180°) should fly only half of the circle. I would appreciate all help regarding those issue. Could someone confirm to me either those functionalities are possible to implement with the latest Arducopter?

Skalaw avatar Nov 14 '17 09:11 Skalaw

Hi, I had implemented what You're asking in my dev branch recently: https://github.com/bartek-g/ardupilot/tree/dev-0218 Introduced new parameters CIRCLE_REL_YAW and CIRCLE_ABS_YAW. First one takes [0,180] or [0,-180] vs the circle center, default being zero to match default attitude. Second one, permits fixed yaw, so let's say Your sensor will look in the direction assigned, though circling.

Also implemented fractional turns, but that's done for MAV_CMD_NAV_LOITER_TURNS only, utilized remaining 4 bits in eeprom per command, so You will be truncated at multiple of 1/16th, still you can do halves or quarters.

Will try apply to have those features merged, but cannot promise ETA.

bartek-g avatar Feb 12 '18 13:02 bartek-g