Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Catch TCP jumps & Z-jitter in KUKA.Sim with open-source SIPA

#11
Thanks for letting us know. It looks promising. Dhruti from our technical team is testing your algorithm and she should be giving you some feedback in the next 24h.

You can find the C++ header files to create Plug-ins here:
https://github.com/RoboDK/Plug-In-Interf..._interface

And you can find more information about custom inverse kinematics here:
https://robodk.com/doc/en/PlugIns/index....Kinematics

And the same github repository has an example on how to implement custom inverse kinematics:
https://github.com/RoboDK/Plug-In-Interf...kinematics
#12
Okay, I will look into the relevant documents, Thanks. Also, please tell Dhruti that the script adapted for RoboDK is `scripts/sipa_iiwa_audit.py`, not `sources/abb_rws_probe.py`. For details, please refer to: "`https://github.com/ZC502/SIPA#-quick-start-30-second-demo`".
#13

.zip   SIPA_Test.zip (Size: 1.17 MB / Downloads: 28)
Hey @ZuoCen_Liu 👋🏼
I've run one of our internal 7-DOF test trajectories through your SIPA v2.3 Codespace, and I've attached the generated CSV and Audit Report along with my RoboDK station file. Since I'm still diving into the depth of NARH, could you take a quick look at my results to confirm I've configured the mapping correctly? I hope I used the correct script. I want to ensure the 'TCP Jump' events I'm seeing are true physical inconsistencies and not just an error in how I exported the data.
You mentioned that simulators 'force associativity' to maintain speed. In simple terms, how does that translate to the Z-axis jitter we see in the audit report? Is the solver 'guessing' the height between frames?
We have a massive library of 6-DOF industrial arms. While you've focused on 7-DOF for now, would the SIPA audit be just as effective at catching Singularities (like the 'Wrist Flip') in standard 6-axis setups?
#14
Hi Dhruti,
Thanks for sharing the data — I took a look at the CSV and the audit report. The joint mapping itself looks correct. SIPA is reading this as a RoboDK instruction-level CSV, and the J1–J7 columns appear aligned correctly.However, In your report, the file is identified as `robodk_instruction_csv` with `fixed_dt`, which means SIPA is analyzing instruction-level waypoints rather than a dense time-sampled trajectory. In that case, some of the TCP Jump events can come from export granularity / waypoint spacing, not only from true physical inconsistency.
The most critical finding is the Joint-Space Associator peak at Frame 48 (0.1352).The report shows:
* Peak frame: 48
* Peak normalized score: 0.1352
* Alert threshold: 0.1200
* Critical associator events: 2
That does suggest a "hidden IK branch-switch / continuity risk", even if the TCP path still looks visually smooth.
So The conclusion can be divided into:
* TCP Jump: partly influenced by the export format here
* Associator peak around frame 48: more interesting, and more likely to reflect a real hidden continuity issue
On your question about “forced associativity” and Z-axis jitter:I would not describe it as the solver “guessing height” between frames in a literal sense. A better way to think about it is this: over discrete time, the solver composes several order-sensitive steps — branch selection, interpolation, update/integration, etc. If those steps are treated as if regrouping them were harmless, a small residual is left behind. In the audit, that residual can show up as Z-axis jitter after the trajectory is reconstructed and compared with its smoothed physical trend.
A simple analogy is dressing:”socks → shoes → laces“ is physically ordered.If a numerical pipeline treats order-sensitive steps as if they could be freely regrouped, a residual appears. NARH is my way of measuring that residual.

On 6-DOF support:Yes in principle, but I would phrase it carefully. The current RoboDK integration is still optimized for native 7-axis trajectories. But the same audit logic can definitely be extended to 6-axis cases such as wrist flips and abrupt posture changes.However, my core vision is that the most powerful application for NARH is not just offline auditing, but as a real-time OP (Online Programming) diagnostic layer.By embedding NARH as a "physical guard" during the OP workflow, we can intercept these algebraic residues ($R_t$ spikes) before they ever reach the real controller. This transforms NARH from a passive auditor into an active safety barrier. What are your thoughts on shifting toward a real-time diagnostic approach within the RoboDK interface?

If you want the cleanest validation of whether the TCP Jump events are truly physical rather than export-related, the best next step would be to export the same program using a denser time-sampled joint stream (for example via `InstructionListJoints(..., flags=4, time_step=...)`) and compare the result. I’d be happy to run a second audit on that.
#15
Hi again!
Thanks for the detailed explanation, it is really helping me to understand how this works.
So, I was wondering how the algorithm reacts to a missing J7 column for 6-DoF arms?
Also, it would be really great if you could post a sample code which will help us eliminate the export-related jumps.
Will you be comfortable in using the station I had attached to run the second audit?
#16
Hi Dhruti,
Great to hear the explanation is helpful. Let's clear up the technical points:
1) What happens if J7 is missing?
For the current RoboDK 7-axis profile, SIPA should not silently invent a J7 value.
If the export is truly from a 6-DoF arm, the right thing to do is not to force that data into the current 7-axis workflow. Instead, it should be treated as a separate 6-axis case.
So for the current integration, the answer is:
• missing J7 = not valid for the current 7-axis profile
• it should be handled by a dedicated 6-axis audit profile, not by padding or guessing an extra joint
That said, this does not mean SIPA is limited to 7-axis robots only.
A dedicated 6-axis SIPA profile can still audit things like:
• TCP jump / Z-axis jitter
• joint acceleration spikes
• singularity-neighborhood transitions
• wrist-flip / posture discontinuity risk
So the distinction is:
• current RoboDK profile: optimized for native 7-axis trajectories
• overall SIPA concept: absolutely extensible to 6-axis robots as well

