Go to Post I am allergic to work... - Mike Schroeder [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-01-2016, 23:25
Beaker's Avatar
Beaker Beaker is offline
624 Programming Alum
AKA: Justin K.
no team (No Team)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 61
Beaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to behold
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by Ari423 View Post
Can you talk about your motion profiling program? 1-2" accuracy without encoders sounds almost too good to be true (assuming you're going more than a few inches, which I think is a fair assumption)
Hello,

After attending the Cheesy Poofs' seminar at CMP on Motion Planning and Control Systems, I was inspired make a program that could drive without encoders. Here is how it works:

- We use a Trapezoidal Velocity Profile. It is trapezoidal because of the shape that the graph makes.

- There are 3 stages to our trapezoidal motion profile: Acceleration to Cruise, Cruise Velocity, and Acceleration to 0 velocity.

- Using physics equations and concepts, you can determine the amount of time needed in each phase of the profile. In mine, I give the robot a distance, its max velocity, its max acceleration and 2 scaling constants. The program basically reverse engineers this information to find the time spent in each phase and the velocity/acceleration involved at a given time.

This creates a very smooth acceleration and deceleration, which makes the motion predictable and repeatable.

Advantages of our Profile
- Our profile is computed by the robot on the fly. There are no external data files required
- We actually got it to hit 10 feet perfectly multiple times.

Limitations of our Profile
- Currently, our profile only works in the one dimensional case. We cannot do splines like 254
- We can only use the second order trapezoidal profile. My calculus knowledge isn't up to par with a third order profile (I'm in BC Calculus currently)
- We cannot change distances on the fly
- It does not integrate with PID (feedback) yet

Here are some resources that I used in my quest to accomplish this:

Cheesy Poof Presentation
Cheesy Poof Presentation on Youtube
Online Planning of Time-Optimal, Jerk Limited Trajectories

If you have any other questions, I am happy to answer them!

-Justin
__________________
Team 624 (Student) 2013-2016
BBQ FIRST Creator
Reply With Quote
  #2   Spotlight this post!  
Unread 05-01-2016, 23:34
Abhishek R Abhishek R is offline
Registered User
FRC #0624
Team Role: Alumni
 
Join Date: Mar 2013
Rookie Year: 2012
Location: Texas
Posts: 892
Abhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond reputeAbhishek R has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Made something in CAD and then built it for real too, what a time to be alive :')

It looks great! The black hexagonal cutout lightening pattern looks nice.
__________________
2012 - 2015 : 624 CRyptonite
Team Website
Reply With Quote
  #3   Spotlight this post!  
Unread 06-01-2016, 02:19
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by Beaker View Post
- We use a Trapezoidal Velocity Profile.

- It does not integrate with PID (feedback) yet
I assume everything is feed-forward. I'm interested if you would describe (a graph would be great) the control signal that you output in order to achieve a trapezoidal velocity profile

Quote:
Originally Posted by Beaker View Post
- We actually got it to hit 10 feet perfectly multiple times.
Are you doing anything to compensate for battery charge level? Have you tried running your controller with batteries at different levels of discharge?
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 06-01-2016, 11:08
Beaker's Avatar
Beaker Beaker is offline
624 Programming Alum
AKA: Justin K.
no team (No Team)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 61
Beaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to behold
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by RyanCahoon View Post
I assume everything is feed-forward. I'm interested if you would describe (a graph would be great) the control signal that you output in order to achieve a trapezoidal velocity profile
The only "graphing utility" I have access to at the moment is MS Paint, so I will post graphs for clarity later. Below is a technical description of our program that hopefully answers your question.

Given a distance, the robot generates a piecewise function. Since we know a maximum acceleration, we can create a triangular graph to determine max reachable velocity. The area of this triangle (integral of the velocity) must be the distance, and since we know the acceleration (slope of hypotenuse) we can find the max reachable velocity and the total time required for the profile.

After finding these two things, there are two possible cases. Either a) The max reachable velocity is less than the max allowed velocity or b) the max reachable velocity is more than the max allowed velocity, where the max allowed velocity is the maximum speed of the robot.

If case A is true, then motion profiling is simple. We make a piecewise function with 2 pieces, accel and decel. Each piece is v=at.

If case B is true, its a bit more complex. We now have to determine the time spent cruising. This can be achieved through geometry; All that needs to be done is find the base of the trapezoid that represents cruising velocity, and since you already know max velocity (height) and base 1 (total time), the math is not that hard. After these calculations, we have 3 times for 3 pieces of the function, 2 of these are v=at, then the cruise phase (the second piece) is v=cruise_vel.

Finally, our program outputs velocity and acceleration. However, motor controllers take in powers. What has to be done now is that we need to scale the outputs to create a power. Since we use the Talon SRX, we can assume that the scale is linear. The conversion to power goes as follows:

