Source code for PID controller routines?
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Source code for PID controller routines? Expand / Collapse
Author
Message
Posted Wednesday, August 18, 2010 12:48 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

I am writing some simply Python routines to control my Serializer so I can access it on Linux as well as Windows. Most of the stuff I can do just by calling the appropriate firmware command (e.g. pping(4) to get the Ping reading on pin 4). However, I now want to emulate your pidController commands such as Rotate() and TravelDistance(). Rather than reinvent the wheel (so to speak), I'm wondering if you would mind posting the source of your PID routines on the forum. Then I can just convert them to Python.

Thanks!
patrick

Post #1945
Posted Wednesday, August 18, 2010 1:38 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
Emulating the PID algorithms outside of the Serializer firmware would probably not work well at all.   This is because the algorithm is driving by microcontroller irqs created on encoder pulses.   You won't have access to these irqs, so how are you planning on driving your algorithm?  You can't just do it by looking at encoder distance values?

Best Regards,

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1947
Posted Thursday, August 19, 2010 9:05 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

Many thanks for your reply. I don't think I asked my question very well. I can use the mogo and digo firmware commands for moving a target speed and/or distance. But since there isn't a "rotate" firmware command, I was hoping to see how you map encoder ticks and wheel size into a certain rotation angle. Shouldn't be too hard to figure out but I thought if it was just a matter of copy-and-paste from your source, it would be easier just to ask.

--patrick

Post #1950
Posted Friday, August 20, 2010 1:40 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
The .NET lib uses the digo command to implement rotate for the PIDMotorController...It just spins the motors in opposite directions for a specified distance (which you'll have to figure out).   Bam! Done! LoL

Best Regards,

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1953
Posted Saturday, August 21, 2010 9:25 AM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Ah, thanks Jason! That shouldn't be too difficult even for me!
Post #1957
Posted Sunday, August 22, 2010 8:22 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
No problem!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com
Post #1961
Posted Thursday, May 03, 2012 7:55 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Thursday, May 03, 2012 7:50 AM
Posts: 1, Visits: 3
What is a PID algorithms? I searched for this but not getting any result.

grape seeds
Post #2228
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 5:46pm

Powered By InstantForum.NET v4.1.4 © 2013
Execution: 0.094. 10 queries. Compression Disabled.