2) How do we reduce export-related TCP jumps?
Yes — the best way is to re-export the same program as a dense time-sampled joint stream, instead of only using the instruction-level CSV.
RoboDK’s `InstructionListJoints(...)` is the right tool for that. With `flags=4`, it includes the timing information and performs time-based splitting, and `time_step` sets the sampling step in seconds. RoboDK documents this output as a joint matrix with number of robot axes + 4 columns, so it works naturally for both 6-axis and 7-axis robots. 

Here is a small example you can run inside RoboDK on the attached station:
Code:
from robodk.robolink import Robolink, ITEM_TYPE_PROGRAM

RDK = Robolink()

prog = RDK.ItemUserPick('Select a Program', ITEM_TYPE_PROGRAM)
if not prog.Valid():
    raise Exception("No program selected")

# Dense time-based export
status_msg, joint_list, status_code = prog.InstructionListJoints(
    mm_step=1,
    deg_step=1,
    save_to_file="dense_joint_stream.csv",
    collision_check=0,
    flags=4,
    time_step=0.002
)

print("Status code:", status_code)
print("Status message:", status_msg)
print("Saved to dense_joint_stream.csv")


If you send me that dense export, I can compare it against the first audit and separate:
  • export-granularity effects
  • versus true continuity / physical-consistency issues

3) About the station you attached
Yes, I’m comfortable using the same station as the reference case.
However, I can’t directly execute thesend me the resulting `.rdk`  station on my side right now because I don’t have a RoboDK runtime in this environment. So the fastest path would be:
  1. open the attached station locally in RoboDK
  2. run the dense export snippet above
  3. send me the resulting  `dense_joint_stream.csv`  (and, if you like, the updated SIPA report)
That would let me do the second audit on the exact same case, but with much less export-related ambiguity.
If you want, once you generate that second CSV I can help compare both audits side by side.

P.S. A thought on the universality of NAR (Non-Associative Residual):
While we are focusing on the 7-axis case, it is important to note that the NAR problem is not a "7-axis quirk." It is a fundamental artifact of how modern simulators handle discrete-time integration.
Almost all current engines force associative logic (the belief that the order of algebraic composition doesn't matter) to gain computation speed. However, real-world physics is non-associative(Different orders lead to different results). When a solver "regroups" these operations over discrete steps, it leaves behind a residual.
In 6-DOF robots, this residual often hides inside Singularity transitions or Wrist Flips, leading to those unexplainable micro-jitters we see in high-precision tasks. My goal with NARH is to provide a unified metric to measure this "algebraic tax" across all kinematic structures, ensuring that what we see in RoboDK is what we get on the factory floor.
#17
Small update, Dhruti 

I’m attaching a ZIP test package with:
  • `sipa_roboDK_audit_6axis_7axis_v4.py`
  • updated `core/solver_fingerprint.py`
  • updated `core/root_cause.py`

This version adds:
  • a first 6-axis audit profile
  • a sampling-density warning to help distinguish export-related jumps from true continuity issues
So if you have a 6-axis RoboDK CSV available, this should be a better first-pass test than the earlier 7-axis-only path.
`6-axis`
```python sipa_roboDK_audit_6axis_7axis_v4.py --input your_6axis.csv --robot generic6 --unit auto```

`7-axis`
``` python sipa_roboDK_audit_6axis_7axis_v4.py --input your_7axis.csv --robot auto --unit auto```

If you try it on one of your 6-axis library exports, I’d be very interested to hear how it behaves.

This is still an experimental test package, not yet a final release.


Attached Files
.zip   SIPA_RoboDK_v2.4.zip (Size: 15.13 KB / Downloads: 26)
#18
Hi ZuoCen Liu!

I have attached the dense_joint_stream.csv for the older 7-DoF arm example along with the audit_report (dense_joint_stream).txt in the
.zip   SIPA old.zip (Size: 5.65 MB / Downloads: 25)
Also, I have attached the outputs for both 7-DoF (dense_joint_stream.csv) and 6-DoF (MainProgram.csv) along with the .rdk station files and their respective .csv files in the
.zip   SIPA v2.4.zip (Size: 7.87 MB / Downloads: 36)

One important thing to note here is that, I got a ValueError: array must not contain infs or NaNs with the Dispensing_3Axis.csv file
Know that the MainProgram.csv was exported using the CSV post processor in RoboDK and not the dense export code that you shared.

I am eager to hear your views on these tests!
#19
Hi Dhruti,
The `SIPA v2.4.zip` keeps prompting a download error. Could you check if this file can be downloaded normally? If not, please re-upload it or send it to my mailbox at liuzuocen@qq.com. Thank you very much.
#20
Hello,
I have sent the file through your mail :)
  




Users browsing this thread:
1 Guest(s)