Go to Post Just to be clear, NOTHING anyone says here is a confirmation. The ONLY source for official answers to questions like this is the FIRST Q&A system. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2016, 13:05
Ichlieberoboter's Avatar
Ichlieberoboter Ichlieberoboter is offline
Awards and Programming
AKA: Maria Valentini
FRC #2499 (Industrial Revolution)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Minnesota
Posts: 240
Ichlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud of
Adding more motors for tank drive

This is the first time our team is using python and we've been trying to figure out how to change our original code that had a cim on each side to having two cims on each side. It's probably not that complex but we don't understand the software super well. We need the new cims to be inverted.
__________________
Team 2499-Industrial Revolution
2015 Lake Superior Regional Judges Award

Head Programmer Chairman's Award Presenter Awards Submitter Electrical Team Website Designer Strategy Team

  #2   Spotlight this post!  
Unread 23-02-2016, 13:08
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Adding more motors for tank drive

Not familiar with Python, but it should be as simple as either adding 2 new speed controller objects to your RobotDrive object, or if you aren't using a robotdrive object, just add 2 more motor controllers and address them like you do the other 2.

Edit: You might need to add a constructor inside of the robotdrive class that accepts 4 speed controllers, and assigns them to each side of the robot correctly.

Post your code?
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)

Last edited by nighterfighter : 23-02-2016 at 13:10.
  #3   Spotlight this post!  
Unread 23-02-2016, 13:10
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Adding more motors for tank drive

In any language, it's just a matter of telling the RobotDrive object to use multiple motors. Check out the docs at http://robotpy.readthedocs.org/en/la...obotDrive.html

The great thing about using python is the pyfrc simulator... the simulator has full support for 4-motor drivetrains too. Check out this physics example: https://github.com/robotpy/pyfrc/tre...physics-4wheel
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #4   Spotlight this post!  
Unread 23-02-2016, 13:28
Peyton Yeung's Avatar
Peyton Yeung Peyton Yeung is offline
45 Alumni
AKA: Peyton Yeung
FRC #0461 (Westside Boiler Invasion)
Team Role: Coach
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Kokomo, IN
Posts: 805
Peyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond repute
Re: Adding more motors for tank drive

Alternatively you could keep the code the same and run y splitters for the pwm ports.
__________________
461 Westside Boiler Invasion
2016 Tippy Quarter finalist, Warren Finalist, IN State Semi Finalist,B^3 Double Finalist
2015 Indy Semi finalist, Purdue Quarter Finalist, IN State Quarter Finalist, CORI QF, R2OC Finalist, RAGE Winner
2014 Boilermaker Semi finalist, Crossroads Quarter Finalist, & CAGE Quarter Finalist
45 Technokats
2013 Boilermaker Quarter finalist
2012 CAGE Semi finalist & Queen City Champion
2011 CAGE Quarter finalist & Midwest Semi finalist
2010 CAGE Quarter finalist, Boilermaker Champion, & Washington DC Quarter Finalist
  #5   Spotlight this post!  
Unread 23-02-2016, 13:31
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Adding more motors for tank drive

Quote:
Originally Posted by Peyton Yeung View Post
Alternatively you could keep the code the same and run y splitters for the pwm ports.
Assuming they aren't using CAN. But they also need the CIMS to be inverted, although they can just reverse the polarity from the speed controller output.
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #6   Spotlight this post!  
Unread 23-02-2016, 14:01
Peyton Yeung's Avatar
Peyton Yeung Peyton Yeung is offline
45 Alumni
AKA: Peyton Yeung
FRC #0461 (Westside Boiler Invasion)
Team Role: Coach
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Kokomo, IN
Posts: 805
Peyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond reputePeyton Yeung has a reputation beyond repute
Re: Adding more motors for tank drive

Quote:
Originally Posted by nighterfighter View Post
Assuming they aren't using CAN. But they also need the CIMS to be inverted, although they can just reverse the polarity from the speed controller output.
If the motor is on the same side as the motor it is getting y connected to then it shouldn't need to be inverted unless the internal coil was reversed.
__________________
461 Westside Boiler Invasion
2016 Tippy Quarter finalist, Warren Finalist, IN State Semi Finalist,B^3 Double Finalist
2015 Indy Semi finalist, Purdue Quarter Finalist, IN State Quarter Finalist, CORI QF, R2OC Finalist, RAGE Winner
2014 Boilermaker Semi finalist, Crossroads Quarter Finalist, & CAGE Quarter Finalist
45 Technokats
2013 Boilermaker Quarter finalist
2012 CAGE Semi finalist & Queen City Champion
2011 CAGE Quarter finalist & Midwest Semi finalist
2010 CAGE Quarter finalist, Boilermaker Champion, & Washington DC Quarter Finalist
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 21:01.

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