Shop OBEX P1 Docs P2 Docs Learn Events
"4 Paws" Running on Propeller & PropBASIC - Update: Ping code integration almos — Parallax Forums

"4 Paws" Running on Propeller & PropBASIC - Update: Ping code integration almos

Tony B.Tony B. Posts: 356
edited 2010-05-26 04:31 in Robotics
This is my latest robot and thought I would share it with the Robotics Forum.

Name: 4 Paws

Type: This robot is a 4 wheeled robot with 4 wheel drive with 4 wheel steering.

Chassis: 1/4 MDF (Medium Density Fiberboard)

Controller: MRS1, Parallax Propeller Robot Controller Board

Programming Language: PropBASIC (A great, FREE programming language!) http://forums.parallax.com/showthread.php?p=867134

Power: 2 - Trinity 3000mAh 7.2 batteries wired in Parallel

Motor/Wheels: 4 - Parallax 7.2v motor and wheel combos

Motor Controllers: 2 - Parallax HB-25

Steering Servos: 2 - Hitec HS-645MG Ultra Torque

Accessories: Lighted power switch, Wire terminal blocks, Fuse holder between battery and main power switch (5amp), Replaced HB-25 fuses with 3amp for motor stall protection, and various model airplane type ball joint ends and connecting rods (4-40)

I have attached pictures, code, and a video of 4 Paws' first run www.youtube.com/watch?v=1y2jqk_1-KU. It went smoothly as you can see in the video. Yes, it can turn to the right and go in reverse. After my last first run experience with the 7.2v motor and wheel combos, I kept the speeds low and did only left turns so it would be easy to catch if on the ground running did not match test stand running.

If you look at the code you will see that I am using 3 cogs to control the robot; Main, Motors, and Steering. I will most likely combine motors and steering when I begin adding pings, compass, GPS and other sensors. For better control and safety I need to work on a start up routine to safely initialize the HB-25 and then tell main it can continue to run. I’m just using pauses now.

I hope to do a lot of testing so I can improve the chassis and then make it available as a kit for those that may wish to build one or just the plans to build your own.

Hope you enjoy!

Tony

Post Edited (Tony B.) : 5/25/2010 8:50:35 PM GMT
640 x 480 - 231K
640 x 480 - 215K
640 x 480 - 226K
640 x 480 - 184K

