+ Reply to Thread
Page 3 of 10 FirstFirst 1234567 ... LastLast
Results 41 to 60 of 187

Thread: Mecanum Wheeled Robot with Machine Vision

  1. #41

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Duane cool videos and project.

    Do mechanum wheels have any advantage over classic omni wheels? With four omni wheels you only drive two at a time to move forward or side to side. With these you drive all four which might give you more power?

  2. #42

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I think the biggest advantage is that you can use a standard chassis configuration. If omni wheels are arranged in an x rather that + then they drive just like mecanums.

    In the x configuration, the omni travels fastest at a 45 degrees (only two wheels turning) whereas the mecanum travels fastest straight ahead (all wheels turning).

  3. #43

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by Duane Degn View Post


    Tell me about it. I'm sure you know how much four powerful geared motors with encoders cost. Each one will probably cost as much as what I paid for this Rover 5 ($40). Even though they'd cost a bit, I'm seriously considering some more powerful motors with encoders.
    You can always get gearmotors make your own wheel encoders for cheap, Pal. A rite of passage IMHO!

  4. #44

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by Martin_H View Post
    Do mechanum wheels have any advantage over classic omni wheels? With four omni wheels you only drive two at a time to move forward or side to side. With these you drive all four which might give you more power?
    The main advantage of these it the cool factor. Though I also like "classic" omni wheels. I personally like the classic omni wheels when three are used. I think they just look cooler that way and to someone who's not familiar with omni wheels, the robot looks like it shouldn't be able to move. At best they think it will just spin in place.

    Here's a three wheeled omni wheeled bot I made a while back.



    I borrowed this picture from erco's Retrobot thread.

    I was able to attach the omni wheels without modifying the wheels at all. As I've mentioned several times, I had to drill the Vex mecanum wheeels to allow the Rover 5's axles to pass through the wheels and I also had to drill holes for the set screws.

    Quote Originally Posted by W9GFO View Post
    I think the biggest advantage is that you can use a standard chassis configuration. If omni wheels are arranged in an x rather that + then they drive just like mecanums.

    In the x configuration, the omni travels fastest at a 45 degrees (only two wheels turning) whereas the mecanum travels fastest straight ahead (all wheels turning).
    I think the fastest a three wheeled version can travel is also when a wheel is in line with the direction of travel. With three wheels there a three lines that allow the fastest motion. With a four wheeled omni bot there are only two lines that give the greatest speed. Not that I'd want to race my three wheeled bot against a one with four motors.

    Quote Originally Posted by erco View Post
    You can always get gearmotors make your own wheel encoders for cheap, Pal. A rite of passage IMHO!
    I'd really like the encoders to be attached to the motor's shaft to get maximum resolution of the motor/gearbox system. I haven't seen many motor/gearbox combos that give access to the motor shaft.

    I have added encoders to a Roboni-I robot. I attached the encoders (homemade, single channel) to the first gear after the motor's pinion. The Roboni-I's homemade encoders work well.

  5. #45

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I also like your idea of putting a breadboard on top of the protoboard. It's really flexible, although it can make a wiring headache.

  6. #46

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by Martin_H View Post
    I also like your idea of putting a breadboard on top of the protoboard. It's really flexible,
    Technically, it's on the bottom of the protoboard. The crystal socket keeps the bottom of the protoboard from being completely flat in the center area. The wires I soldered to each IO pin also poked through the bottom of the protoboard a bit. To keep these obstructions from interferring with the breadboard, I added a layer of popsicle sticks to raise the level of the breadboard above the solder on the back of the Protoboard. I also added a layer of hard clear plastic from a "clam shell" type package because as I added components to the breadboard, it was being pressed against the soldering joints underneath. The solder joints with the clipped ends of wires would cut through the foam tape on bottom of the breadboard and cause a short with the breadboard's metal clips. (This was a puzzling problem for a while since the shorts were intermittent.)

    I initially used the protoboard/breadboard combo on a BOE-Bot. At the time I didn't know there were breadboards this size for sale. The breadboard I'm using a larger breadboard I cut in half.

    Quote Originally Posted by Martin_H View Post
    although it can make a wiring headache.
    I have no idea what you're talking about.



    Things were getting a bit cramped so I added heat shrink tubing to the resistor leads. The heat shrink tubing really let me pack the items closer together.

    Here's another shot of the resistors that limit the current from the RC receiver to the Propeller (pins 0 - 5). I also used current limiting resistors with the encoders (pins 6 - 13). You can see I added a label with the pin numbers to the header.


    Here's the other header with the IO pin numbers labeled. These pins control the L298 chips. Each L298 chip needs eight diodes. The breadboard is starting to get a bit crowded.



    One power rail has 5V to power the RC receiver, encoders and L298 chips. The other power rail is connected to Vin (about 8V with freshly charged batteries). The only 3.3V device on the breadboard is the power on LED.

    Here's the side with the power headers. You can see I added male headers for the jumper and servo connections. There's also a female header to connect IO pins to the servo's signal pin.



    Here are a couple of shots that show the layers I mentioned.

    Click image for larger version

