Can pivot turns be setup for non-skid-steer config rovers?

Have you spoken to the supplier about this? I have the VTLM800 mower on a boat to me at the moment and I have a cube orange and 2 x F9P GPS that I have been getting ready on a test platform. One of the reasons that I selected this supplier is that they seemed to have a better drive system than the other similar mowers available. 280USD for a 2nd motor controller + shipping is quite a steep price to pay to fix the problem which may be addressed by configuration of the controller?

1 Like

I did, they mentioned it was not possible to change the encoder to independent operation / skid steering, which is why I’m here.

Since you have the same mower on the way- this is the replacement motor driver I used for the plow / deck height:
https://www.amazon.com/dp/B07V692RFS

To start / stop the engine, I use:
https://www.amazon.com/dp/B08PBYRWVY

In case yours goes as quickly as mine did. I have some other mods I’m going to be doing to it, but dual F9P is one of them so let me know if you make progress there.

The surefire way to get skid steering with this is a second motor controller for sure. I will look into @kiwiPaul 's links a bit. I think however I might experiment with using a high end RC brushless ESC controller- and then examine the signals coming from the DB9 connection. I’m guessing these aren’t just DC brushless motors- they’re probably servo motors that know their position. It may be possible to hook the power up to an RC ESC, and the encoder leads to the flight controller like
Wheel Encoders — Rover documentation , I will try to find out.

Is there a place in the ardurover forums for specific chassis support? I might move this thread there then.

Thanks. I did order a spare “Function Extension HUB” but have quite a few Sabertooth motor controllers lying around if required.

Your mower has Micro Servo Motors https://vigorun.cn/8022.html

Mine has Servo motors Servo Motor – Vigorun Mower, Remote Mower, Remote Control Lawn Mower, Wireless Grass Cutter, Remote Mowing Tank, Remote Operated Slope Mower, Radio Control Mowing Robot

From the description of the servo motor controller I am surprised that they can’t configure the operation. Servo Motor Controller – Vigorun Mower, Remote Mower, Remote Control Lawn Mower, Wireless Grass Cutter, Remote Mowing Tank, Remote Operated Slope Mower, Radio Control Mowing Robot

Do you mind if I share this thread with my contact at Vigorun?

Please do- if someone over there knows of some hidden DIP switches that change the encoder operation… My rep said they tried autonomous operation but that rover was “not mature at present” and they gave up. Probably because of this!

Thanks for the links.

If any of the devs are interested in supporting this drive scheme, I can cooperate with testing.

Ok. I am a little annoyed now. I chose this mower as they said they designed their own controller and advertise on the web site "It supports various control interfaces, including external potentiometer (0-5V), RC (pulse width) model control, RS232, and CAN”. I assumed wrongly it seems that when it arrived if it did not work out of the box that I could get support to make it work the way I required.

Vigorun outright refuse to provide instructions to the control interfaces that they advertise, or any instructions for the controller. Looking closer at their web site you can see that they black out or remove any identifying marks on any components, down to the IC’s on the motor controller so they are either paranoid about somebody copying them or they have knocked off somebody elses design and trying to hide it. It would be interesting to see if they do this to the controllers they deliver. The descriptions on the web site are false advertising which I will deal with in due course however since my mower is still en-route I will park that for now.

The response I received was similar to yours regarding automation “We have tried it before, but according to the current situation, the time is not right yet. But we are also continuing. I will update you in time when we succeed in research and development. This matter is not as simple as imagined. It is very troublesome to open the protocol.”

It is very troublesome to open the protocol…

Assuming they have copied or re-badged another design I had a look around for something similar and although it is a very very long shot, it would be very interesting to see if the pinout of your controller matches this one:

BLDC Controller,Dual Channel Brushless Dc Motor Controller ,10-55V 50A,brushless Type KYDBL4850-2E - Buy Dual motor controller, bldc controller, Brushless dc motor controller Product on Jinan Keya Electronic Science and Technology Co., Ltd (dcmotorkeya.com)