Motor Power = (Kv*velocity) + (Ka*acceleration)

We coerce this value between -1 and 1, just in case. All that is left to be done is to output this power to the motor controller.

I encourage you to read through the 254 presentation if I missed something. There are some graphs there and in the other (non Youtube) link that might clarify some things I have said.

Quote:
Originally Posted by RyanCahoon View Post
Are you doing anything to compensate for battery charge level? Have you tried running your controller with batteries at different levels of discharge?
Not yet, which is why integration with feedback is still important. If the battery level is low, feed-forward will not behave quite as expected, but the feedback system should be able to compensate.
__________________
Team 624 (Student) 2013-2016
BBQ FIRST Creator
Reply With Quote
  #5   Spotlight this post!  
Unread 06-01-2016, 08:25
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by Beaker View Post
Hello,

After attending the Cheesy Poofs' seminar at CMP on Motion Planning and Control Systems, I was inspired make a program that could drive without encoders. Here is how it works:

- We use a Trapezoidal Velocity Profile. It is trapezoidal because of the shape that the graph makes.

- There are 3 stages to our trapezoidal motion profile: Acceleration to Cruise, Cruise Velocity, and Acceleration to 0 velocity.

- Using physics equations and concepts, you can determine the amount of time needed in each phase of the profile. In mine, I give the robot a distance, its max velocity, its max acceleration and 2 scaling constants. The program basically reverse engineers this information to find the time spent in each phase and the velocity/acceleration involved at a given time.

This creates a very smooth acceleration and deceleration, which makes the motion predictable and repeatable.

Advantages of our Profile
- Our profile is computed by the robot on the fly. There are no external data files required
- We actually got it to hit 10 feet perfectly multiple times.

Limitations of our Profile
- Currently, our profile only works in the one dimensional case. We cannot do splines like 254
- We can only use the second order trapezoidal profile. My calculus knowledge isn't up to par with a third order profile (I'm in BC Calculus currently)
- We cannot change distances on the fly
- It does not integrate with PID (feedback) yet

Here are some resources that I used in my quest to accomplish this:

Cheesy Poof Presentation
Cheesy Poof Presentation on Youtube
Online Planning of Time-Optimal, Jerk Limited Trajectories

If you have any other questions, I am happy to answer them!

-Justin
Great work, Justin and Jack!

Did you select the acceleration/deceleration values such that wheelspin is minimized or eliminated in order to get the positional accuracy? How straight is the path the robot takes? How much variability is there, side-to-side, from a straight track?

Being the mentor in charge of the electrical system on our robots, I would suggest using a pocketing pattern that matches up better with electrical components such as the motor controllers of your choice, the PDP, the RoboRio, etc. You would be cutting this out using a CNC process of some sort so an irregular pattern will not really matter and should not make much difference in the weight.
Reply With Quote
  #6   Spotlight this post!  
Unread 06-01-2016, 08:35
1493kd's Avatar
1493kd 1493kd is offline
kd
FRC #1493 (FALCONS)
Team Role: Teacher
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Albany, NY
Posts: 142
1493kd will become famous soon enough
Re: pic: Team 624 2015 Offseason Tesbed

Hopefully someone can help me out a little on the belly pan. We would like to do something similar this season for our belly pan and I was wondering how attaching electronics to it works?

Do you need to plan on exactly where everything will be laid out or do you just place them on after the pan is cut out? If so what method is used to attach everything to the belly pan.

BTW- great looking testbed, we did something similar this offseason and its going to make testing and prototyping so much easier/quicker
Reply With Quote
  #7   Spotlight this post!  
Unread 06-01-2016, 14:02
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by 1493kd View Post
Hopefully someone can help me out a little on the belly pan. We would like to do something similar this season for our belly pan and I was wondering how attaching electronics to it works?

Do you need to plan on exactly where everything will be laid out or do you just place them on after the pan is cut out? If so what method is used to attach everything to the belly pan.

BTW- great looking testbed, we did something similar this offseason and its going to make testing and prototyping so much easier/quicker

You need to decide how you are going to attach each of the electrical components to the pan; screws, zip ties, Velcro/DuoLock, etc. You would then decide where to place each component and where the wiring channels will go. It would be good idea to place some extra motor controllers while you are at it. Use this layout to determine the pocketing pattern and mounting hole pattern. It might be best to not pocket where your wiring channels go to reduce the chance of cutting the wire on a sharp edge. We found it difficult to use Velcro to attach a motor controller when the only place for it is over a large hole in the pan. Zip tying components to a pan with a triangular pocketing pattern can lead to the components being at all kinds of funny angles.

Alternatively, you can install all your electrical components on a thin polycarbonate panel then attach the panel to the pan.

There are many examples of good electrical layout here on CD. You can also refer to the white paper we published for suggestions on how to layout the electrical components.

