View Single Post
  #10   Spotlight this post!  
Unread 17-12-2013, 17:17
brennonbrimhall brennonbrimhall is offline
Free Agent
AKA: Brennon Brimhall
no team
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Clifton Park, NY
Posts: 222
brennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to all
Re: Using Multiple Languages

Quote:
Originally Posted by yash101 View Post
I was wondering whether it would be worth using multiple language on a robot. Our robot is to be programmed in Java. However, I would like to use C for offboard vision because it is very easy to get everything set up and to program OpenCV.

Other than that, does anyone know how to get Java running with OpenCV?
Firstly, modern OpenCV uses C++. Yes, the OpenCV docs for Java integration are here for a CLI and here for Eclipse.

While vision processing is nice, its useless unless you can communicate the results back to the cRIO. You should focus on designing the mechanism by which you want the two systems to pass information back and forth. If that leads you to write both in the same language, great. If you end up using C++ and Java, great. (Assuming you're open to using multiple languages, of course; if you only know Java, that's a different case.) Making your code simple and reliable is much more important than what language it uses.

Quote:
Originally Posted by yash101 View Post
Our team has, for this year, stuck to using just Java, because our mentor's told us that it is the "best" language. While it isn't a bad language (I like Java, actually), There are some places where I think it is impractical to use Java. In this case, I am thinking solely about OpenCV. It is probably one of the most feature-packed CV library, but installing the Java connector seems like rocket science. Not only that, but SoCs typically have crappy JVMs, making it a hassle to run the code. OpenCV, for example, is written in C. That means that the Java interpreter needs to run the binaries continuously. In the case where you have limited resources like RAM, that seems quite impractical, the same reason why a Raspberry Pi + Minecraft Server don't always work out well, if you are a typical gamer!
I don't quite understand what you mean. All that Java should do is reference the precompiled binaries, making execution faster.
__________________
Team 20, 2012-2014: 4 blue banners, 5 medals, and 9 team awards.
Church of Jesus Christ of Latter-day Saints, 2014-2016: Missionary, Colorado Denver South Mission.