The manual for this controller says that it can operate in Independant Mode and Mixed mode.

Manual here:
24V 48V 50A dual channel brushless servo controller China Manufacturer (keyaservo.com)

Now for a question to the coding\maths experts. Is it technically possible to, as kiwiPaul says “do some clever arduino mixing to straighten out the pwm” or do it in Lua something like this Enable Pivot Turn for Custom Rover Frame - ArduRover / Rover 4.0 - ArduPilot Discourse to make a motor controller with GroundSteering and Throttle interfaces drive correctly and do pivot turns with ardupilot configured for skid steering?

1 Like

@Paddy, yes should be possible, Lua is the right tool for this. The link above for the sawppy rover uses a custom Lua script to remap the rover steering and throttle output channels to something suited for that frame - so a custom mixer. It seems what you are after is something similar that mixes to a target of both motors in the same dir plus both motors in opposite dir. You could even set up the mix ratio as a user script parameter so you can tune the mix from a GCS.

Maybe we should add a lawnmower example to our Gazebo simulation environment. Seems to be a popular application of rover.

2 Likes

I would go down this route rather than messing with undocumented chinese motor controllers, I have dealt with a lot of them on ebikes and scooters and now i just fit a VESC 75100 in all of them. it just works. Just make sure to update the firmware before you use it, as they tend to ship them with really old firmware.

To it it up is very simple, it has wizards that auto detect your motor and inputs and sets it all up, the only thing you need to set is the battery current limits.

2 Likes

This is fairly common in China, where IP theft is rampant and there’s little in the way of recourse. I’m actually working on the firmware and support infra for a device that acts as a DC fuse block replacement (think BlueSea systems’ 12 position ATC fuse block), giving the user per-channel energy usage tracking and full automation control. If you don’t closely guard your designs and software, someone else will copy it, rebrand it, and re-release it as their own, beating you in volume.

I have to praise them for doing in-house engineering in such a risky environment. Aside from the poor quality integration board, the motor hardware and chassis seem pretty solid. Its good hardware… and quite cheap in the grand scheme of things.

Yeah, I’ll echo this. Look, I’m a fan of open source and open designs, but there is difficulty in opening interfaces for anyone to use.

It looks awfully close…

I will need to look into the Lua stuff, AND that VESC75100. Seems like there’s light at the end of this tunnel!

Thanks rys, this sound slike the best fix if there is no interest in building in support for pivot turns on GroundSteering and Throttle controllers.

I don’t have an issue at all with companies exercising their rights to not provide access to interfaces, however they then should not then advertise these interfaces as a ‘feature’ of their products which Vigorun have done and was a factor in my decision to buy their product.

I am not sure what happened with your integration board but I agree the motor hardware and chassis do look pretty solid and better than most similar designs available. This why I chose Vigorun. A quick look to replace the parts with similar\equivalent ones with better documentation and you come close to the mower price just for the drive.

The VESC75100 only seems to support hall sensors for the encoders so I am not sure this would work. The ideal replacement would be something like the one that I linked but is is quite expensive, much more than a 2nd Vigorun motor controller.

It sounds like you have some coding experience so ou may have success with the Lua option. If you do go down this path I have a small RTK + Yaw Rover with Sabertooth motor controller that I can switch between independent and speed+direction for testing.

OK, as a starting point on the lua script I asked Claude 3.5 Sonnet AI for assistance. Attached is the output. I would appreciate it if somebody could review this and advise if this is on the right track.

Ardupilot Steering Conversion Script R0.lua (2.1 KB)

1 Like

cool script. AI scripts way better than i do.
Is this the right track ? - Nope. Will it work - no idea.
I’d not go that way because -

  • complexity. Tuning is tricky, an extra layer of abstraction - no thanks.
  • not solving the problem - you are working around another.
  • go check this page - Tuning Pivot Turns — Rover documentation - check how many pivot parameters you will have to navigate. Your code seems to leave it to the chinese controller for rates, angles, angular accelleration…
  • not sure putting scripting into the critical control loop is wise. I’ve had no script performance issues, but if you did - then what outcome…
  • Failsafe - are these going to work.

