# Moro 0.7.0 — Release Notes Moro 0.7.0 expands trajectory generation, numerical dynamics and workspace exploration. This page documents its functionality, compatibility changes and migration from 0.6.x. ## Highlights Moro 0.7.0 focuses on **advanced trajectories and numerical exploration**: - **Multi-waypoint trajectories:** joint and Cartesian-position paths with piecewise linear, cubic or quintic interpolation; documented C0/C1/C2 continuity, prescribed interior derivatives and a shape-preserving cubic option. - **Trapezoidal joint motion:** synchronized triangular/trapezoidal rest-to-rest profiles with optional duration and phase metadata. - **Physical-time playback:** Three.js animation using trajectory timestamps, including nonuniform intervals and playback speed. - **Inverse dynamics of trajectories:** evaluate ideal generalized forces across sampled joint states in a single call. - **Workspace exploration:** selectable joint-space sampling methods, approximate Cartesian sections, and interactive Three.js plotting. T-05 (general trajectory velocity/acceleration feasibility limits), friction, external loads, and advanced workspace metrics are not included in this release. For worked examples, see [Trajectory Generation](../user-guide/trajectories.md), [Physical-Time Playback](../examples/physical-time-playback.md), [Inverse Dynamics of Joint Trajectories](../examples/inverse-dynamics-trajectories.md), and [Workspace Sections](../examples/workspace-sections.md). ## Migration from 0.6.x | Earlier code / feature | Moro 0.7.0 | Compatibility note | | --- | --- | --- | | `viz.plot(num_vals=values)` | `viz.plot(configuration=values)` | Named argument renamed directly; positional calls unchanged | | `viz.animate(num_vals_list=frames)` | `viz.animate(configurations=frames)` | Named argument renamed directly; positional calls unchanged | | `fig, ax = plot_workspace(workspace)` | `fig, ax = plot_workspace(workspace, backend="matplotlib")` | Default is Three.js HTML | | `Robot.dynamic_model_matrix_form()` | `Robot.dynamic_model()` | Removed deprecated alias | | `moro.util.is_SO3()` / `isrot()` | `moro.transformations.is_rotation_matrix()` | Removed wrappers; predicate can return `None` | | `moro.util.is_SE3()` / `ishtm()` | `moro.transformations.is_homogeneous_transform()` | Removed wrappers; predicate can return `None` | | `moro.plotting` | `moro.visualization` where applicable | Removed; specialized legacy helpers may need manual Matplotlib migration | `plot_workspace_section()` is new in 0.7.0, so it is not a breaking change to a published 0.6.x API. Like the workspace plotter, it returns Three.js HTML by default and a Matplotlib `(fig, ax)` when explicitly selected. Earlier `RobotVisualizer` Three.js defaults came from 0.6.0 and are **not** a new 0.7.0 change. No compatibility keyword aliases are retained for the renamed arguments. The new descriptive transformation predicates can report undecidable symbolic membership with `None`; for a strict Boolean use `is_rotation_matrix(R) is True` or `is_homogeneous_transform(T) is True`. ## Trajectory generation and physical-time playback ```python from moro import Robot from moro.abc import q1, q2 from moro.visualization import RobotVisualizer from moro.trajectory import ( joint_waypoint_trajectory, position_waypoint_trajectory, joint_trapezoidal_trajectory, ) robot = Robot( (1.0, 0, 0, q1, "r"), (0.8, 0, 0, q2, "r"), ) viz = RobotVisualizer(robot) motion = joint_waypoint_trajectory( [[0.0, 0.0], [0.5, -0.2], [1.0, 0.1]], [0.0, 1.0, 2.5], method="quintic", samples_per_segment=41, ) viewer = viz.animate(motion.q, times=motion.t, playback_speed=1.0) trapezoidal = joint_trapezoidal_trajectory( [0.0, 0.0], [1.0, -0.5], v_max=[0.6, 0.5], a_max=[1.0, 0.8], samples=101, ) ``` The `joint_waypoint_trajectory()` output has `t: (N,)` and `q/qd/qdd: (N, dof)`. `position_waypoint_trajectory()` uses `p/v/a: (N, 3)`. Segment continuity depends on interpolation and boundary conditions: linear C0, cubic C1, quintic C2. The default derivative policy stops at waypoints (without imposing a dwell). A cubic shape-preserving policy can estimate interior velocities. No global velocity/acceleration feasibility algorithm is implied by these features. The trapezoidal generator uses joint speed and acceleration bounds specifically for its synchronized **rest-to-rest profile**. This limited contract is distinct from deferred T-05. Its acceleration is piecewise constant with jumps; it is not jerk-limited or an actuator torque feasibility check. Physical-time playback is Three.js-only. The browser displays the original sample configurations at timestamps, without interpolating between them. Matplotlib keeps fixed-`interval` animation. ## Visualization: explicit model parameters In Moro 0.7.0, `RobotVisualizer` separates a changing joint configuration from fixed symbolic Denavit–Hartenberg parameters: ```python from moro import Robot from moro.abc import l1, l2, q1, q2 from moro.visualization import RobotVisualizer robot = Robot( (l1, 0, 0, q1, "r"), (l2, 0, 0, q2, "r"), ) viz = RobotVisualizer(robot) parameters = {l1: 1.0, l2: 0.8} viz.plot([0.5, -0.3], parameters=parameters) ``` For sampled joint motion, provide a sequence or a NumPy matrix with shape `(N, robot.dof)`: ```python # Given a joint trajectory with arrays traj.q and traj.t: viz.animate(traj.q, times=traj.t, parameters=parameters) ``` Both Three.js and Matplotlib receive the same numerical robot geometry. Time-stamped physical playback remains Three.js-only. The `parameters` mapping applies to every animation frame and does not alter the robot. ### Required migration: renamed keyword arguments The original first-argument names are replaced directly: | Moro 0.6.x | Moro 0.7.0 | | --- | --- | | `viz.plot(num_vals=values)` | `viz.plot(configuration=values)` | | `viz.animate(num_vals_list=frames)` | `viz.animate(configurations=frames)` | **Old named arguments are no longer accepted.** There are no compatibility keyword aliases and no deprecation period for these two names. Positional calls are **unchanged**, including: ```python viz.plot(values) viz.plot(values, "matplotlib") viz.animate(frames) viz.animate(frames, "threejs") ``` The `backend` parameter remains the second positional argument. The new `parameters` parameter is keyword-only. The public `evaluate_robot(robot, substitutions)` function is unchanged by API-001. ### Existing symbolic mappings still work There is no requirement to rewrite **complete symbolic substitution dictionaries**: ```python viz.plot({l1: 1.0, l2: 0.8, q1: 0.5, q2: -0.3}) ``` They remain valid for single poses and animations. The recommended representation for new code is a joint vector (or joint-only mapping) together with the separate `parameters` mapping. The new input validator rejects overlapping substitutions, unknown explicit parameters, missing DH symbols, invalid numeric values, and ambiguous numerical joint vectors for composite joint expressions. The names `configuration` and `configurations` refer to joint states and sequences of joint states, respectively, not model constants. ## Removed compatibility interfaces The 0.7.0 stabilization work removes interfaces deprecated in 0.5.0 and retained through 0.6.x. This is an intentional compatibility break: | Removed in 0.7.0 | Migration | | --- | --- | | `Robot.dynamic_model_matrix_form()` | `Robot.dynamic_model()` for the matrix equation; `Robot.euler_lagrange_equations()` for per-joint equations | | `moro.util.is_SO3()`, `moro.util.isrot()` | `moro.transformations.is_rotation_matrix()` | | `moro.util.is_SE3()`, `moro.util.ishtm()` | `moro.transformations.is_homogeneous_transform()` | | `moro.plotting` | `moro.visualization.RobotVisualizer` for manipulators, or `plot_workspace()` / `plot_workspace_section()` for sampled workspace displays | The descriptive transformation predicates can return `None` if membership is symbolically indeterminate, unlike the previous Boolean compatibility wrappers. When an explicit Boolean is required, compare the result with `True` (for example, `is_rotation_matrix(R) is True`). The old `moro.plotting` functions have **no one-to-one replacement for all legacy frame and Euler diagrams**; users relying on those specialized helpers must migrate their visualization code to Matplotlib primitives or the modern robot visualizer as appropriate. No deprecated wrapper module is retained. Historical 0.5.x and 0.6.x release notes continue to describe those releases as originally published. ## Sampled inverse dynamics Moro 0.7.0 introduces `inverse_dynamics_trajectory(robot, motion, *, parameters=None)`. The operation evaluates ideal inverse dynamics over the samples of a joint trajectory or simulation without preparing the symbolic M/C/G model again for every row: ```python from moro.dynamics import inverse_dynamics_trajectory tau_history = inverse_dynamics_trajectory(robot, traj) assert tau_history.shape == (traj.samples, robot.dof) ``` A compatible `motion` exposes finite numeric `q`, `qd` and `qdd` arrays, each shaped `(N, robot.dof)`. A `JointTrajectory`, a `DynamicsSolution`, or a structurally compatible object is accepted; no inheritance is required. An optional `t` array is validated, but time is not used to estimate velocities or accelerations. Symbolic geometry, mass, inertia and gravity constants can be provided through `parameters`. The result is an independent NumPy `(N, dof)` array of ideal generalized torques and/or forces. For errors, Moro reports invalid fields or the zero-based index of a failing sample. **Scope:** the initial API does not include friction, contact, external wrenches, actuator limits or dynamic feasibility checks. `inverse_dynamics()` remains a single-state operation, and `moro.trajectory` remains independent of dynamics. For a notebook-ready comparison of two RR motions with identical endpoints and duration, see [Inverse Dynamics of Joint Trajectories](../examples/inverse-dynamics-trajectories.md). ## Workspace visualization: Three.js by default The workspace plotter now matches `RobotVisualizer`: **Three.js is the default backend** for `plot_workspace(workspace)` and returns interactive `IPython.display.HTML`. The viewer supports sampled XY, XZ, YZ and 3D projection, camera presets, perspective/orthographic modes and Fit View. Matplotlib remains available explicitly: ```python from moro.visualization import plot_workspace viewer = plot_workspace(workspace) # Three.js fig, ax = plot_workspace(workspace, backend="matplotlib") ``` This is a deliberate incompatible change from Moro 0.6.x: code that used `fig, ax = plot_workspace(workspace)` must now pass `backend="matplotlib"`. There is no compatibility alias or implicit Matplotlib fallback. `ax`/`figsize` remain Matplotlib-only; `width`/`height` are Three.js-only and rejected by Matplotlib. `plot_workspace_section(section)` also defaults to Three.js and returns HTML; `backend="matplotlib"` preserves its `(fig, ax)` return. Both workspace and section viewers accept `show_grid=False` by default; set `show_grid=True` for a grid oriented to the plotted plane. Empty sections are supported in Three.js at the requested nominal plane level. The workspace sampler and Cartesian section algorithms are independent of these backends and do not infer exact reachability boundaries. ## Examples and further reading - [Symbolic DH Parameters in Robot Visualization](../examples/symbolic-visualization-parameters.md) - [Physical-Time Animation Playback](../examples/physical-time-playback.md) - [Trapezoidal Joint-Space Trajectories](../examples/trapezoidal-trajectories.md) - [Inverse Dynamics of Joint Trajectories](../examples/inverse-dynamics-trajectories.md) - [Dynamics User Guide](../user-guide/dynamics.md) - [Visualization User Guide](../user-guide/visualization.md)