Should my team use pid or ODOm to program our robot

hi im Ranchsauce2456 and our team wants to program our robot for autonomous. I read somewhere taht pid and ODOm are good for doing this. Which ones better?

… is a question I’ve heard many times from newer teams. So let’s have a crack at answering this question. (Spoiler: It’s neither!)

To first answer our question, let’s first take a look at what Odometry and PID actually are.

Odomometry (Shortened to Odom colloqually)

Odometry is some sort of system to keep track of a robot’s position on the field, as well as their heading. Similar to a GPS in a car, the algorithm for odometry should return the position of the robot at a given moment. This is important information for a robot’s program, as knowing this position could allow a program to determine what the robot’s next action is.

#Odometry Implementations

There are a couple different ways to implement odometry, dependant on a team’s needs.

Tracker wheels


(Image courtesy of technik) Position Tracking Wheels Mechanism - #16 by technik3k
Tracker wheels independent of powered wheels are used commonplace as a way to track position in X and Y. 2 tracker wheels with encoders attached to the bottom of a robot can track a position of a robot as a

One question at this point might be, “well, why not just use the integrated motor encoders”? While this may work in an ideal world, there are still physical issues with this integration, as wheel slippage may cause inaccuracies with odometry which have lead teams to develop this method instead.

Here are some good resources on wheel based odometry:

https://wiki.purduesigbots.com/software/odometry

The GPS Sensor

image
(Image Courtesy of the VEX KB)

The GPS Sensor acts as a plug and play odometry sensor. It requires a field strip to work, but is much more compact of a solution and easier to implement than wheel based odometry. However, it must be noted that one definently learns less from using a GPS sensor and the GPS is much more expensive. Similarly to wheel based odometry, you get a millimeter-accurate coordinate and heading for the robot’s position on the field if configured correctly.

Here’s an article on the GPS Sensor if you want to know more:
https://wiki.purduesigbots.com/vex-electronics/vex-sensors/smart-port-sensors/vex-gps-sensor

PID

PID is a motion control algorithm. It uses 3 different constants (hence the P, I, and D) to speed a robot and slow a robot down as it reaches a certain target position, so it may accurately get to a certain position. This not only can apply to robot drive trains, but also lifts which may require PIDs to slow down gradually instead of suddenly. Back before motor.stop() was available on all v5 programming platforms, PID was also used to hold lifts at a certain position…

… in fact, that’s what VEX’s built in algorithm for stopping the motor at a certain position uses: A PID algorithm (albeit, a bit modified).

For implementation specifics and such, please check out these resources below:

https://wiki.purduesigbots.com/software/control-algorithms/pid-controller

http://georgegillard.com/documents/2-introduction-to-pid-controllers

Conclusion

The main difference between PID and Odometry is that PID is a way of controlling the robot, while Odometry is a way of tracking a robot’s position. This makes comparing them a fruitless task, as it is comparing apples to oranges (no pun intended).

With this being said, the reason why PID and Odometry is mentioned so much is because both are usually used together to create an accurate autonomous program. Odometry tracks the position of the robot in the background during autonomous, and a script containing movements that use PID to direct the robot to certain coordinates while using information obtained by the odometry system as feedback.

Hope this post was helpful,

  • RanchSuace
36 Likes

… i think this is a little too hard… just gonna stick with time based for now

29 Likes

u should try using ez template i hear it makes the pids for you!!!

5 Likes

can some people use gps and odom to find their way to the game manual cos yeesh the questions some people ask nowadays :sweat_smile:

13 Likes

Haha so true brother. Amen :grinning_face_with_smiling_eyes::grinning_face_with_smiling_eyes::grinning_face_with_smiling_eyes:

2 Likes

all hail george gillard our god-king

3 Likes

I heard that poor pursuit (PP) is better. Whats the deal with that? What does it have to do with ranch?

This post CONFUSED ME to no end! How do i do PP!

Please update the post or delete it immedatley. I’m very upset very very upset.

I am bringing this to the attention of vex admins. A disgrace to the good name of the VEX Forum that we love and cherish on this blessed day.

HHHH

6 Likes

wait r these even legal to use I heard somewhere u can only use vex stater code on our robot and how many discs can our robot hold agan

8 Likes

hi bro, i lernd pushbuton code yestrdy, i put 2 on my bot, i nedd AI to teach god atonomos, i have tornamnt tmrw mrng, can u hlp me 2 lrn ai, plz?

4 Likes

I’m sending you to the ranch dimension.

4 Likes

hey, what’s the difference between RAMSETE and ODOm???

I’ve mastered pid so I think I’m ready for RAMSETE, but I heard ODOm might be better. any advice?

5 Likes

how do you make ur robor :skull: move? I cans not make it go brr. Also how many motor can you have on your robit again???

2 Likes

Starting to feel like this thread is losing it’s purpose. Come on guys…

1 Like

It never had a purpose in the first place

It’s more if a troll thread kinda

Also who flagged me

3 Likes

this is how you PP (!) and other SIMILAR ALGORITHMS https://github.com/jm-spencer/pathtracking

1 Like