Anything can be made to work - if it works easily, then excellent. My guess is you’ll be wishing for a simpler, supported config as soon as anything unexpected or unexplained happens.

VESC supports sensorless and a bunch of sensor options at least for BLDC. Im looking to add an AS5047 magnetic encoder, as the motors we recently recieved are without hall sensors. Its a bit of wiring, then a whole bunch of tuning… which may or may not solve my problem at hand.

I think @Paddy’s idea to use a lua script to basically convert the skid-steering output back into something the ESC understands is a good idea.

What’s there might work but I would recommend getting the steering and throttle values directly like this example script does.

2 Likes

I’m currently trying to work the math out in Java before writing the Lua, using the following test cases:

Example:

PIVOT_RIGHT(
  new SkidSteerLeftRight(MAX, MIN),
  new ThrottleAndSteering(MID, MAX)
),

MIN → lowest PWM value, or stick fully left / down.
MID → resting PWM value, or stick at center.
MAX → highest PWM value, or stick fully right / up.

In the above example, given that I want the left tread moving forward at max speed and right tread moving backward at max speed:

new SkidSteerLeftRight(MAX, MIN),

I should expect the resulting throttle and steering to be:
(throttle at rest, steering stick all the way to the right)

new ThrottleAndSteering(MID, MAX)

Conversely:

BOTH_MAX_FORWARD(
  new SkidSteerLeftRight(MAX, MAX),
  new ThrottleAndSteering(MAX, MID)
),

Given both left and right are full forward, the throttle should be full forward, the steering at rest. Etc.

Once I have all test cases passing I should have something approximating a mathematical solution to demixing. I hope =)

1 Like

@kazetsukai,

In case it helps, AP’s skid steering mixer is here. The saturation handling is the tricky part because AP allows changing the prioritisation of steering vs throttle. You could probably just ignore that though.

Am i missing something here? why are we trying to mix to skid steer output then unmix back to regular throttle and steering? why dont you just plug it into the regular throttle and steering output? it will still turn on the spot if you set it turning radius to zero should it not? we mix the outputs with boats and it works fine so it shouldn’t be an issue to just set it up as steering and throttle.

I think wp pivot angle also needs to be set for it to turn on the spot.

3 Likes

Hi @geofrancis,

That’s an interesting idea and I think you’re probably right… so basically setup both skid-steering and ackermann outputs (for steering and throttle) but only connect the ackermann outputs to the ESC/motors. AP will then think the frame can do skid-steering (which is true) and the ackermann steering outputs should actually work.

2 Likes

Interesting concept!

This is partially testable in SITL (and likely fully testable with a custom vehicle model I do not have the time/resources to create right now). Setting connected outputs to Throttle and GroundSteering while setting unused outputs to ThrottleLeft and ThrottleRight (leaving all other tuning values at their defaults/tuned values) results in a navigation behavior that ignores S-Curve nav for waypoints with course changes greater than WP_PIVOT_ANGLE. Unfortunately, the default SITL model just sits stationary after arriving at such waypoints, since the ground steering output alone doesn’t trigger SITL vehicle motion. I don’t think simply setting TURN_RADIUS=0 will do the trick, and I recommend setting it to a value tuned for vehicle performance.

Thus…on a vehicle like the OP’s, configuring as @rmackay9 suggests may well produce the desired result with no scripting or hardware changes. Ordinarily, I might call this a bug of sorts, but in this case, it’s a feature!

A word of caution: GroundSteering is not disabled when disarmed, so motor output will be possible in a disarmed state as soon as the autopilot is booted. So DO NOT issue RC steering commands while disarmed, or your vehicle will pivot!

4 Likes

A script to disable the steering when disarmed would probably be a good idea.

1 Like