You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair numerical IK restart validation
Work in the frozen source tree at /app/vendor/robotics-toolbox-python.
The numerical inverse-kinematics solvers use random restarts when no explicit initial
configuration is available. That restart operation exists in both the Python solver
helper and the compiled ETS fast path. Models containing non-finite joint-limit
metadata currently reach those samplers and fail inconsistently or contaminate the
restart state.
Repair the existing implementation with these requirements:
Modify both src/roboticstoolbox/robot/IK.py and
src/roboticstoolbox/ets/cpp-extensions/ik.cpp; a one-backend repair is incomplete.
Reject NaN, positive infinity, or negative infinity in any lower or upper joint
limit before consuming random-number state or producing a restart sample.
Expose ValueError to Python callers. The diagnostic must identify joint-limit
validation and the offending joint index and values sufficiently to locate bad
robot metadata.
Preserve existing valid behavior: seeded sampling remains deterministic, scalar
and batched requests retain shape (count, joint_count), and every sample remains
inside its closed finite interval. Zero-width finite intervals remain valid.
Do not clamp, replace, or invent finite limits, and do not bypass the native path,
replace the library with a standalone implementation, or modify tests to hide the
defect.
After repairing the source, run the offline integration check:
sh
cd /app/vendor/robotics-toolbox-python
python3 /app/tools/run_validation.py > /app/output.json
The command must succeed and produce /app/output.json with schema version
robotics.ik_restart_validation.v1. Network access and package installation are not
available.