Closed fisherds closed 5 years ago
I like it. @fisherds you should submit a pull request :)
I started on this one so will take it unless someone else is interested in working on it
@fisherds if you say drive in an arc to the left with a radius of 50cm
is the expectation that the outer wheel, inner wheel or midpoint between the two wheels creates a circle with a radius of 50cm?
Same basic question in regards to setting driving speed, are you specify the speed of the outer wheel, inner wheel or of the midpoint between the two wheels.
@dwalton76 I think the best plan is midpoint for all questions like that. Love that you are working on this idea!
I need to get back to this...got distracted by Rubik’s cube solving work this past month.
I am declaring my Rubik’s cube solver complete so should be able to get back to this and other ev3 related todos
Got distracted by life for a while....will pick this back up and finish it off
I think I have most of the code/math worked out in my MoveDifferential class but I am hitting a snag with trying to accurately rotate a large motor at an exact speed for an exact distance. Opened https://github.com/ev3dev/ev3dev/issues/1186 to investigate.
PS Apologies for being AWOL the past 6 months :(
This is just a potential feature request not a bug. (probably a duplicate of some other feature request but I didn't find it)
There are many EV3 Lego creations that are mobile robots (most EV3 designs have wheels or tracks actually). When doing the programming for a mobile robot, users need to convert motor degrees into distances and into whole robot turn amounts. Obviously we can do these conversions, but for new users it would be nice to provide a convenience class for EV3 mobile robots. My suggestion for a name is Driver, but it could be any name we like, DifferentialDrive, although more accurate, just felt too long.
Example usage:
import ev3dev.ev3 as ev3 robot_base = ev3.Driver(ev3.OUTPUT_B, ev3.OUTPUT_C, 3.3, 17)
Where the arguments are:
Once constructed users could use commands like:
These are not my ideas. I've used Clinton Blackmore's Enchanting program (https://www.youtube.com/watch?v=N9HZwysMqWY) for NXT with kids for years. It's an old Scratch based program from 2013 for NXT that he has not updated or maintained. His differential drive mechanism is extremely flexible, robust and easy to use. We use his driving commands with the old NXT robot fleet very heavily. It'd be useful if we provided a Driver class of some sort.
Obviously there are a lot of design decisions about the structure of such a class and there are issues with turning inaccuracies with tank treads instead of two wheels. Despite the concerns it'd be a highly used convenience class.
Here is Clinton's Scratch based configuration of differential drive
And some of this Scratch commands:
BTW I'm still sad that Clinton abandon his Enchanting project. He was an amazing developer. Funny that one guy could blow away anything Lego ever made for programming the NXT. Still works great today even, despite no updates since Enchanting v0.2 from 2014, I have a kids event on Saturday where we'll use Enchanting. http://enchanting.robotclub.ab.ca/