How does one wrap Java code and get it to run in labview? We want to deploy part of 254’s code of path following, but we do not know how…We used their trajectorylib code to output a curved path when inputting our piecewise-like output of path planning
LabVIEW can access external code in a variety of ways. The most direct being to call a DLL/lib/.so directly using C calling conventions. But I don’t believe you can get Java to export its functions with C conventions. If the code were in C and compiled into a library using C types for the interface, it is pretty straightforward.
I haven’t had time to look into the 254 code, but it is worth pointing out that for several years now we have been shipping most of the NI Robotics Module. This is where the simulator came from. The module also contains a A*, AD*, Occupancy Grid, and a pretty cool Steering class. We haven’t talked about them much because most teams don’t seem to need them, and they are not integrated with WPILib. In fact, they use Classes and many advanced LV features, and it would be a bit of work to write the WPILib wrappers. Most of the robotics library assumes intelligent motor controllers that can control speed or position.
The attached image shows some of the steering examples – yes, for those cases where the mechanical guys were sleep deprived or messing with you and your SW is supposed to drive a hexabot with different gearing per wheel.
Greg McKaskle