Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions continuum_robot/demo/sci_fi_waypoint_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,34 +76,37 @@
# Preset of 18 normalized 4D waypoints. Each entry is
# ``[bottom_x, bottom_y, top_x, top_y]`` in tip-target convention.
# Designed (not random) so that:
# - the two X axes are near anti-phase (bottom_x ≈ -top_x): the bottom and
# top segments counter-bend, so streaming through them makes the spine
# undulate like a wave / slither instead of leaning one way;
# - the Y axes wander on incommensurate frequencies for an organic, weird
# feel that never quite repeats;
# - the two X axes are STRICTLY anti-phase (top_x = -bottom_x): segment 1
# bends +X exactly when segment 2 bends -X, and they alternate sign step
# to step. Streaming through them makes the spine counter-bend and
# undulate like a wave / slither -- the clearest "two-segment" read on
# camera. (X sign alternates on ~88% of consecutive steps.)
# - the Y axes writhe on a SUM of two incommensurate sinusoids each, so the
# out-of-plane motion is aperiodic and weird, never quite repeating;
# - consecutive waypoints stay >= 0.7 norm apart in 4D (visual variety);
# - both bottom and top components are non-trivial at every step.
# Generated via sin/cos with step 2.4, X anti-phase offset 2.6 rad; see the
# repo history for the generator. Scaled by amplitude_cm at runtime.
# Generated with bottom_x=sin(t), top_x=sin(t+pi)=-bottom_x (step 2.8) and
# Y = 0.62*sin(f1) + 0.38*sin(f2) on incommensurate f1,f2; see repo history.
# Scaled by amplitude_cm at runtime.
PRESET_WEIRD_WAYPOINTS_NORM: tuple[tuple[float, float, float, float], ...] = (
( 0.00, 0.56, 0.52, 0.96),
( 0.68, -1.00, -0.96, 0.89),
(-1.00, 0.62, 0.90, 0.34),
( 0.79, 0.27, -0.37, -0.41),
(-0.17, -0.94, -0.36, -0.93),
(-0.54, 0.84, 0.89, -0.93),
( 0.97, -0.05, -0.96, -0.42),
(-0.89, -0.77, 0.52, 0.32),
( 0.34, 0.97, 0.19, 0.89),
( 0.38, -0.37, -0.80, 0.96),
(-0.91, -0.53, 0.99, 0.50),
( 0.95, 1.00, -0.66, -0.24),
(-0.50, -0.65, -0.02, -0.84),
(-0.21, -0.23, 0.69, -0.98),
( 0.82, 0.92, -1.00, -0.57),
(-0.99, -0.86, 0.78, 0.15),
( 0.64, 0.09, -0.16, 0.79),
( 0.04, 0.75, -0.55, 0.99),
( 0.00, 0.66, 0.00, 0.46),
( 0.33, -0.60, -0.33, 0.20),
(-0.63, -0.39, 0.63, 0.95),
( 0.85, 0.80, -0.85, 0.54),
(-0.98, 0.01, 0.98, 0.20),
( 0.99, -0.82, -0.99, 0.65),
(-0.89, 0.39, 0.89, -0.14),
( 0.68, 0.65, -0.68, -0.38),
(-0.40, -0.71, 0.40, -0.05),
( 0.07, -0.31, -0.07, -0.84),
( 0.27, 0.88, -0.27, -0.67),
(-0.58, -0.11, 0.58, -0.24),
( 0.82, -0.84, -0.82, -0.78),
(-0.96, 0.52, 0.96, -0.15),
( 1.00, 0.60, -1.00, 0.27),
(-0.92, -0.82, 0.92, -0.12),
( 0.73, -0.21, -0.73, 0.66),
(-0.46, 0.93, 0.46, 0.73),
)


Expand Down
Loading