Go to Post There's a balance to it all, when the engineers guide the students, and both cooperate to build a robot. There can be no better way then when both sides are in cooperation - the true spirit of FIRST. - Jim McGeehin [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 11 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 11-02-2015, 15:19
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 581
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: C++ Command Based Robot Template

Yes, the new project I created has CommandBase.cpp and CommandBase.h.

It's hard for me at this point to know what exactly your question is.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
Reply With Quote
  #17   Spotlight this post!  
Unread 11-02-2015, 15:23
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by MrRoboSteve View Post
Yes, the new project I created has CommandBase.cpp and CommandBase.h.

It's hard for me at this point to know what exactly your question is.
There is no question. Look at the original post and you'll see I did not ask for help with anything. I was simply stating a problem I ran into and then saying how I fixed it.
Reply With Quote
  #18   Spotlight this post!  
Unread 11-02-2015, 16:54
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
There is no question.
This looked a lot like a question:

Quote:
Originally Posted by King Nerd III View Post
Has anyone else noticed that the included template does not work correctly?

Reply With Quote
  #19   Spotlight this post!  
Unread 11-02-2015, 18:23
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
The main problem with RobotBuilder so far for us is the lack of CANTalon support.
You might find the discussion in http://www.chiefdelphi.com/forums/sh....php?p=1437494 helpful.

Quote:
Also, we have ~7 Windows computers and 1 Mac, and currently RobotBuilder only opens on the Mac, except for the fact that it does not export.
RobotBuilder is a Java app and runs for others using Windows just fine. You seem to be having a lot of unique problems. I don't know why that is, but I suspect a systemic failure in translating from the ScreenSteps instructions to your system.
Reply With Quote
  #20   Spotlight this post!  
Unread 12-02-2015, 18:47
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: C++ Command Based Robot Template

Sorry to revive this thread, but is it just me, or is the CANTalon not LiveWindow Sendable? If so, what do you guys do for test mode? Because the livewindow is awesome for testing stuff but it would totally suck if it doesn't support CANTalons :/
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #21   Spotlight this post!  
Unread 12-02-2015, 19:01
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Sparkyshires View Post
Sorry to revive this thread, but is it just me, or is the CANTalon not LiveWindow Sendable? If so, what do you guys do for test mode? Because the livewindow is awesome for testing stuff but it would totally suck if it doesn't support CANTalons :/
I have not used test mode, so I wouldn't know how to do that, but things like RobotDrive also do not support the CANTalons so I wouldn't be surprised if LiveWindow didn't, either.
What does the code look like that you're trying to use?
Reply With Quote
  #22   Spotlight this post!  
Unread 12-02-2015, 21:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
...things like RobotDrive also do not support the CANTalons...
That is not the case. RobotDrive will support any speed controllers you can instantiate.
Reply With Quote
  #23   Spotlight this post!  
Unread 12-02-2015, 21:36
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
That is not the case. RobotDrive will support any speed controllers you can instantiate.
Have you verified this by creating a RobotDrive object within C++ and having it drive a robot? If so, this would be very helpful for us, as so far, in our experience, RobotDrive will not work with a CANTalon setup.
Reply With Quote
  #24   Spotlight this post!  
Unread 12-02-2015, 22:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
Have you verified this by creating a RobotDrive object within C++ and having it drive a robot? If so, this would be very helpful for us, as so far, in our experience, RobotDrive will not work with a CANTalon setup.
I don't use C++, so I have not verified it personally. But I count at least a half dozen teams who have posted on Chief Delphi about doing it. Here's a post containing code that explicitly says it works.
Reply With Quote
  #25   Spotlight this post!  
Unread 12-02-2015, 22:51
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
I don't use C++, so I have not verified it personally. But I count at least a half dozen teams who have posted on Chief Delphi about doing it. Here's a post containing code that explicitly says it works.
That thread has the RobotDrive initializing with PWM. Not CAN. It says so in the comments of the code. This does not show that RobotDrive works with CANTalon.
Reply With Quote
  #26   Spotlight this post!  
Unread 12-02-2015, 23:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
That thread has the RobotDrive initializing with PWM. Not CAN. It says so in the comments of the code. This does not show that RobotDrive works with CANTalon.
Omar took the Driving a robot using Mecanum drive example, changed it from PWM to CANTalon, and added gyro features. He just didn't fix the comments, that's all. If you look at the actual code, you won't see any PWM use.
Reply With Quote
  #27   Spotlight this post!  
