![]() |
RobotBuilder and CAN Talon SRX
Our team has made the switch to use Java this year and we are using RobotBuilder to create our command-based program. We are planning on using the Talon SRX wired via the CAN bus, but noticed that only PWM Talon SRX is an option in RobotBuilder. I'm assuming we can't use RobotBuilder with a CAN wired Talon SRX?
Thanks, Bill |
Re: RobotBuilder and CAN Talon SRX
You are correct that RobotBuilder doesn't support the Talon SRX in CAN mode currently. However, there are lots of things it doesn't support, like I2C accelerometers, counters, etc. This doesn't keep you from using those objects in a RobotBuilder project. As long as you put the objects outside of the // BEGIN AUTOGENERATED CODE and // END AUTOGENERATED CODE robotbuilder won't mess with it.
|
Re: RobotBuilder and CAN Talon SRX
Ahhhh, BEGIN and END sections. That could be our answer.
Thanks again. |
Re: RobotBuilder and CAN Talon SRX
Has anyone tried to use RobotBuilder to lay out their drive system with PWM controllers and add code to convert it to use CAN devices? It doesn't seem possible without totally rewriting RobotMap.[ch]pp.
|
Re: RobotBuilder and CAN Talon SRX
1 Attachment(s)
I managed to get the RobotBuilder sources off of TeamForge (https://usfirst.collab.net/sf/projects/robotbuilder/) and adjusted some of its configuration files to add CAN TalonSRX objects. I tried making a test C++ project with it and it compiled properly in Eclipse. The patch file is attached in case anyone is interested.
|
Re: RobotBuilder and CAN Talon SRX
Hi Jeff,
Can you post how you were able to download the source and how one might apply the patch? We're using the RobotBuilder for the first time but we program in Java. We were able to get things working with a 4 motor CAN system by using CANJaguar in the builder and then changing the imports from CANJaguar to CANTalon. Not the best since we have to do this every time we generate code. There are ways we could overcome this using hooks in Eclipse, but your solution would be ideal. If you haven't seen them yet, the tutorials on the RobotBuilder from WPI are AMAZINGLY helpful. You can find the first in the series of 6 here... https://www.youtube.com/watch?v=k7PaYcjDEDc ...my favorite is the second in the series where they show all the amazing stuff you can do in test mode if you've used the robot builder. |
Re: RobotBuilder and CAN Talon SRX
Quote:
One other step - in addition to making the changes in the patch file above you would probably also want SOME icon on the pallete. I simply went into src/main/resources/icons and coppied the "CAN Jaguar.png" file to "CAN TalonSRX.png" and that made an icon show up in the pallete (it still looks like a jaguar and if you care you can create one that looks like a TalonSRX instead) |
Re: RobotBuilder and CAN Talon SRX
Thanks, I can't wait to try it out :)
|
Re: RobotBuilder and CAN Talon SRX
Hi All,
I managed, with some help from Jeff and Riftware, to get access to the source code for the 2014 version of the RobotBuilder. Based on work done by others before me I've updated the RobotBuilder to include the TalonSRX in the CAN controllers section. You can checkout the project from our git Repo... https://github.com/dirty-mechanics-3...geRobotBuilder ...run by double clicking the jar file... /RobotBuilder/target/RobotBuilder-2.0.0-SNAPSHOT.jar I included an updated png that says Talon on it as well as updates to the html document. Props to Jeff who provided the bulk of the code to make things go, but I did vary from his original change. Hope that helps those of use that are using TalonSRX controllers with CAN. |
Re: RobotBuilder and CAN Talon SRX
I just wanted to thank adamzg and jmullins16 for their work on this project. It has greatly helped, thank you guys!
|
Re: RobotBuilder and CAN Talon SRX
There were some mistakes in the code I posted to github. I've updated the branch with the corrections (code generation was right, documentation was inverted)...
https://github.com/dirty-mechanics-3...tree/pid-talon ...please note that you need to use the jar files in the artifacts folder. That was the most expedient way to make them available for now. Still new to git/github. Also note that it's a maven project so you'll need a maven plugin for eclipse if you want to work with the source. |
Re: RobotBuilder and CAN Talon SRX
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 :/
|
Re: RobotBuilder and CAN Talon SRX
Quote:
But you can still work with it. I suspect taking 4 Talon's out and retyping them to TalonSRX could be handled the same way if you can't work out how to use the patches that have been provided in this thread. |
Re: RobotBuilder and CAN Talon SRX
Thanks for the info. on the CAN Talon not being LiveWindow sendable.
Came back to post about a problem we experienced. Our yml file got corrupted during a merge on github. I have an updated version of the jar files in our repo that will give you some hints about what went wrong. Before it would just throw a null pointer exception and not load the file. You can get the latest jars here... https://github.com/dirty-mechanics-3...alon/artifacts If anyone wants to post the pieces on how they got it into LiveWindow I can look into getting it into the builder after the build end date. Not enough time right now... |
| All times are GMT -5. The time now is 10:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi