Copter-4.0.1-rc2 available for beta testing -- Critical Fix Included

@JoshW,

I wasn’t able to recreate the issue in which BATT_MONITOR parameter was reset to zero after upgrading from Copter-3.6 to 4.0 but from a look at the parameter conversion code I do see that in some cases it will set the type to zero. I’m wondering if you have a parameter file or log from before the upgrade that I could look at?

Sure thing, sent it over to you.

Since I haven’t done any night flying in a while, especially in cold weather, I calibrated my accels and took a test drive.

@Pedals2Paddles Thanks! I was able to change the diameter of the circle but don’t believe I was able to change the rate. Any chance this could be modified to change direction? I would almost prefer it started with no rotation and then a left or right stick would would determine direction and rate. I also noticed that on occasion it would lose yaw orientation. I am flying with spotlight so this is pretty easy to watch at night. Here is the log:

@rmackay9 I noticed a jump in yaw on takeoff which I had not seen before, and a change in yaw on quick decent, but this only happened twice that I could detect. We have a few inches of snow on the ground so was trying to get up in the air quickly.

It’s just a bit below freezing with about 6 mph winds, so just on the edge of uncomfortable. Foot warmers worked great, but note to self… my next laptop should not have a metal case. :wink:

You can change direction now. If you slow down to a stop and let go of the stick, you can then restart in either direction with the stick. It just won’t go past zero rate until you let go of the stick first.

You could set parameter CIRCLE_RATE for zero if you want it to start out not moving. It won’t move until you give it some left or right roll stick in either direction.

2 Likes

Today I did a test flight using the new circle mode and in principle I thought it didn’t work at all but I got used to the correct way to move the sticks I could see how amazing the new circle mode.

To understand how that flight mode works I did the following, in PosHold mode I raised the drone to a height of 10 meters and moved it away at a distance of 10 meters, then turned the yaw so that the copter’s nose points towards me, then activated The circle and copter flight mode starts to rotate counterclockwise, so we can see that the direction in which the sticks move takes on meaning.

3 Likes

The roll stick right/left will apply clockwise/counterclockwise rate adjustments respectively. Also, the pitch stick will pull the copter towards the center when you pull the stick towards you, and push the copter further away from the center when you push the stick away from you.

I need to get the wiki updates for this done asap!

2 Likes

If I am reading this correctly, then it seems backwards. If the copter is facing the center, it would need to lean forward to go closer to the center, and backwards to increase distance. This would be done by pitching forward/pushing stick away from you to get closer, and then pitching backward/pulling stick closer to you. That is how normal flight would would work, so why not match that when circling? Am I misunderstanding?

1 Like

I had the same thought, and I am pretty sure that the 3DR Solo implementation was stick forward moves you closer to the center, and stick backward moves farther away, increasing the radius of the circle.

2 Likes

The copter isn’t necessarily facing the center though. My logic was stick down is reducing the radius pulling it in. Stick up is increasing the radius pushing it out.

1 Like

The vehicle does start by facing the center though…

2 Likes

After updating from 4.0.0 to 4.0.1-rc2 the log files started to corrupt. I was able to reproduce it.
I downgraded back to 4.0.0 and log files are ok, then back to 4.0.1-rc2 and having corrupt logs.

This happens on Cube black.

See attached short 15 second corrupt log if it helps.
2 14.1.2020 11-20-04.bin.zip (15.7 KB)

Heres the error MissionPlanner gives:
image
Heres image of hexdump from beginning of the log bin:

This one is from 4.0.0 log, which is all fine:

*/ Only CUBE and peripherals powered (USB)

  1. I did a fresh install AC-> Plane -> AC 4.0.1-rc2.
  2. Logging works with default parameters.
  3. Apply custom parameters, still logging works.
  4. Reboot and check multiple times to verify that logs work.
  5. It works.

**/

  1. Power up fully with CANBUS ESC (Zubax Myxa) -> logging gets corrupted.
  2. Go back to only CUBE + peripherals powered (USB)(ESC powered off) -> new logs are still corrupted.

Could this issue be related to this commit @tridge

@rmackay9 I would like to know if in 4.0.1 will be merged the commits from @andyp1per relative to AP_Logger. In these commits, from what I know, are solved problems relative to dataflash logs on block based device.

Agree with Randy, it is facing the center at the beginning right? Perhaps one way to manage this is if I use Circle, I also use that switch to reverse the direction of my pitch stick. Seems a hack, but, seems more intuitive use of the mode in the long run - and I’m actually pretty excited you’ve implemented this at all!

@andyp1per 's fixes relate to flash-based storage devices (essentially).

SD-card logging is not flash-based - and I’m assuming that’s what’s going on on the CubeBlack

1 Like

@anbello, I’m afraid that @andyp1per’s logging reliability improvements did not make it into Copter-4.0.1 but I think it’s likely they will be included in 4.0.2.

1 Like

can you give me your full param list? I’d like to try to reproduce this

please also give me a non-corrupt log from 4.0.0 from your board
thanks!

First, thank you @Pedals2Paddles for your effort. This is a very powerful mode and am thankful to have it in my tool kit.

My use case is almost always pointing the camera or spotlight on the subject/area and then initiating circle mode. My thought was that by pulling the stick back I move away from the subject, and forward I am moving toward the subject all the while rotating around the subject, the center of the circle. Left/Right roll changes direction of the rotation including the ability to speed up or stop. In fact you could “arc” the subject (back and forth) as well.

I have successfully used circle mode on several SAR missions, but find a single direction/rate very limiting.

Here you go :slightly_smiling_face:

CUBE_UAVCAN_X4_MYXA.param (18.2 KB)

2020-01-14 13-37-12.zip (793.3 KB)

Additional info:
ESC UAVCAN nodeID values are from 20 to 23.