http://www.chiefdelphi.com/media/papers/3177?
Reply With Quote
  #8   Spotlight this post!  
Unread 06-01-2016, 16:58
Jack S.'s Avatar
Jack S. Jack S. is offline
Registered User
FRC #0624 (CRyptonite)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2007
Location: Houston, Texas
Posts: 42
Jack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud ofJack S. has much to be proud of
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by philso View Post
Alternatively, you can install all your electrical components on a thin polycarbonate panel then attach the panel to the pan.
This is the approach we used with the testbed. However, I would have preferred to design the pan based on the electronics layout like you suggested, but we were in a time crunch. If we use a belly pan this season (I hope to, but in my memory I don't believe we ever have), we will most likely trim down the weight and base it off the electronics layout.
__________________
2013: 1539 Clover Robotics
2014-2016: 624 CRyptonite
Reply With Quote
  #9   Spotlight this post!  
Unread 07-01-2016, 13:17
shlynfrhm shlynfrhm is offline
Registered User
FRC #3039 (Wildcat Robotics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Cambridge, MA
Posts: 6
shlynfrhm is an unknown quantity at this point
Re: pic: Team 624 2015 Offseason Tesbed

Hi, can any of you clarify what type of thin polycarbonate paneling you would reccomend to mount your electronics on? And what reccomended thickness? Thanks!

-Ashlyn
Reply With Quote
  #10   Spotlight this post!  
Unread 07-01-2016, 13:27
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by shlynfrhm View Post
Hi, can any of you clarify what type of thin polycarbonate paneling you would reccomend to mount your electronics on? And what reccomended thickness? Thanks!

-Ashlyn
These last two years, we mounted all the electronics on polycarb panels. I think we used 1/8 inch thick polycarb both years.

In 2014, the components were pre-assembled onto the panels outside of the robot. The panels were then stuck onto metal panels in the chassis using Velcro. The polycarb panels were fully supported by the metal panels so we could have used 1/16 inch thick polycarb for these if we had any.

In 2015, the panel (about 16 x 22 inches) was riveted to the frame tubes and was only supported around the edges so 1/8 inch thick polycarb would be needed to prevent the panel from flopping around too much once the heavier electrical components were installed. There was a second polycarb panel mounted on the other side of the tubes with the pneumatic components mounted on it. Don't make the mistake of installing anything on the panels with screws and nuts. The nuts were inaccessible once both of the panels were installed.
Reply With Quote
  #11   Spotlight this post!  
Unread 06-01-2016, 10:46
Beaker's Avatar
Beaker Beaker is offline
624 Programming Alum
AKA: Justin K.
no team (No Team)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 61
Beaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to behold
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by philso View Post
Did you select the acceleration/deceleration values such that wheelspin is minimized or eliminated in order to get the positional accuracy?
We set a maximum acceleration and maximum velocity in order to get the most accurate results. We also tune 2 constants that scale the profile's output velocity and acceleration to actual motor power.

Quote:
Originally Posted by philso View Post
How straight is the path the robot takes? How much variability is there, side-to-side, from a straight track?.
The robot currently has a very slight drift (2 inches over the course of 10 feet), mostly due to chain tensioning. This drift can be corrected in the code with gyro feedback control, which we do in the season.
__________________
Team 624 (Student) 2013-2016
BBQ FIRST Creator
Reply With Quote
  #12   Spotlight this post!  
Unread 06-01-2016, 14:06
philso philso is offline
Mentor
FRC #2587
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Houston, Tx
Posts: 938
philso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond reputephilso has a reputation beyond repute
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by Beaker View Post
We set a maximum acceleration and maximum velocity in order to get the most accurate results. We also tune 2 constants that scale the profile's output velocity and acceleration to actual motor power.



The robot currently has a very slight drift (2 inches over the course of 10 feet), mostly due to chain tensioning. This drift can be corrected in the code with gyro feedback control, which we do in the season.
That is pretty good performance. Does the amount of drift or the distance driven change if you reduce the acceleration to half or if you double it?
Reply With Quote
  #13   Spotlight this post!  
Unread 06-01-2016, 14:46
Beaker's Avatar
Beaker Beaker is offline
624 Programming Alum
AKA: Justin K.
no team (No Team)
Team Role: Alumni
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 61
Beaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to beholdBeaker is a splendid one to behold
Re: pic: Team 624 2015 Offseason Tesbed

Quote:
Originally Posted by philso View Post
That is pretty good performance. Does the amount of drift or the distance driven change if you reduce the acceleration to half or if you double it?
The distance does not change if we adjust acceleration, only the time it takes to travel the distance given. This is because the profile recalculates the motion profile with the new values. The drift also does not change.
__________________
Team 624 (Student) 2013-2016
BBQ FIRST Creator
Reply With Quote
Reply


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 20:42.

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