Name:	VexMecanumBreadboardLayers120228b.png
Views:	108
Size:	507.5 KB
ID:	90129

    Here's the "top" of the board with electrical tape to protect the wires from batteries that slide in and out past them.
    Click image for larger version

Name:	VexMecanumProtoboard120228a.png
Views:	131
Size:	115.3 KB
ID:	90130
    Under the tape are the wires that bring the IO pins out to the headers.
    Click image for larger version

Name:	VexMecanumProtoboard120228b.png
Views:	163
Size:	1.04 MB
ID:	90131
    I end up using this board a lot. I keep meaning to make another.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	VexMecanumBreadboard120228a.png‎
Views:	3764
Size:	1.49 MB
ID:	90113   Click image for larger version

Name:	VexMecanumBreadboard120228b.png‎
Views:	2729
Size:	1.38 MB
ID:	90114   Click image for larger version

Name:	VexMecanumBreadboard120228c.png‎
Views:	2875
Size:	1.39 MB
ID:	90115   Click image for larger version

Name:	VexMecanumBreadboard120228d.png‎
Views:	2550
Size:	888.0 KB
ID:	90127   Click image for larger version

Name:	VexMecanumBreadboardLayers120228a.png‎
Views:	2447
Size:	180.6 KB
ID:	90128  


  7. #47

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Dr. Frankenbot,

    a layer of popsicle sticks
    ...would be non-conductive fabrication risers...

    Excellent thread on this project! Well done!
    MOV OUTA, PEACE

    ... Rick


    I've stopped using programming languages with Garbage Collection, they keep deleting my source code!!

    "Forth is FUN!"

    Introduction to TACHYON Forth


    PropFORTH Wiki

  8. #48

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by mindrobots View Post
    Excellent thread on this project! Well done!
    Thanks Rick. It's nice to know people are watching my progress.

    I'm currently uploading a video showing off the new encoder algorithm. The encoders help a lot with control. YouTube says the video should be ready in 32 minutes. Stay tuned.

  9. #49

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Well, it turns out the key to getting the robot to turn in place was to not have the wheels fight themselves.

    Two of the wheels (front left and rear right) were turning the wrong direction to rotate the robot. The characteristics that allow a robot to travel sideways with mecanum wheels also allow the robot to remain stationary while all four wheels turn. Basically the left side was telling the robot to go right and the right side was trying to get the robot to go left. The net result was the robot stayed put, fast.

    The fix was changing a "0" to a "2" in one of the "if" statements.

    While this programming error kept the robot from turning in place, the robot had other problems from not knowing how fast each wheel was turning. Encoders to the rescue!

    Adding encoders made a huge difference! I added the following PID algorithm:

    Code:
    PUB Pid | localIndex, maxOut
      repeat while cnt - previousTime < dt
      'waitcnt(dt + cnt)
      previousTime += dt
      maxOut := 0
      repeat localIndex from 0 to _TotalWheels - 1 
        
        error[localIndex] := rampedWheelSpeed[localIndex] - bufferSpeed[localIndex]
        integral[localIndex] := integral[localIndex] + (error[localIndex] * dt)
        derivative[localIndex] := (error[localIndex] - previousError[localIndex]) / dt
        output[localIndex] := (Kp * error[localIndex]) + (Ki * integral[localIndex]) + (Kd * derivative[localIndex])
        if ||output[localIndex] > maxOut
          maxOut := ||output[localIndex]
        previousError[localIndex] := error[localIndex]
      if maxOut > _MaxSpeed
        repeat localIndex from 0 to _TotalWheels - 1
          output[localIndex] := (output[localIndex] * _MaxSpeed) / maxOut
          DriveSingle(localIndex, output[localIndex])
      else    
        repeat localIndex from 0 to _TotalWheels - 1
          DriveSingle(localIndex, output[localIndex])
    The above code was based on the PID pseudo code I found on Wikipedia. I used a Kp of 10 with Ki and Kd both remaining zero. With both Ki and Kd zero, I guess the code is just a proportional algorithm. I tried making Ki equal to one with Kd either one or zero. Both of these attempts at adding an integral component caused the motors to oscillate wildly.

    Edit (June 20, 2012): I revisted this PID method for a different project and realized the above code has some severe problems when using the Prop's integer math.

    I had neglected to scale the motor speeds in my earlier attempt. The code in my first attempt just limited the top speed of any motor to 1000 (the limit of Kye's PWM driver). My new code scales all motor speeds based on the speed of the fastest motor. For example if the fastest motor speed was computed to be 2000 then all motor speeds would be divided by 2. The scaling code is part of the above "Pid" method.

    So here's the video. The robot is looking pretty good in my opinion.



    So far, I'm really liking these Vex mecanum wheels. Thanks for the information about them erco.

    As I said in the video, now it's time to turn this radio controlled vehicle into a robot. I might start with some IR and ultrasound sensors since those are relatively easy to implement. I, of course, will need to add one of the machine vision options to this robot in order to live up to this threads title.
    Last edited by Duane Degn; 06-20-2012 at 06:46 AM. Reason: Added note about bad PID method.

  10. #50

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Much smoother in the new video. After you make it autonomous you should post a sideways figure 8 in Erco's challenge thread.

  11. #51

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Beauteous! Per Martin_H, show us a figure 8 slaloming around some dinner plates, even if you're manually driving it!

  12. #52

    Default Re: Mecanum Wheeled Robot with Machine Vision

    BTW, the bottom page has good mecanum drive info at http://d1pytrrjwm20z9.cloudfront.net...lSpecSheet.pdf

  13. #53

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by erco View Post
    Beauteous! Per Martin_H, show us a figure 8 slaloming around some dinner plates, even if you're manually driving it!
    I think this would show off its current weakness. The robot rc car can travel forward, back, side to side and at 45 degree angles just fine. I've noticed it still has trouble with angles that aren't multiples of 45 degrees. I think the encoder algorithm still needs some tweeking. To be honest, I'm surprised it works as well as it does.

    I had looked up PID on Wikipedia and translated the pseudo code they had there to Spin and it just worked (as long as it didn't try to add any I or D).

    I'm currently trying to merge the PWM code in with the encoder code in order to free up two cogs. I had planned to fiddle with the various encoder parameters later to try to get this rc car travel smoothly at all angles (in a single plan for now).

    I'll likely take a break from coding and drive around couple of plates.

  14. #54

    Default Re: Mecanum Wheeled Robot with Machine Vision

    It's rolling alot smoother now Duane. looks cool too.
    Show erco some love, and give it a spin around the plates...

    -Tommy

  15. #55

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Someone's gonna get fancy. First, they'll do it with lobster or other fancy food on the plates. Next, a piece of the food (drumstick or lamb chop) will overhang the circular plate and the robot will track perfectly around the non-circular combination...

  16. #56

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Quote Originally Posted by Ttailspin View Post
    It's rolling alot smoother now Duane. looks cool too.
    Show erco some love, and give it a spin around the plates...

    -Tommy
    Thanks Tommy. I'm really pleased to see how much the encoders helped. I was also pleased I could monitor all four quadrature encoders within a single cog.

    erco already knows I'm working on a figure 8 project. He knows my weak will is no match for his power of suggestion (I have a Roomba, Roboni-I, $4 ultrasound sensors and purple batteries to prove it). And for some reason my robot arm is calling out to me to use it.

    I am not going to drive the robot around the plates (with or without lobster) using remote control. I do have some pride. This will be an autonomous figure 8.

  17. #57

    Default Re: Mecanum Wheeled Robot with Machine Vision

    In preparation for the Parallax Expo, I'm trying to spruce up my Mecanum wheeled robot. Part of the beautification is to move the motor circuit off the breadboard.

    I'm using a couple of L298N breakout boards. I've added the Schottky diodes to one of the controllers so far.

    Here's a picure of the two boards.



    I drilled a couple of holes in the bottom of the Rover 5 so I can hold these boards in place with some standoffs. Here's a picture of the two boards set in place.



    The board with the diodes is on the left in this picture. Since the L298 chips never even got warm when I drove the robot, I'm hoping mounting them upside-down like this will be okay. Other mounting positions I can think of take up too much space. I suppose I could add a small fan to blow air past the chips if they get too warm mounted this way.

    I have some surface mount Schottky diodes. I'm thinking of using the smt diodes on the second board to see which type of mounting configuration I like more.

    I plan to use the Propeller Proto Boards I made at the beginning of this thread with this robot. I removed the SN754410 chips from the boards since I'll be using these L298N chips to control the motors.

    These Vex Mecanum wheels are so large, I'm thinking I may use the LED array on the robot after all. I had previously thought the array looked too bulky but with these larger wheels, it might look okay.

    I still hope to use some sort of machine vision with this robot and I thought it would be fun to use the LED array to output what the robot was "seeing".
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	L298NMotorControl120324a.png‎
Views:	4222
Size:	1.02 MB
ID:	90949   Click image for larger version

Name:	L298NMotorControl120324b.png‎
Views:	2266
Size:	1.20 MB
ID:	90950  

  18. #58

    Default Re: Mecanum Wheeled Robot with Machine Vision

    What schottky diodes did you use?
    Jim
    Last edited by RS_Jim; 04-08-2012 at 03:40 PM. Reason: Correct spelling

  19. #59

    Default Re: Mecanum Wheeled Robot with Machine Vision

    Jim,

    The through hole diodes are these from SparkFun. I purchased 100 so they were $0.12 each.

    The surface mount diodes I purchased from Digi-Key. Part number 641-1014-1-ND. I also purchased 100 of these so they were $0.147 each.

    As I mentioned in my earlier post, I liked the surface mount diodes much more than the through hole diodes. They were much easier to fit on the small board and actually made the soldering job easier.

    I also like using surface mount resistors and capacitors more than their through hole counter parts. The little 0603 resistors fit nicely between leads spaced 0.1" apart.
    Last edited by Duane Degn; 04-09-2012 at 09:56 PM. Reason: Added link to smt diodes.

  20. #60

    Default Re: Mecanum Wheeled Robot with Machine Vision

    I received an email asking about some of the specifics of this project.

    I prefer to answer the questions here so others can read my answers.

    I as asked to elaborate one the processor used.

    I'm using a Parallax Propeller as the processor for this project. The Propeller chips come mounted on Propeller Proto Boards. I usually buy five at a time.

    The normal Propeller Proto Boards need a Prop Plug to communicate with a PC. I've managed to burn out two different Prop Plugs so now I make my own by cutting the USB section out of a Propeller Proto Board USB. I buy these four at a time. I add header pins the remaining portion of the board so it behaves like a normal Propeller Proto Board. A PPB USB (buying four at a time) costs $10 less than buying a PPB (five at a time) plus a Prop Plug.

    I know I've posted pictures of my DIY Prop Plugs on the forum, and I'll post them again if requested.

    One PPB is used to read the encoders, control the motors and monitor the radio connection with the remote.

    A second PPB is used to read the video image and control the LED array. I think there are some details about these two boards (though out of date) in post #8.

    I'm no longer using the Mecanum wheels from SparkFun. I'm using the ones erco recommended from Vex.

    I am still using the Rover 5 platform from SparkFun.

    I was asked about using an Arduino with this setup. I'm pretty sure the Arduino couldn't read the four quadrature encoders and do much of anything else. The Propeller is a great microcontoller to use with this projects because of the many things happening at the same time. I can assign the various tasks to different cogs with one cog bringing the data gathered by the other cogs together and making decisions based on the data.

    I think an Arduino would just be in the way with this project.

    Here's one of the places to find more information about the Propeller.

    I'm presently working on a remote to use with my various robot projects. This project, the hexapod project and some others will be updated once I have the remote working correctly.

+ Reply to Thread

Similar Threads

  1. Machine Vision 101 / Taos TSL1401
    By Brian_B in forum Sensors
    Replies: 19
    Last Post: 03-02-2010, 11:33 PM
  2. Machine Vision
    By Eric R in forum General Discussion
    Replies: 5
    Last Post: 11-13-2009, 12:26 AM
  3. Machine vision...
    By RinksCustoms in forum Propeller 1 Multicore Microcontroller
    Replies: 1
    Last Post: 08-14-2006, 07:27 AM
  4. Particular machine vision questions
    By Archiver in forum BASIC Stamps Archive
    Replies: 1
    Last Post: 11-11-2003, 02:36 AM
  5. Shaft encoders for wheeled robot?
    By Archiver in forum BASIC Stamps Archive
    Replies: 9
    Last Post: 03-23-2000, 10:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts