Rover-3.4.0-rc1 released for beta testing!

Didn’t notice that. I would have to look at Mission Planner or the Wiki and see what that all means. I think its normal for this configuration because I did not enter those values and the boat works. Keep in mind the two thrusters work off the same PWM output of the Pixhawk 1.

@David_Boulanger,

It sounds like your boat uses the separate steering and throttle setup so what you have is correct. Presumably the two rudders rotate as well to provide the steering. It is possible in Rover-3.4 to use both skid-steering and regular steering on the same vehicle. So for example, it could adjust the speed of the two thrusters to provide additional turning which might be good at very low speeds or in a strong current. That hasn’t been tested though so I’m just throwing info out there. Probably not what you want/need.

txs again for the pics!

1 Like

@rmackay9.

Having skid steering for holding position and then regular steering for regular travel would be great. I did not know this was possible and I am glad to test it. Is this in the Wiki?

Hi David,

To enable using both skid-steering and regular steering, the two motors should be connected to separate outputs on the back of the flight controller. Then the appropriate SERVOx_FUNCTION should be set to “73” for the left motor and “74” for the right motor.

The servo output connected to the steering servo should be left at “26” for “Ground Steering”.

This combination isn’t documented exactly on the motor-and-servo-configuration wiki page but some info for each of the two types is there. It’s untested of course so it may not work but giving it a try and reporting back would be interesting. If it doesn’t work we can potentially try and fix it.

Hello rmacky9.
Randy I need your help. AR 3.4.0 I have a problem with a servo 3. The default setting is 70 throttle. The servo output is inactive. I manually change the KIN3 to become active. Could this change cause problems in auto mode? When it switches to auto mode does not start itself. It is necessary to manually determine the speed of the joystick. The car goes in the opposite (-180deg) direction from the set waypoint.

1 Like

Param list.param (11.7 KB)

https://drive.google.com/drive/folders/1DgI5x6mjv9Ljb8tM9SHWzEgVwFWXigw6?usp=sharing_eil&ts=5b277d0e

You’ve set SERVO3_FUNCTION to RCIN3, which means your servo 3 will ALWAYS follow your RC input, rather than being linked to the throttle.

Why did you change it from the default?

Given the proximity of the pixhawk to the ESC and motor, I would try it with COMPASS_USE2 set to 0 to disable the internal compass.

1 Like

I kinda remember a problem I had a few years ago where the boat was fine in manual mode but would steer the wrong way in assisted modes. I had to reverse the SERVOx output in the parameter list and then also in my transmitter. After that all was good IIRC. Not sure if the rover is turning wrong or throttling wrong. Could be a possibility.

1 Like

Krasimir,

Nice looking car.

The advice from @mroberts and @David_Boulanger is good I think. the SERVO3_FUNCTION should remain as “70” and then it’s likely that:

  • the channel 3 input needs to be reversed which can be done by changing RC3_REVERSED or it can be changed in the transmitter (most transmitters allow reversing the channel)
  • the SERVO3_REVERSED should be changed. It should be possible to test that the steering and throttle are moving in the correct direction using the mission planner’s motor’s page.

@rmackay9
@David_Boulanger
@mroberts
Thank you all! I changed SERVO OUTPUT 1 = Reverse. Now everything works perfectly. Thanks!!!

2 Likes

@rmackay9 Hi Randy, I think I’ve found a corner case in the acceleration limiting code:

// use previous desired speed as basis for accel limiting
float speed_prev = _desired_speed;

// if no recent calls to speed controller limit based on current speed
if (!speed_control_active()) {
    get_forward_speed(speed_prev);
}

// acceleration limit desired speed
float speed_change_max;
if (fabsf(desired_speed) < fabsf(_desired_speed) && is_positive(_throttle_decel_max)) {
    speed_change_max = _throttle_decel_max * dt;
} else {
    speed_change_max = _throttle_accel_max * dt;
}
return constrain_float(desired_speed, speed_prev - speed_change_max, speed_prev + speed_change_max);

You base the new desired speed on the previous desired speed. If you end up in a situation where the desired speed can’t be achieved, you can end up with the system getting “behind”.

It’s potentially worst with Rovers using brakes - if you pull back in ACRO, you end up commanding a negative speed, which will never be achieved but will apply the brakes (which is good). However, your desired will eventually drop to a substantial negative value. When you go to accelerate again, you’ll have to accelerate through all that “negative” speed, giving you a big lag.

You could get the same thing if you’re slowing down by just backing off throttle (in a boat for example) - your desired could drop well below your current speed, then it will have to ramp up before it actually response.

The same thing could happen if you were going up a hill - you give it throttle, and the desired ramps up above the current speed. If you try to decelerate (and you have a moderate decel rate) you wont actually slow down until your target speed drops back below your current speed.

I think the answer is to work out whether your current speed is closer to your new target speed than the “old” desired speed was, and if so, jump the previous target to your current speed.

based on the current code:

if desired_speed<current_speed && speed_prev>current_speed then  // decel below current speed 
    speed_prev=current_speed // bring "previous speed" down to current
    apply deceleration as normal to "speed_prev"

if desired_speed>current_speed && speed_prev<current_speed // accel above current speed
speed_prev=current_speed /// bring previous speed up to current speed
apply acceleration as normal to “speed_prev”

I’ll try to generate a log on Friday in SITL.

@mroberts,

Nice investigation. I think your suggestion sounds pretty good. A similar thing can happen during pivot turns if the ATC_RAT_ACC parameter is set too low actually.

I think if we implement this change, one thing we need to be careful of is sudden changes in the throttle output.

I just had a quick look at the AR_AttitudeControl::get_throttle_out_speed() and it looks like we’re not limiting the acceleration when the motors are hitting their upper or lower limits. If we did this it would probably reduce the problem in cases where we can’t reach the maximum speed even though the throttle is at 100% (or -100%).

@rmackay9 Regarding Boat Loiter; is there any possibility a new parameter could be added to allow specifying that the boat turns so the bow faces the WP rather than the least angle method used at the moment? Most boats prefer to face bow to the weather and have reduced maneuverability going aft, so this would be a fantastic thing to be able to specify.

Thanks again for all the amazing developments!

Russ,

Yes, that could be added relatively easily although I can’t immediately promise when it will be done. I’ve created an issue here for it.

2 Likes

Fantastic, thanks! It’s great to see rover advancing so quickly over the last few months.

1 Like

Hi,
I made videos of my “Drone Benchy”

Loiter Mode: https://youtu.be/UbM0OTlL_JE
Auto Mode:https://youtu.be/sw-9Mngs2cc

Enjoy!

1 Like

@RainFly,

Txs for the video, looking good! very cute boat and it moves pretty quickly for it’s size.

Hello Rainer. Can you give a picture of the boat’s control (steering) and the full list of parameters.Thanks.

@rmackay9
Hello Randy
I want to ask about a problem that happens to my boat with a loiter mode. After switching to loiter mode, the action is executed from 2 to 3 cycles for about 180 seconds, then goes to “sleep” a throttle. What is happening?