cmvr-head-client/cpp/common/curve
2026-08-05 16:42:59 +08:00
..
build first commit 2026-08-05 16:42:59 +08:00
include first commit 2026-08-05 16:42:59 +08:00
src first commit 2026-08-05 16:42:59 +08:00
build_python.ps1 first commit 2026-08-05 16:42:59 +08:00
CMakeLists.txt first commit 2026-08-05 16:42:59 +08:00
README.md first commit 2026-08-05 16:42:59 +08:00

SCurve Python Bridge

This folder now exposes the C++ SCurve class as a native Python extension built with pybind11.

Build

From the repository root:

powershell -ExecutionPolicy Bypass -File .\cpp\common\curve\build_python.ps1 -PythonExecutable "C:\Users\Administrator\miniconda3\envs\cmvr-head-client\python.exe"

Expected output:

  • cpp/common/curve/build/_s_curve_native*.pyd

Python usage

from s_curve import SCurve

curve = SCurve(max_velocity=3.0, max_acceleration=10.0, max_jerk=50.0)
curve.setConstraints(4.0, 12.0, 80.0)
profile = curve.calculateProfile(0.0, 30.0, 0.0, 0.0)
samples = curve.sampleTrajectory(profile, 0.01)