Skip to content

Repository files navigation

netft-cpp

CI Release CodeQL Coverage C++17 License

netft-cpp is a standalone C++17 SDK for receiving calibrated force/torque samples from ATI Net F/T Ethernet sensors. It provides the reusable native core for applications that need direct control over acquisition, health, and recovery. For an end-user terminal application, see netft-cli.

Features

  • Discovers calibration scales and measurement units before streaming RDT data.
  • Exposes raw counts, calibrated samples, sensor status, and stream health.
  • Supports reconnect and fail-stop recovery policies.
  • Installs shared or static libraries as the netft::netft CMake target.

Installation

Platform Architectures Support
Linux x86-64, AArch64 Tested
macOS x86-64, Apple silicon Tested
Windows x86-64 Tested

Building requires a C++17 compiler, CMake 3.16 or newer, threads, and libcurl 7.63.0 or newer.

git clone https://github.com/netft/netft-cpp.git
cd netft-cpp
cmake -S . -B build/release \
  -DCMAKE_BUILD_TYPE=Release \
  -DBUILD_SHARED_LIBS=ON \
  -DBUILD_TESTING=OFF \
  -DCMAKE_INSTALL_PREFIX="$PWD/install"
cmake --build build/release
cmake --install build/release

Set BUILD_SHARED_LIBS=OFF for a static library. See the C++ SDK tutorial for dependency setup on each supported platform.

Quick start

Consume an installed package with CMake config mode:

find_package(netft 0.3 CONFIG REQUIRED)

add_executable(read_sensor main.cpp)
target_link_libraries(read_sensor PRIVATE netft::netft)

Then receive a sample with netft::Client:

#include <chrono>
#include <iostream>

#include <netft/client.hpp>

int main() {
  netft::Config config;
  config.sensor_host = "192.168.1.1";

  netft::Client client{config};
  client.start([](const netft::Sample &sample) {
    std::cout << sample.force[0] << ' '
              << netft::to_string(sample.force_unit) << '\n';
  });
  const bool received = client.wait_for_first_sample(std::chrono::seconds{2});
  client.stop();
  return received ? 0 : 1;
}

192.168.1.1 is the ATI factory-default sensor address. Replace it with the address configured for your sensor.

Documentation

Samples preserve the force and torque units reported by the sensor; the SDK does not silently convert them to a preferred unit system. Automatic discovery is recommended. Use a manual calibration override only when the active sensor configuration has been independently verified.

Contributing

See CONTRIBUTING.md for the development environment, tests, hardware-testing policy, versioning, and downstream snapshot workflow. Report security issues through SECURITY.md.

License

This project is licensed under the Apache License 2.0.

About

Cross-platform C++17 SDK for ATI Net F/T Ethernet force/torque sensors.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages