So I have created an odometry algorithm and I take the values for “x” and “y” variables using rotational sensors (odom pods) and they show on the brain screen so I can check if they are accurate. However, when I launch the program the values change the second the program starts, and it doesn’tchange again. I am unsure if the values are changing and the brain is not showing them correctly, or if the algorithm is just completely wrong. It would much appreciate it if you guys can help. I have attached the program in a download link (leads to google drive).
I think your odometry is fine, but it looks like you only log the position on the screen once on line 122, which is why it’s not updating. If you want it to live update, you can put the log into the odometry loop to make it update with odometry.
Also side note, it looks like the wait(20, msec);
in usercontrol
isn’t inside the while loop, you probably want to fix that,