Generated reference › Quintic Trajectory — Robotics/Trajectory Generation
kind: generated#block#robotics-trajectory-generation

Quintic Trajectory — Robotics/Trajectory Generation

Robotics/Trajectory_Generation/Quintic_Trajectory · 0 input / 0 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Description#

The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.

Quintic Trajectory

Robotics / Trajectory Generation

The minimum-jerk point-to-point profile: a source that walks from q₀ to qf over a duration T, starting and finishing at zero velocity and zero acceleration. With normalized time s = t/T clamped to [0, 1]:

  • q = q₀ + h·(10s³ − 15s⁴ + 6s⁵), where h = qf − q₀
  • q̇ = (h/T)·(30s² − 60s³ + 30s⁴)
  • q̈ = (h/T²)·(60s − 180s² + 120s³)

The quintic is the lowest-order polynomial that can meet all six boundary conditions (position, velocity and acceleration at each end), which is why it is what a servo is actually commanded with rather than a straight ramp.

Ports

This block is a source: it has no inputs and takes its time from its own local clock, so it produces the same profile wherever it is dropped.

  • q – the position command, [1,1].
  • qd – its first derivative, the velocity command, [1,1].
  • qdd – its second derivative, the acceleration command, [1,1].

Parameters

  • Start Positionq₀, the value held before the move and at t = 0. Any scalar.
  • End Positionqf, the value reached at t = T and held after it. It may be below q₀; the profile simply runs downhill.
  • Duration (s)T, the move time. It must be strictly positive; a zero or negative value is reported and stops the run rather than dividing.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Code export

All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text.

q₀, qf and T are baked into the emitted body at export time rather than exposed as tunable parameters on the generated core. They enter as the folded constants q₀, h, 1/T, h/T and h/T², so no generated core performs a division – and retuning the profile means re-exporting it.

The three HDL targets are simulation-only: they carry the profile in real and quantize only at the port boundary. The polynomial itself would be synthesizable fixed point – it is multiply-add on constants with every power inside [0, 1] – but the clock is not: like every time-driven source in this library it reads the testbench-advanced sim_time, and there is no fixed-point clock to read instead.

Simulink bridge

None, measured rather than assumed: point-to-point trajectory blocks ship in the Robotics System Toolbox, which is not installed on this machine (robotics, nav and shared_robotics are all absent from matlabroot/toolbox). The profile is easy to rebuild there from a Clock and a MATLAB Function block carrying the three polynomials above.

Notes

  • Algebraic and stateless – a pure function of simulation time, so it runs correctly under either solver and carries no state to seed.
  • The hold after t > T is the clamp, not a separate branch: at s = 1 the three polynomials are exactly 1, 0 and 0, so the block publishes (qf, 0, 0) from then on as an identity of the arithmetic. Before t = 0 – which only a negative model start time can reach – it holds (q₀, 0, 0) the same way.
  • The profile is evaluated in normalized time, which is what keeps it exact in fixed point: in raw t the acceleration term carries and would leave Q16.16's range within seconds.
  • No state space – the block has no input to be linear in.
  • For a bounded-velocity move use Trapezoidal Velocity Profile: this one's peak speed is 1.875·h/T and its peak acceleration 5.7735·h/T², both set by T rather than commanded.

Code facts#

FactValue
registered typeRobotics/Trajectory_Generation/Quintic_Trajectory
familyRobotics/Trajectory_Generation
solver environment classICoreBlock_0_Robotics_1_Trajectory_Generation_2_Quintic_Trajectory
sourcesrc/ICoreSDK/ICoreBlockLibrary/Blocks/Robotics/Trajectory_Generation/Quintic_Trajectory/ICoreBlock_0_Robotics_1_Trajectory_Generation_2_Quintic_Trajectory.cpp
headersrc/ICoreSDK/ICoreBlockLibrary/Blocks/Robotics/Trajectory_Generation/Quintic_Trajectory/ICoreBlock_0_Robotics_1_Trajectory_Generation_2_Quintic_Trajectory.h
default size on canvas132 × 90 px
ports at insert? in, ? out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1outICoreDoubleq
2outICoreDoubleqd
3outICoreDoubleqdd

Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.

Configuration variables#

Config variableDefaultSimulink parameter
Start Position0
End Position1
Duration (s)1

Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.

supportSupport::None
Simulink path
port-count rulePortsParam::None
SampleTime parameteryes

Caveat (shown to the user): no Simulink equivalent available: point-to-point trajectory blocks ship in the Robotics System Toolbox, which is not installed. Rebuild it there from a Clock and a MATLAB Function block carrying the three quintic polynomials this block states

Catalog contract: src/ICoreSDK/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The lists agree. check_block_descriptions.py finds no disagreement between the description's Ports, Parameters, Code export and Simulink bridge lists and the code's.

The verdict above is tools/docs/check_block_descriptions.py (P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.

File banner (developer view)#

The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).

Quintic Trajectory — the minimum-jerk point-to-point profile, as a source s = clamp(t / T, 0, 1) q = q0 + h * (10s^3 - 15s^4 + 6s^5) h = qf - q0 qd = vs * (30s^2 - 60s^3 + 30s^4) vs = h / T qdd = as * (60s - 180s^2 + 120s^3) as = h / T^2

The three rows are built ONCE, in rowExpr() below, from a language's spelling of the clamped normalized time and its numeric literals - so the reference and the ten backends cannot drift in a coefficient or a sign. The polynomials are Horner-nested in s, which is what keeps every intermediate inside [0, 1] and the multiply count at three per row.

The hold after t > T is the CLAMP and nothing else: at s = 1 the three polynomials are exactly 1, 0 and 0, so (qf, 0, 0) falls out of the arithmetic rather than out of a branch. See the header for why that matters across eleven implementations.

Sample results#

Quintic Trajectory — No input: the block run aloneQuintic Trajectory — No input: the block run alone-505012345t (s)out ICoreDouble-Out-0out ICoreDouble-Out-1out ICoreDouble-Out-2

Plotted: free — No input: the block run alone

Category source · sample time 0.1 · 60 steps · commit ccf005c8 · produced by docsSample --out <folder> --steps 60 · data docs/generated/samples/Robotics__Trajectory_Generation__Quintic_Trajectory.json · the SVG is generated from those numbers by tools/docs/plot_svg.py, so it is a run and not a drawing (R-D10).