Log in

View Full Version : Programming website


JohnGaby
03-01-2017, 16:41
I am the programming mentor for team 2102, Team Paradox. We have put together a programming website that others may find useful:

http://programming.sdarobotics.org/

This site contains some tutorials which we use to teach programming to new members of the team. The programming is done using small inexpensive robots that we have designed, but we use Eclipse and Java and the programming environment is very similar to that used to program the FRC robots in Java.

In addition, last year we used a Raspberry Pi to do vision processing. Since this might be useful to anyone who might be considering doing something like this we are providing the code we used. To make this as easy to use as possible, we have downloads for Raspberry Pi system images that you can write to a micro SD card and not have to worry about figuring out how to install all of the necessary pieces. The Pi images contain an installed version of Eclipse (that runs on the Pi) which has C++ projects to do vision processing:

http://programming.sdarobotics.org/more/raspberry-pi-vision-processing/

We are looking at possibly moving our vision processing to the NVIDIA board this year, and to that end we have done some preliminary work which we would like to share.

http://programming.sdarobotics.org/more/nvidia-vison-processing/

There are also two Eagle Cad files for custom boards that we may use this year. One is a breakout board for the TALON SRX and the second is a board to read a gyro using an Arduino:

http://programming.sdarobotics.org/more/downloads/

Any feedback on this material would be welcome.

John Gaby

cbf
03-01-2017, 17:40
Your site looks really interesting. But the most interesting part to me is that you seem to have put together an environment that emulate WPILib and associated tools on a Raspberry Pi, so writing robot code to run on your Raspberry Pi looks very much like programming the RoboRio.

This may be just what we need for some small projects, and as a software testbed for our competition robot.

Do you emulate things like CANTalon classes? (I know -- at this point, I should probably unpack it and find out for myself.)

Thanks!

JohnGaby
03-01-2017, 17:46
I am afraid I have not figured out the CAN bus yet. I have a CAN bus module, and have looked into it, but it is quite complicated. It is even more complicated by the fact that the FRC Talons are apparently encrypted and it appears that you need to download a non-encrypted version from the manufacturer's website. Even given that you get that version, the code to control it is quite complex.

If anyone can figure it out, I would love to add it to the software.

cbf
03-01-2017, 19:07
Well, I didn't necessarily mean driving actual Talon SRX motor controllers (although that could be useful). But your site says you use Arduino-based motor controllers. What I was thinking was implementing something like the CRTE CANTalon class (http://first.wpi.edu/FRC/roborio/release/docs/java/edu/wpi/first/wpilibj/CANTalon.html), but actually have it implement the operations on your Arduino motor controllers.

Do you have docs for your Arduino motor controllers?

JohnGaby
03-01-2017, 21:07
The motor controllers it can currently handle use PWM, both simple a PWM signal which controls the duty cycle of the motor (via an H-Bridge), or a servo like PWM signal where the pulse width controls both the speed and direction of the motor.

I am not familiar with CAN bus controllers other than the TALON SRXs used by FRC.

Documentation for the Java classes can be found on the website:

http://programming.sdarobotics.org/RobotCoreDoc/annotated.html