Quote:
|
Originally Posted by Zalumaskov
I am basically trying to get the robot to keep note of its own (x,y) position then later go to a set (x,y).
To do the first part I think I must get some trig functions imported to do what
//pos_x += sin_int(heading) * dist;
//pos_y += cos_int(heading) * dist;
are supposed to do in robot_position()
Now to go to get to a set (x,y) I guess I must complete cmd_goto_waypoint(void). Can anyone help me with that? I lack PID knowledge.
|
im doing the same thing; for the sine table:
i took the angles (in degrees) and took every 8, calculated the sine (in excel, btw). then i took the sines, multiplied by 256 and rouded to the nearest whole number. then we put them into a table (array) in the code. then interpolate for the values in between the factors of 8.
(we calculated in excel, you're only off by 2-3% max)
~Stephanie
Team 1351
__________________
2004 Founding member and Arm leader, 2005 Lead programmer, 2006 Controls leader, 2007 Project Manager/President
Thanks for making FIRST such a great experience for me. I'm no longer on 1351, and I'm not currently planning to mentor team 97, but FIRST has meant so much in getting me to where I am now, in life and at MIT, class of 2011.
I met Billfred! He recognized me!
SVR 04: 11th seed - Highest Rookie Seed - Semifinalists w/ 1120 and 568 - GM Industrial Design Award
SVR 05: Semifinalists w/ 8 and 766
SVR 06: 6th seed - Quarterfinalists w/ 368 and 1072
Davis 06: 1st seed - Quarterfinalists w/ 649 and 100 - KPCB Entrepreneurship Award
SVR 07: 36th seed
David 07: 4th seed - Semifinalists w/ 1280 and 692 - Johnson and Johnson Sportsmanship Award