Comments

  • ScopeScope Posts: 417
    edited 2010-03-29 01:11
    Wow! So nice!

    I could never do anything that well - great craftsmanship, cool concept, and you know how to make it all happen.

    Very cool - thanks for sharing the project - it's inspiring.
  • ercoerco Posts: 20,256
    edited 2010-03-29 01:16
    Tony: Great start! Nice photos and video. Love that 4-wheel steering. Compass & GPS; sounds like you have big plans for Four Paws. Keep us updated!

    Careful, or you'll be Project of the Week in no time!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • WhitWhit Posts: 4,191
    edited 2010-03-29 16:13
    I think it is a project of the week!

    Fantastic job Tony. You are really cranking the bots out! Great video and pictures.

    I need more time to play!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Martin_HMartin_H Posts: 4,051
    edited 2010-03-30 00:12
    That is really cool. I can see how four wheel steering and drive would be better than two wheel car style steering. But what advantages does it have over differential drive?
  • Tony B.Tony B. Posts: 356
    edited 2010-03-30 03:59
    Thanks again for the kind words everyone.··I'm glad you like it.· I think it is going to be a·great platform to grow and work with.
    Scope - I think you could easily build this robot.· Anyone who can imagine and build Scope Dawg has the right stuff.
    Erco & Whit - It means a lot to me to have you continually share encouraging words.· I really look forward to your comments and reflections and look for your names throughout the forum to see what you’re doing and saying. Thanks Guys!!
    Martin_H - You have asked an intriguing question which I will think more about, but here is my quick response.· Please note this robot was designed to run outside in many different types of terrain.· Such as might be found in a RoboMagellan competition.
    1.··· ·Four powered wheels to carry the weight of the robot.
    2.··· All four wheels contribute to moving the robot.· You’re not dragging a tail wheel that can sometimes get hung up in the grass or terrain when you’re running outside.
    3.··· In a turn all four wheels pull.· In Differential drive sometimes only one wheel pulls in a tight turn.
    4.··· With four wheel steering you can run a slant move.· That is the robot can run in a forward direction but at an angle to the right or left all the while keeping the nose of the robot pointed forward.· This allows for smoother object avoidance, less turning and I hope better course tracking (soon to be tested).
    I hope this gives you some ideas.
    Thanks again all for the encouragement.· I will keep you updated on the progress.·
    Also, I haven’t forgot about Banshee.· I’m trying to work the code out on reading 3 pings quickly calculating distances for object avoidance and then controlling motors.· It is proving to be quite a good challenge and man do I love a good challenge.
    Tony
  • ScopeScope Posts: 417
    edited 2010-03-31 15:59
    It seems like you could 'program in' a differential drive - fairly easy to figure out given the angle of the wheels, inside & outside radii, & constant wheel circumference.

    Also, if you used encoders, you could tell if or when wheels were slipping and compensate - electronic diff - sounds fun.
  • BeanBean Posts: 8,129
    edited 2010-03-31 17:27
    Tony,
    I'd like to make a couple comments on your code.

    In your "ON cmdnew = 1, 2, 3, 4, 5, 6, 7 GOTO FastFrwd, MediumFrwd, SlowFrwd, StopAll, SlowRevs, MediumRevs, FastRevs"
    You should have "GOSUB" instead of "GOTO", since they are subroutines. (You also won't need the "GOTO Main" lines then either).

    You can set the HUB variables to zero when you declare them. This will save some code space, since you won't need to set them to zero in code.

    cmddirspd HUB LONG = 0
    cmdstr HUB LONG = 0

    I can't wait to see it when you get the Pings working.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
  • Tony B.Tony B. Posts: 356
    edited 2010-03-31 18:56
    Bean,

    Thanks for reviewing the code for me. I was hoping you would. I see what I did with ON..GOSUB and ON..GOTO. I read that GOSUB was obsolete in the syntax manual above and just ignored the page on ON..GOSUB. I will be making the changes.

    I think adding the ping sensor to this robot and code will be straight forward (famous last words). I hope to have it roaming on a ping sensor mounted on a servo by next week. This also includes rewriting the Main control code, adding Ping task, and incorporating an electronic differential(not as slick as Scope my be thinking), that is, the inside wheels in a turn need to turn slower than the outside wheels. I have all this worked out on a very similar robot that I may reveal this weekend that uses the BS2, Propeller Servo controller, and continuous rotational servos http://forums.parallax.com/showthread.php?p=902249. Just need to make the video and write it up.

    PropBASIC has really opened the doors for me with this robot and my other Stingray look alike, Banshee. Now that warmer temperatures are here, I can begin outside testing for both. Now when am I going to find time to write code?

    Thanks for the great software and constant help.

    Tony

    Post Edited (Tony B.) : 5/3/2010 6:14:01 PM GMT
  • Tony B.Tony B. Posts: 356
    edited 2010-05-03 18:22
    Well, I glad to have a day off because I now have the Ping sensor and servo added to 4 Paws.· Note the·ping mount is·made from scratch by me and is modeled·after the Prallax·one.· Also, I used thin metal just in case the robot runs under something maybe the mount will bend down and not hurt the ping sensor.
    I’m really enjoying working out the code in PropBASIC.· I am writing the code for the Ping to run in its own cog.· Unlike the motor and steering servo task which run in their own cogs and just listen for commands the Ping task must not only listen for commands but most communicate back as well.· This introduces a fun challenge working with a multi-core chip like the Propeller.
    I will post the code when complete.
    Outdoor tests in the grass·using the same code as in the video above have gone well and shows great potential.· I am very pleased with the test runs!
    PropBASIC is available here http://forums.parallax.com/showthread.php?p=867134
    Tony

    Post Edited (Tony B.) : 5/3/2010 6:27:57 PM GMT
    640 x 480 - 181K
    640 x 480 - 153K
    640 x 480 - 172K
  • azclawsonazclawson Posts: 10
    edited 2010-05-08 02:15
    A few things:

    1. What is the base made from, and

    2. You mentioned that this was designed for Robomagellen, correct? Well I have some things that you might want to consider:

    a. Your wheels are slick. If your 'bot can't get traction on surfaces such as loose dirt and grass, 4wd won't help...

    b. Three points define a plane, not four. On rougher terrains, one of your wheels may lose contact with the ground and may mess up your navigation.

    All that being said, I love the distinctive, 4wd & steering of your robots! :-D

    -azclawson
  • azclawsonazclawson Posts: 10
    edited 2010-05-08 02:17
    Oops... XD Please disregard point (1.)...
  • Tony B.Tony B. Posts: 356
    edited 2010-05-11 02:36
    azclawson,

    Sorry for the delay in my response been working on the code for the ping and forgot to respond.

    As you noticed the base is made from 1/4 MDF. The wheels look slick in the pictures and video, but the blue is a semi-soft rubber. They have really good traction. They are the 7.2V Motor, Bracket and Wheel Kit by Parallax Item code 570-00070. They are also the same wheels and motors used on the Stingray.

    You’re right on the lost traction and tipping on rougher ground. I'm hoping to develop or purchase some form of wheel encoders, but that's down the road.

    Finally thanks for your kind words. I think it is pretty unique myself.

    Tony
  • Tony B.Tony B. Posts: 356
    edited 2010-05-25 18:10
    Tested my new PropBASIC·Ping Task and its communication with the Main program code last night.·· The new code reacts very quickly and I think it will work well on 4 Paws and my other Propeller powered robots (Banshee & Stingray).· My plan is to have the revised PropBASIC code for 4 Paws done in the next couple of days (a Minister's schedule can get changed in a moment)·and run some tests.· I will post pictures and video(s).· When done, I will be using 4 Cogs to run the robot.·

    Cog1: Main Program

    Cog2: Motor Control

    Cog3: Steering Control

    Cog4: Ping Sensor

    Once I have 4 Paws roaming without hitting anything or anyone I will move on to encoders (which I have) and navigation with compass and GPS.

    I really enjoy working with PropBASIC!· It's simple, powerful, easy to learn (especially if you know PBasic), and has great support on the forums from Bean, JonnyMac, and Brad C.· I hope Bean will have time to look over my code when done and see where I can make improvemnets.

    I love it when a plan comes together!

    Tony

    Post Edited (Tony B.) : 5/25/2010 8:52:31 PM GMT
  • ercoerco Posts: 20,256
    edited 2010-05-26 04:31
    Neat stuff, Tony! Do your wheels pivot enough to let the robot spin in place? That would be ~75-80 degrees probably, so probably not if you are direct driving with servos. Might be a neat future mod if you can't do it right now.

    Keep rollin', Pal!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.