Go to Post Too complicated for Wildstang? Start browsing CD-media...... - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 04-06-2018, 08:47 PM
Pringle Pringle is offline
Registered User
AKA: Mingle Li
FRC #5735 (Control Freaks)
Team Role: Programmer
 
Join Date: Jan 2018
Rookie Year: 2018
Location: Wayland, MA
Posts: 17
Pringle is an unknown quantity at this point
CTRE Phoenix - Motion Profiling with Gyro questions (2)

Hi, I'm still in dire need of help and I still don't really understand anything.

This is my previous post where I explain everything: https://www.chiefdelphi.com/forums/s...d.php?t=164416

However, can someone please explain:

1. Why is only the final heading specified, and not the gyro yaw value specified every loop?

2. How do I tune PID for a gyro?

3. How would I specify the final heading, if it's different for different trajectories?

4. In the example code, they only have one master talon. In our code, we have the two front motors as masters and the two back as followers to their respective master. How would doing this auxiliary stuff change this? Would I need to specify one talon as master and the rest three as followers?
Reply With Quote
  #2   Spotlight this post!  
Unread 04-08-2018, 09:14 PM
wlogeais wlogeais is offline
Registered User
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2016
Rookie Year: 2011
Location: Minnesota
Posts: 62
wlogeais is on a distinguished road
Re: CTRE Phoenix - Motion Profiling with Gyro questions (2)

Hi Pringle,

I'd say you are raising a large and complex set of questions without much clarity as to what you have as an existing code/strategy and what types of code & design you want to achieve. Most notably the CTRE example contains many different SRX control modes, etc., but a navigation-path doesn't seem to be a highlight of that example (I haven't ran it).

So is it your goal to use PathFinder or a similar route navigation solution, or rather to establish your own CommandGroups with sequences of new AutoDrive(...distance...) & AutoSpin(...targetHeading...) segments?

P.S. there is code containing 'gyro_heading' usage within this PathFinder instruction, it might be helpful if the former.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-08-2018, 10:12 PM
asid61's Avatar
asid61 asid61 is online now
Design Simple
AKA: Anand Rajamani
FRC #1072 (Harker Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,934
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: CTRE Phoenix - Motion Profiling with Gyro questions (2)

For #1, I think it's because the motion profile the Talon runs calculates the dynamic angle for you. It figures out the loop stuff. Not certain on that though, we'll be trying things out this week.
For #2 you should tune the gyro with "turn to angle" commands, independent of the motion profile. If you track the error over a motion profile and have a good eye you can fine-tune it with the motion profile but try tuning it for just "turn 90*" and the like first.
For #3 I'm list.
For #4 I believe you have to use a single master Talon. I was told by our programmer that the Master adds up the left and right encoder readings to get distance, and uses the gyro for angle, to avoid making PID loops fight each other. So you probably want only a single master Talon.
__________________
Team 1072 2017-present
Team 299 2017
Team 115 2013-2016 (student)

2018 Davis Finalists (w/ 6474 and 3880), 2018 Roebling Winners (w/ 3476, 1323, and 1778)

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 02:26 AM.

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


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