In EasyC V4, there is holonomic block that works for a mecanum drive, however it is for a 4 motor drive and we have a 6 motor mecanum drive (the back wheels are powered by two motors each). What should we do?
You just have to add 2 more motor modules to your code that runs in the opposite direction of your back wheels.
Thank you, we did that and it worked. Now that we know the wheels work, we want to switch back to tank drive with a separate button for side movement, however when we tried that, the driving and strafing looked and sounded weak. The wheels twitched and did not spin at full speed.
You are having that problem because the motors are getting confused with your other drive functions. I do not know how to fix this. My teams programmer is the one who made the strafing work for us.
we had the same problem with our six motor mecanum
i was able to solve it by having 2 holonomic blocks from updated easy
don’t have computer with me will explain better tomorrow night if u still have problem
Yes we did that and solved the problem, however we are not used to those controls. We want to keep tank drive with a separate pair of buttons for strafing.
I don’t know easyC, but here’s how I’d do it in pseudo-code:
if(btnLeft OR btnRight is pressed){
strafe code
}
else{
holo code
}
//Andrew
assuming your strafe mode is in an independent state (or in a different code):
you’d first code a constant strafe by assigning a set of left constants and a set of right constants (or just invert the direction)
i don’t know how your motors are oriented, how your motors are plugged in, how your wheels are oriented, etc. so i’ll just giv the basic idea here:
FrontLeft=FWD
FrontRight=-FrontLeft
BackLeft=-FrontLeft
BackRight=-FrontRight
to prevent the “input confusion,” u can assign the inputs to variables before setting motors
if u end here, the code tht comes in the end will take priority (if u put the strafe input first, it’ll never strafe; if u put the strafe after the joystick input, and not attempt shortcuts like motor[X]=(button[L]-button[R])*127; it should work)
in this case, it’ll completely ignore the joystick inputs if the buttons are pressed
if u want to mix them, u can halve the strafe constants and add half of the left joystick inputs to the left motors and add half the right joystick inputs to the right motors (be sure the directions are adjusted accordingly)
the scaling doesn’t need to be 50:50, so u should mess around with tht to adjust how dominant the strafe should be
hope it helps
if i derped anywhere plz do tell me
[ATTACH]5659[/ATTACH]
How does this look?
if u’re ok with no joystick inputs (for driving) while strafing, sure
it should work fine so long as those values are what’s correct for your hardware setup
Thank you.
sorry didnt realize you wanted tank driving
i would agree with the overly complicated ways listed above because we spent like 3 days trying to do it and i just settled for using arcade
it seams like having an if just for strafe buttons is the way to go