Go to Post first robotics is a ten - Hiteak [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 03-01-2014, 21:05
GraysonDaly GraysonDaly is offline
Registered User
FRC #0095
 
Join Date: Jan 2014
Location: New Hampshire
Posts: 2
GraysonDaly is just really niceGraysonDaly is just really niceGraysonDaly is just really niceGraysonDaly is just really nice
Re: 95's Pre-season drive base done!

Hello I'm Grayson! On this project I helped out a little bit with a lot of different parts, including machining, CADing, and assembly. My main contribution was putting together most of the left (I think) drive pod and doing the chains (which took me longer than I care to admit )
  #17   Spotlight this post!  
Unread 03-01-2014, 21:37
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: 95's Pre-season drive base done!

As far as controlling that setup with a PID, I would use two separate PIDs for each side of the drive train, and control them via speed. Also, because you will be changing the setpoint a lot, I'd remove the derivative term from the equation, because that's just going to provide a large unintended movement every time you quickly move the joysticks.
Also, be sure to reset your integral term every time target speed = 0 and current speed = 0 (or close to it), or else after a bit of driving your robot, it will begin to overshoot your speed every time.
As far as gear changes go, I'd have it default to low gear and if speed >= n ft/s, shift to high gear, and change the PI controller values, and joystick_input_to_target_speed_conversion algorithm accordingly.

And that's not to say you can't use a position mode during autonomous, but for teleop, that becomes very weird because you need to integrate change in distance based on the joystick values, which will tend to lead to a lot of overshoot.
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
  #18   Spotlight this post!  
Unread 04-01-2014, 07:55
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: 95's Pre-season drive base done!

Actually, after thing about it, what I said probably would not work well at all, mainly because PID controllers don't work well when using speed as a set-point for something that isn't a flywheel.

However, you may be able to do something like this.(pardon my python-esque syntax, I'm not a C++ or Java programmer)
c is a constant set to make the robot not try to turn at say 13.5FPS at full turn.

if steering_axis_last != 0 AND steering_axis = 0
left_encoder.resetdistance()
right_encoder.resetdistance()
if steering_axis == 0:
left_error = ((left_encoder_distance + right_encoder_distance)/2 - left_encoder_distance) + (throttle_axis* robot_max_speed * dt)
right_error = ((left_encoder_distance + right_encoder_distance)/2 - right_encoder_distance) + (throttle_axis* robot_max_speed * dt)
else:
left_error = left_encoder_distance + (throttle_axis* robot_max_speed * dt) + (steering_axis * c * robot_max_speed)
if left_error > robot_max_speed * dt
left_error = robot_max_speed * dt
if left_error < -(robot_max_speed * dt)
left_error = -(robot_max_speed * dt)
right_error = right_encoder_distance + (throttle_axis* robot_max_speed * dt) - (steering_axis * c * robot_max_speed)
if right_error > robot_max_speed * dt
right_error = robot_max_speed * dt
elif right_error < -(robot_max_speed * dt)
right_error = -(robot_max_speed * dt)
left_motor = p_constant*left_error + i_constant*left_error
right_motor = p_constant*right_error + i_constant*right_error
steering_axis_last = steering_axis
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi