Skip to content

PHX Toolbox 2.0.0 (technical preview)

Choose a tag to compare

@LuborZhanal LuborZhanal released this 16 Nov 18:58
· 87 commits to main since this release

Bump toolbox to 2.0.0

PHX 2 runs on a new physics engine: Jolt Physics with modified and custom
solvers. It is more accurate (the joints of a
mechanism are solved together and directly, contacts and joints iterate until
they converge), runs on several threads with the same results on any number of
them, and brings deformable bodies and particles. Scripts and saved scenes of
PHX 1.x need some changes; the user guide topic "Upgrading from PHX 1.x" lists
them all, and the skill phx-upgrade-from-1x helps an AI agent port a scene.

New

  • Deformable bodies and particles: phx.SoftBody (triangle mesh, e.g. an
    inflated ball), phx.FlexibleBody (solid of tetrahedra, built from a shape or
    a PDE Toolbox mesh), phx.IntersectionWeld (holds a rigid body inside a
    deformable one) and phx.Particles (thousands of spheres simulated and drawn
    in bulk)
  • phx.TorsionSpring; phx.Spring and phx.Rope are now solved by the engine and
    stay stable at high stiffness
  • phx.engine.Settings replaces phx.engine.BulletSettings: LengthScale with
    automatic collision tolerances, solver tolerances and iteration caps, and
    Threads for multithreaded steps
  • Accuracy diagnostics: the DiagnosticInfo property and getDiagnosticReport
    method of phx.Simulation report solver convergence, penetrations and joint
    gaps, and warn with a remedy
  • phx.Body: CenterOfMass, LinearAcceleration and AngularAcceleration,
    XAxis/YAxis/ZAxis to point a body axis, RollingResistance and SpinRadius
  • Joint limits: Limits of RevoluteJoint and PrismaticJoint, LinearLimits and
    AngularLimits of CylindricalJoint, ConeAngle and TwistLimits of
    SphericalJoint; phx.assembly.import reads joint limits from URDF and
    rigidBodyTree
  • Shapes: truncated cones (phx.shape.Cone with Diameter [d1 d2]), tubes with
    different bores at their ends, Envelope "cones" of phx.shape.Revolution for
    an exact solid of revolution; Box, Sphere, Cylinder, Cone, Capsule and Tube
    give the meshes of soft and flexible bodies
  • phx.Simulation: the new default RedrawMode "adaptive" animates long steps
    at the speed of the display; FrameSpacing

Changed (details in "Upgrading from PHX 1.x")

  • Simulations give different numbers than in PHX 1.x; joints hold tighter
  • Friction of phx.Body is a scalar Coulomb coefficient (rolling and spinning
    resistance are the new RollingResistance and SpinRadius)
  • Limits of GenericJoint and BushingJoint are the 3x2 matrices LinearLimits
    and AngularLimits, a free axis is [-Inf Inf]; the angles are measured
    differently
  • AppliedForce and AppliedTorque act until they are changed (applyForce and
    applyTorque act for one step); on joints they add to the motor
  • A body has its centre of mass where its shape has it (cones, meshes,
    extrusions, revolutions), no longer at its origin
  • The default redrawStep of phx.Simulation.step is 1 (redraw whenever useful)
  • phx.Resistance: EnvironmentLinearVelocity and EnvironmentAngularVelocity
    (the old names warn), rotation by the right-hand rule
  • Colormap of phx.Spring and phx.Rope is an N-by-3 matrix
  • Removed: the Taper of phx.shape.Tube, the Solver and AutoActivated engine
    settings, phx.engine.switchEngine, RedrawMode "interactive"; the engine
    gateway phx.engine.io is replaced by phxEngine with a new protocol
  • Scenes saved in PHX 1.x load and simulate; values without a counterpart
    fall back to their defaults

Examples

  • New: airbag, cantilever, cartpendulum, coaster, delta, plow, softball,
    soilparticles
  • cartpendulum replaces joints and springs, shapes takes over textures
  • Removed: crystal, galton, optimize, reversetime
  • All examples retuned for the new engine

Documentation

  • New user guide topics: Units, Scale and Engine Settings; Soft Bodies,
    Flexible Bodies and Particles; Upgrading from PHX 1.x
  • Reference pages of the new classes; updated skills, new skill
    phx-upgrade-from-1x