Both Java and LabVIEW can call a C library. With Java, you would use JNA. With LabVIEW, you would use Call Library Function.
We have never used different programming languages on the robot. We have used Java on the robot, and a LabVIEW dashboard to do vision processing.
Quote:
Originally Posted by yash101
I was wondering whether it would be worth using multiple language on a robot. Since I am no expert, I am wondering whether it is a good idea to use multiple languages on the 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.
|
The choice as to whether to use multiple programming languages should be carefully considered. It significantly increases the complexity of your program. You can't afford to have only a single person that knows part of your code, so you need multiple people able to use both languages. Often I see a project use different languages because one person is an expert in one language and doesn't want to learn the language that everyone else is using. This doesn't end well.
When is it ok to use multiple languages? Here's a few rules of thumb:
When each language has clear benefits in a particular area, and a common language has significant detractors in those areas.
When everyone agrees that multiple languages are better.
When multiple people can work with multiple languages.
When there is a clear segmentation (for example, different processors).
When the interface between the languages is well defined and the amount of information to be shared is minimal.
When there is lots of time for troubleshooting.
Quote:
Originally Posted by DomenicR
IHowever, both of these are intended as a full replacement, not to be mixed and matched with C++ [citation needed].
|
Here's one project designed to run LUA alongside C++.
http://www.chiefdelphi.com/forums/sh...&highlight=lua
Quote:
Originally Posted by yash101
That means that the Java interpreter needs to run the binaries continuously.
|
What does this mean?