Servers by jDrones

Rover wants to reverse, even when waypoint is straight ahead

I’m having an issue I just can’t figure out and I’ve been fighting with it for a few days.

So I built this 4wd rover - https://i.imgur.com/v3OwEAb.jpg

I’ve got everything set up correctly. Skid steering, channels 1 and 3. Pixhawk, RTK GPS, 3dr GPS / Compass, individual ESC for each wheel. Everything works fine via remote control. Forward stick goes forward, steering works as expected, can change modes, etc

On mission planner everything looks right. The rover graphic matches orientation. It points forward, same direction it goes when I push stick up. But here is the problem - it wants to reverse to all waypoints. If I click directly behind the rover and select “fly to here” it will reverse straight. But if I select “fly to here” in front of rover it does a 180* turn and then travels away from the point.

I tried changing AHRS and compass orientation, but all that does it make mission planner think the rover is traveling sideways as I drive it around or give me compass variance errors.

I’ve tried reversing both servo channels and the throttle radio channel, but I still get the same behavior.

I just don’t get it. There must be some parameter that I’m overlooking, or some heading set wrong. I’ve scanned through the whole parameter list but I don’t see anything. Maybe the issue is mission planner, any way to rotate the rover icon around 180 degrees?

I recall something about do_set_reverse but when I search parameters nothing comes up.

Any advice would be fantastic. Thanks

Nice rover. Can you post a log? What type of GPS antenna is that?

Do you have any servo reversing turned on? Both in Mission Planner and on your physical transmitter? That hosed me for a while. I had throttle reversed so my rover would drive forward in manual mode but in auto mode it was commanding throttle in the opposite direction.

Here’s some documentation I made of my experience getting the wheels to turn the right way when I was setting things up the first time:

Thanks. I spent a good amount of time doing everything “right”, normally I just zip tie some stuff together and call it a day, having a nice solid robot which just won’t respond to a seemingly simply request is getting frustrating.

The antenna is the Alpha / Polaris GNSS L1 / L2 survey antenna sold here - https://www.polaris-gnss.com/shop-product-fullwidth/Orange-Office-Chair?previous_url_id=1 I tested it against the u-blog GNSS waterproof antenna and it seemed to get an extra satellite or two. And it looks cooler. But mostly I like the simplicity of making my own 3d printed mounts around a big bolt.

I pulled the SD card out of the pixhawk for the first time to get a log but it was empty. That explains the logging error I was getting I guess. I’ll try another run tomorrow with a simple log where I know what I tried and what it did.

I really appreciate the reply, too. Thanks

Heres a few more pics of the internals - https://imgur.com/IiS5a28 and this one shows the home-made 18650 batteries https://imgur.com/uz6OX33 and here are the wheel parts I made to fit the cheap hoverboard hub motors with replaceable TPU “tires” - https://imgur.com/zNmFOhv

@MisterMower - I did have servo reversing enabled, but I started to suspect that was causing my issues so I made sure no channels were reversed and re-programmed the ESCs so it moves forward with a positive PWM signal and backwards with negative. I also made sure the transmitter channels aren’t reversed. I do however have the RCMAP settings changed so that right stick is throttle and left stick is steering. Any chance that could be causing issues?

I also found the do_set_reverse command I was remembering…it’s a command in the flight planner, not in the parameters. I wasn’t able to totally understand how it works, but it does seem like setting it changes behavior. It might be the issue. Does anyone know if do_set_reverse is remembered after its called? Even after an reboot, arm/disarm and such?

Thanks again guys

Someone more knowledgeable than me can probably give you a more definitive answer, but I think that do set reverse command will persist until you program a new mission.

If you had both the do set reverse command in your mission and your servos were reversed, that could be a problem, too.

I wouldn’t think your RC map settings would affect it, those are just controlling what joysticks are assigned to which command I think.

There are a lot of places things can get screwy. I ended up resetting my parameters to default and rewiring everything from scratch to get things working right. Sounds like a lot of work, but if more than one setting or wire is wrong, you may never be able to easily isolate the problem.

That’s my two cents, anyway. Troubleshooting stinks, but you learn a lot!

Also, sweet build! What kind of deck motor are you using?

I don’t recall actually calling the do_set_reverse before I started noticing the weird behavior, but I’m not very experienced with mission planner so it’s possible I did while just playing around.

Now that I have something to focus on some of my optimism has returned. The whole build was generally going smoothly, right up until I put it into auto mode for the first time and it reversed into a concrete wall at full speed. I’ve since software limited the motor RPM because it was too fast for me to even react.

The blade motor on this bot is taken from a 40v ryobi mower. Interestingly it works pretty good on 7s lithium.

I got logging working, SD card wasn’t fully inserted. I tried playing around with do_set_reverse but I wasn’t able to get any reasonable behavior regardless of setting it to 0 (forward) or 1 (reverse).

The behavior is the same, it will reverse and stop if I put a point behind it, but anywhere else it turns and then travels away.

Here is a log file - https://drive.google.com/open?id=1B7xfJ-LrSuuq7tb-XUms0pjoH4Xx_pkB

It’s a .bin, hopefully that is the most useful format? Thanks for having a look

Servers by jDrones