Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/engnadeau/robotiq-ft-java
An unofficial Java package for cross-platform serial communication with a Robotiq FT Sensor
https://github.com/engnadeau/robotiq-ft-java
communication-protocol java osx robot robotics robotiq-ft-sensor sensor serial-ports usb windows
Last synced: 4 months ago
JSON representation
An unofficial Java package for cross-platform serial communication with a Robotiq FT Sensor
- Host: GitHub
- URL: https://github.com/engnadeau/robotiq-ft-java
- Owner: engnadeau
- License: mit
- Created: 2016-09-13T18:36:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-19T01:30:25.000Z (over 2 years ago)
- Last Synced: 2024-10-05T00:08:47.042Z (4 months ago)
- Topics: communication-protocol, java, osx, robot, robotics, robotiq-ft-sensor, sensor, serial-ports, usb, windows
- Language: Java
- Homepage: https://github.com/nnadeau/robotiq-ft-java
- Size: 1.74 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Robotiq FT Sensor - Java
An unofficial Java package for cross-platform serial communication with a Robotiq FT Sensor[![Release](https://github.com/nnadeau/robotiq-ft-java/workflows/Release/badge.svg)](https://github.com/nnadeau/robotiq-ft-java/actions)
[![GitHub tag](https://img.shields.io/github/tag/nnadeau/robotiq-ft-java.svg?maxAge=2592000?style=flat-square)](https://github.com/nnadeau/robotiq-ft-java/releases)
[![GitHub issues](https://img.shields.io/github/issues/nnadeau/robotiq-ft-java)](https://github.com/nnadeau/robotiq-ft-java/issues)
[![GitHub forks](https://img.shields.io/github/forks/nnadeau/robotiq-ft-java)](https://github.com/nnadeau/robotiq-ft-java/network)
[![GitHub stars](https://img.shields.io/github/stars/nnadeau/robotiq-ft-java)](https://github.com/nnadeau/robotiq-ft-java/stargazers)
[![GitHub license](https://img.shields.io/github/license/nnadeau/robotiq-ft-java)](https://github.com/nnadeau/robotiq-ft-java/blob/master/LICENSE)[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fnnadeau%2Frobotiq-ft-java)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fnnadeau%2Frobotiq-ft-java)
## Communication Protocol
The communication protocol (and basis for `config.properties`) for using a FT Sensor can be found [here](http://support.robotiq.com/pages/viewpage.action?pageId=9601256).
## Usage
### Tested Platforms
- Windows 10 x64
- OSX 10.11.5 x64### Quick Tests
- Run `SerialUtilities.java` to list available serial ports (sensor should be connected and seen here)
- Update `comm_port` in `config.properties` to the proper serial port (e.g., `COM3` for Windows, `cu.usbserial-FTXU0M1B` for OSX)
- Run `RobotiqFtMaster.java` for a 20 second burst of data printed to the console### Example
```java
public static void main(String[] args) {
Logger.info("Running simple RobotiqFT connection test");
RobotiqFtMaster robotiqFtMaster = new RobotiqFtMaster();
try {
robotiqFtMaster.connect();int maxTime = 20;
Logger.info(String.format("Reading from sensor for %d seconds", maxTime));
long startTime = System.currentTimeMillis();
while ((System.currentTimeMillis() - startTime) < (maxTime * 1000)) {
try {
System.out.println(Arrays.toString(robotiqFtMaster.getCompleteMeasure()));
} catch (ModbusException e) {
Logger.error(e);
}
}
} catch (Exception e) {
Logger.error(e);
}
}
```