Servers by jDrones

Steering Boat Not following the Waypoint exactly? Heading angle error too big

pixhawk
mission-planner

(rmackay9) #21

Yu_Chen,

Rover-3.4.2 is the latest official/stable version so I think it is best to stick with this until the vehicle is working well. 3.5.0 has started beta testing but by moving to it you would be potentially exposing yourself to software issues with the new version. When we hit issues it would muddy the waters - we would wonder, “is it a configuration issue or is it a software bug?”


(Yu Chen) #22

I see it, will stick to the old version which is more reliable. thanks! :slight_smile:


(Yu Chen) #23

Hi Randy, and David, @rmackay9 @David_Boulanger

I tried to adjust the position of the external GPS and compass to the center of gravity by changing the offset, as its hard to change the design of the boat. Some other info about the boat: the model of the ESC is Airbot Wraith32 Plus, and the motor provided is from a company’s official supply,(the model is BlueRobotics T200-Thruster-R1) where they also provided the hull for us. We need to mount the control system by ourselves in order to get it autonomous, that’s why we choose pixhawk and ardurover, trying to achieve it.
As you suggested, I modified the parameters in the ArduRover, and here is the current setting:

For this test, I mainly observed the manual and acro mode. Here are some behaviors of the boat which it’s hard for me to understand:

  1. In manual mode, generally it works very well. But when I turn the steering stick to the most right, the circle it makes is bigger than that when I turn the steering stick to the most left. Below is how it looks like:
  2. In Acro mode, it also happens that when I turn the steering stick to the most right, the circle it makes is much more bigger than that when I turn the steering stick to the most left. Below is how it looks like:

And sometimes it seems that I do not move the stick at all, the boat will move automatically to draw big circle(to the right side) by itself in Acro mode. That is really strange.
Here I attached the log for your info:

log 000011.bin: purely manual mode, to make the boat turn right/left by controlling the steering stick only
log 000012.bin: manual and acro mode. Sometimes in acro mode, the boat will drive itself even though I did nothing to the controlling stick.
log 000013.bin: mostly in testing the acro mode. Can see the big right turning circle and small left turning circle.

Here I also attached my RC configuration, it this range correct?

As I observe this strange behavior, and also in acro mode, when I change the mask to “steering” to observe the pid, the desired pid is always zero… and when I went back to see the log, the desired turn rate is also zero… So how could I tune the rate in acro mode? I would appreciate any help and direction about it. Thank you!


(David Boulanger) #24

Your ATC_STR_RAT_FF should not be 0. The throttle range of 1300 - 1700 could be right. I don’t know about your ESC’s. Although a range of 1100 - 1900 is more typical.


(David Boulanger) #25

@Yu_Chen. I just looked up you ESC’s. What is the reason for having your throttle range from 1300 - 1700? That’s only ± 200. And then if you take 70% of that because of your throttle max you only have ± 140 PWM working your motors.


(Yu Chen) #26

Hi David, thanks for the input, here is my thoughts:

  1. Your ATC_STR_RAT_FF should not be 0.

I understand ATC_STR_RAT_FF is important, but is tuned based on the actual turn rate & turn rate desire I guess. However, the value of turn rate desired is just zero all the way. So I am not sure how to tune in in the current stage. :frowning:

  1. The throttle range of 1300 - 1700 could be right. I don’t know about your ESC’s. Although a range of 1100 - 1900 is more typical.
    I just looked up you ESC’s. What is the reason for having your throttle range from 1300 - 1700? That’s only ± 200. And then if you take 70% of that because of your throttle max you only have ± 140 PWM working your motors.

Could having a small throttle range from 1300-1700 protect the motor from over heating? I think that’s the initial reason that me and my friend to set it for such a range, just to make the motor safe. We didn’t expect it could cause other problems. Yep, but now it seems that the boat is running under power, so we should change it to the typical range 1100-1900? We will do it in the next experiment.

And what is my ESC’s pwm range?(if you get it) Sorry we are still exploring this mission planner interface and haven’t found it… Thanks!


(Yu Chen) #27

And one more thing David and Randy,
I look at the RC signal in the log 000011.bin in detail, and noticed that the right side motor’s RCIN & RCOUT seems working reasonably(in the 1st figure below). However, for the left side motor’s RCIN & RCOUT, it seems got things wrongly. The RCIN1(shown in red color in the 2nd figure below) do not have input. Could you please help me take a look at these two graph? Thank you!


(David Boulanger) #28

Your throttle max is designed to keep the boat from over heating the ESC’s if its needed. Its possible have such a small PWM range and then factoring in your throttle max is really hurting you I think. Regarding your log 11, I’ll look at it again, you need to remember RC1 IN should be steering and RC3 should be throttle ( I think ). RC1 and RC3 OUT are a combination of the 2 inputs when using differential steering. I think I’ve explained that properly. Please change your throttle range to 1100 - 1900 and set ATC_STR_RAT_FF to 1 and ATC_STR_RAT_P and I to .2 during your next test and see if you see an improvement.


(Yu Chen) #29

Hi David,

Thanks for the advice. I adjusted the parameters accordingly based on your input. I will definitely give it a try in the Acro mode, but now I noticed a problem in the manual mode ---- that the boat cannot go straight in manual mode if I run it in enough long time in a big pool. (I am not sure whether this is a root cause that the boat cannot function well in acro/steering mode?)

Below attached in the picture illustrate about this issue:
image

RC1_IN is controlled by the throttle stick, RC3_IN is controlled by the steering stick. Here I only control the throttle stick to make it go straight. The direction of RC1_OUT and RC3_OUT are different, because the left&right propellers are opposite(one clockwise, one counter clockwise) . Theoretically, if the boat goes straight, the two (average) values should be symmetric with respect to 1514, which is the default value if there is no signal. However, in this case, for the left motor: average value of RC1_OUT is 1232(as shown in the graph), so the difference = 1514-1232 = 282. For the right motor: average value of RC3_OUT is 1768, so 1768 - 1514 = 254. which means the left motor always gives more power when it moves forward, so it has a trend to turn right. There is a discrepancy between the left and right motors. Can I adjust some offset parameters to solve this problem? @David_Boulanger @rmackay9
Here I attached the log :slight_smile:


(David Boulanger) #30

I will take a look at the log later. I have counter rotating thrusters also but I chose to switch wire on one of the ESC’s so that the PWM OUT is high on both to go forward and low to go in reverse. I think it makes it easier ready my logs. At least for me. Its only a difference of 28 between the 2 thrusters so that doesn’t sound really bad and I don’t think 2 thrusters would ever be the exact same. If you get a chance post a parameter list of your current setup. Its easier for me than finding them in you log._