Unread 12-02-2015, 23:24
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
Omar took the Driving a robot using Mecanum drive example, changed it from PWM to CANTalon, and added gyro features. He just didn't fix the comments, that's all. If you look at the actual code, you won't see any PWM use.
Even if the code compiles, it does not mean it'll absolutely work. I have tried to use RobotDrive with the CAN and it does not work for me. If other people have it working, good for them, but in my experience from using the RobotDrive with CANTalons in C++ it will not drive.
Reply With Quote
  #28   Spotlight this post!  
Unread 12-02-2015, 23:27
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by King Nerd III View Post
Even if the code compiles, it does not mean it'll absolutely work. I have tried to use RobotDrive with the CAN and it does not work for me. If other people have it working, good for them, but in my experience from using the RobotDrive with CANTalons in C++ it will not drive.
Please, anyone, feel free to prove me wrong by writing out a simple program that uses RobotDrive and CANTalons in C++ to drive. If you do, please upload your code so I can save it for future reference, and if you can, a video showing the robot driving would be nice too!
Reply With Quote
  #29   Spotlight this post!  
Unread 13-02-2015, 00:57
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 537
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: C++ Command Based Robot Template

Quote:
Originally Posted by Alan Anderson View Post
Omar took the Driving a robot using Mecanum drive example, changed it from PWM to CANTalon, and added gyro features. He just didn't fix the comments, that's all. If you look at the actual code, you won't see any PWM use.
Quote:
Originally Posted by King Nerd III View Post
Even if the code compiles, it does not mean it'll absolutely work. I have tried to use RobotDrive with the CAN and it does not work for me. If other people have it working, good for them, but in my experience from using the RobotDrive with CANTalons in C++ it will not drive.
Wow, you must not think much of my examples. Well...I'm not sure what else I can do for you besides giving you functional code that I tested on my robot, which is available per Alan's suggestion. I'm not really sure what you are asking for from the community at this point. Do you really think I would not test it on an actual robot before posting it?

At any rate if you're really that unhappy with robotbuilder, then I would recommend using a clean IterativeRobot project. If you don't like RobotDrive, implement your own drive train class.

I'm not sure what problem you are seeing with RobotDrive. The only problem I've heard of and confirmed is that RobotDrive tends to trip MotorSafety occasionally, which is easy to workaround by calling RobotDrive:SetSafetyEnabled(false).

Sparkyshires brought up a good question. I'm not sure if the LiveWindow Sendable interface is implemented (I don't have the code in front of me). If it's not I'm sure you could put together an easy wrapper to hook it up, or someone from the community could recommend a way to go about it.
Reply With Quote
  #30   Spotlight this post!  
Unread 13-02-2015, 01:20
King Nerd III's Avatar
King Nerd III King Nerd III is offline
Chief Programmer/Head of Autonomous
AKA: Isaac
FRC #1410 (The Kraken)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Denver, CO
Posts: 116
King Nerd III is an unknown quantity at this point
Re: C++ Command Based Robot Template

Quote:
Originally Posted by ozrien View Post
Wow, you must not think much of my examples. Well...I'm not sure what else I can do for you besides giving you functional code that I tested on my robot, which is available per Alan's suggestion. I'm not really sure what you are asking for from the community at this point. Do you really think I would not test it on an actual robot before posting it?

At any rate if you're really that unhappy with robotbuilder, then I would recommend using a clean IterativeRobot project. If you don't like RobotDrive, implement your own drive train class.

I'm not sure what problem you are seeing with RobotDrive. The only problem I've heard of and confirmed is that RobotDrive tends to trip MotorSafety occasionally, which is easy to workaround by calling RobotDrive:SetSafetyEnabled(false).

Sparkyshires brought up a good question. I'm not sure if the LiveWindow Sendable interface is implemented (I don't have the code in front of me). If it's not I'm sure you could put together an easy wrapper to hook it up, or someone from the community could recommend a way to go about it.
Sorry, I did not mean to insult your examples in anyway. It's just that with RobotDrive and the CANTalons haven't been working at all for me, and its a little frustrating. We use the command based robot, as shown by the template I made, and from what I've seen the command based is an iterative robot with all the pieces broken up, which is what the team uses to also train people to use classes and such.
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 13:32.

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