Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   C++ Command Based Robot Template (http://www.chiefdelphi.com/forums/showthread.php?t=133961)

MrRoboSteve 11-02-2015 15:19

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.

King Nerd III 11-02-2015 15:23

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by MrRoboSteve (Post 1441964)
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.

Ether 11-02-2015 16:54

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1441967)
There is no question.

This looked a lot like a question:

Quote:

Originally Posted by King Nerd III (Post 1438162)
Has anyone else noticed that the included template does not work correctly?



Alan Anderson 11-02-2015 18:23

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1441821)
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.

Sparkyshires 12-02-2015 18:47

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 :/

King Nerd III 12-02-2015 19:01

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Sparkyshires (Post 1442836)
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?

Alan Anderson 12-02-2015 21:09

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1442840)
...things like RobotDrive also do not support the CANTalons...

That is not the case. RobotDrive will support any speed controllers you can instantiate.

King Nerd III 12-02-2015 21:36

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Alan Anderson (Post 1442907)
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.

Alan Anderson 12-02-2015 22:38

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1442924)
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.

King Nerd III 12-02-2015 22:51

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Alan Anderson (Post 1442975)
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.

Alan Anderson 12-02-2015 23:09

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1442988)
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.

King Nerd III 12-02-2015 23:24

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by Alan Anderson (Post 1443000)
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.

King Nerd III 12-02-2015 23:27

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by King Nerd III (Post 1443016)
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!

ozrien 13-02-2015 00:57

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 (Post 1443016)
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.

King Nerd III 13-02-2015 01:20

Re: C++ Command Based Robot Template
 
Quote:

Originally Posted by ozrien (Post 1443079)
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.


All times are GMT -5. The time now is 12:10.

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