# Inertia and Activity: Spiral transitions in semi-flexible, self-avoiding
polymers

Chitrak Karan<EMAIL_ADDRESS>Institute of Physics, Sachivalaya Marg,
Bhubaneswar 751005, India  Homi Bhabha National Institute, Training School
Complex, Anushakti Nagar, Mumbai 400094, India  Abhishek Chaudhuri
<EMAIL_ADDRESS>Department of Physical Sciences, Indian Institute
of Science Education and Research Mohali, Sector 81, Knowledge City, S. A. S.
Nagar, Manauli PO 140306, India  Debasish Chaudhuri<EMAIL_ADDRESS>Institute of Physics, Sachivalaya Marg, Bhubaneswar 751005, India  Homi Bhabha
National Institute, Training School Complex, Anushakti Nagar, Mumbai 400094,
India

(August 28, 2024)

###### Abstract

We consider a two-dimensional, tangentially active, semi-flexible, self-
avoiding polymer to find a dynamical re-entrant transition between motile open
chains and spinning achiral spirals with increasing activity. Utilizing
probability distributions of the turning number, we ascertain the comparative
stability of the spiral structure and present a detailed phase diagram within
the activity inertia plane. The onset of spiral formation at low activity
levels is governed by a torque balance and is independent of inertia. At
higher activities, however, inertial effects lead to spiral destabilization,
an effect absent in the overdamped limit. We further delineate alterations in
size and shape by analyzing the end-to-end distance distribution and the
radius of gyration tensor.The Kullback-Leibler divergence from equilibrium
distributions exhibits a non-monotonic relationship with activity, reaching a
peak at the most compact spirals characterized by the most persistent
spinning. As inertia increases, this divergence from equilibrium diminishes.

##  I Introduction

Active polymers are ubiquitous in biological systems Alberts2018 .
Biofilaments like microtubules and actin filaments constitute the cytoskeleton
of the cell, providing its mechanical stability and helping in cell motility
and response. On the other hand, the main ingredient of chromosomes in the
cell nucleus is the semiflexible polymer DNA. These polymers are driven out of
equilibrium by active processes, e.g., treadmilling and active stress
generation by molecular motors in crosslinked cytoskeletal filaments or the
active drive by RNA polymerase during DNA transcription. Such active processes
involve local energy consumption, such as via hydrolysis of ATP or GTP,
generating directed motion or stress so that equilibrium fluctuation-
dissipation relation and detailed balance are no longer valid. Another
prominent example is bacterial locomotion, involving the active rotation of
flagella Wadhwa2022 . Motivated by such natural examples, a number of
reconstituted or artificial active filament systems have been prepared and
studied over the last decades Sanchez2011 ; Li2011 ; Sasaki2014 ; Vach2015 ;
Martinez2015 ; Zhang2015 . One prominent example is molecular motor assay, in
which cytoskeletal filaments move actively under the influence of conjugate
molecular motors attached at one end irreversibly to a substrate, with the
other end walking on the filaments Schaller2010 .

In micron-sized molecular systems, the typical inertial time scale $\sim 100$
ns is much smaller than the typical persistence time $\sim 1$ s Kurzthaler2018
, and thus the inertial effect can be ignored. The microscopic dynamics of
cilia or flagella Bray2000 ; Fulford1986 ; Gilpin2020 , actin filaments and
microtubules in cytoskeleton Fletcher2010 ; Huber2013a ; Prost2015  or
artificial motility assays Kron1986 ; Bourdieu1995 , and in Janus colloid
chains Nishiguchi2018  are describable within overdamped motion of active
filaments Sekimoto1995 ; Laskar2013a ; Chelakkot2014 ; Ghosh2014 ; Isele2015 ;
Anand2018 ; Duman2018 ; Prathyusha2018 ; Fily2020 ; Philipps2022 . Cilia-like
beating and spiral rotation of overdamped semiflexible filaments at high
enough activity were predicted in theoretical studies as observed in earlier
motility assay experiments Sekimoto1995 ; Fily2020 ; Isele2015 ; Bourdieu1995
; Kron1986 ; Gupta2019 ; Shee2021 ; Karan2023 .

Nonetheless, filamentous objects of macroscopic size, including natural
examples like millipedes, worms, and snakes and engineered entities such as
granular, robotic, or hexbug chains, can exhibit significant inertial effects
Ozkan-Aydin2021 ; Garcia2021 ; Marvi2014 ; Hu2009 ; Bhat2023 ; Safford2009 ;
Zheng2023 . This is crucial in shaping these systems’ dynamics and steady-
state properties. Recent studies suggest that inertia suppresses motility-
induced phase separation omar23 ; Mandal2019  and instability in active
nematics chatterjee2021inertia  and affects diffusivity, mobility, and kinetic
temperature in active Brownian particles Khali2024 ; Patel2023 ;
patel2024exact . However, despite its recognized importance, the role of
inertia in active filament motion is not well-understood, with only limited
studies highlighting differences between inertial and non-inertial dynamics in
flexible chains Fazelzadeh2023 .

In this paper, we carefully study tangentially active semiflexible filaments
to investigate the impact of inertia on their conformational states and
dynamics. Using extensive numerical simulations, we obtain a detailed phase
diagram as a function of activity and inertia, identifying the two dynamic and
conformational phases, e.g., the motile open chain (MOC) and spinning achiral
spirals (SAS). We present analytic arguments to describe the observed phase
boundaries. In the MOC state, the filament displays persistent motion, with
the persistence decreasing inversely with activity. In contrast, the SAS state
shows clockwise or counter-clockwise rotation around the filament’s center of
mass. The rotation speed increases linearly with activity. Our study reveals a
remarkable re-entrant transition for inertial active polymers from MOC to SAS
to MOC with increasing activity, highlighting the absence of the re-entrance
in the overdamped limit.

The rest of the paper is structured as follows. In section II, we describe the
model and the dimensionless control parameters. After that, in section III, we
present the numerical analysis and results, scaling arguments, behavior of
excess kurtosis, the unwinding process in the model, and size and shapes.
Finally, section IV summarizes the main results with concluding remarks.

##  II Model

We consider an extensible, semi-flexible, self-avoiding polymer (Fig.1$(a)$)
of $N$-beads described by monomer positions ${\bf r}_{1},\leavevmode\nobreak\
{\bf r}_{2},...,\leavevmode\nobreak\ {\bf r}_{N}$, and bond vectors ${\bf
b}_{i}={\bf r}_{i+1}-{\bf r}_{i}$ ($i=1,2,...,N-1$) with local tangents
$\hat{\bf{t}}_{i}={\bf b}_{i}/|{\bf b}_{i}|$. The chain connectivity is
maintained by a stretching energy,

$\displaystyle{\mathscr{E}}_{s}=\frac{k_{s}}{2}\sum_{i=1}^{N-1}\left[{\bf
b}_{i}-r_{0}\hat{\bf{t}}_{i}\right]^{2},$ (1)

where $k_{s}$ is the spring constant and $r_{0}$ is the equilibrium bond
length. The semi-flexibility is described by the bending rigidity $\kappa$ and
the local bending energy cost

$\displaystyle{\mathscr{E}}_{b}=\frac{\kappa}{2r_{0}}\sum_{i=1}^{N-2}\left[\hat{\bf{t}}_{i+1}-\hat{\bf{t}}_{i}\right]^{2}.$
(2)

The self-avoidance is modeled by the short-range Weeks-Chandler-Anderson (WCA)
repulsion between the non-bonded pairs of monomers $i$ and $j$,

$\displaystyle{\mathscr{E}}_{\rm
WCA}(r_{ij})=\begin{cases}4\epsilon\left[\left(\frac{\sigma}{r_{ij}}\right)^{12}-\left(\frac{\sigma}{r_{ij}}\right)^{6}+\frac{1}{4}\right],&\text{for
}r_{ij}<2^{1/6}\sigma,\\\ 0,&{\rm otherwise},\end{cases}$ (3)

where $\epsilon$ sets the strength of repulsion and $\sigma$ the size of
repulsive core. The total energy cost
${\mathscr{E}}={\mathscr{E}}_{s}+{\mathscr{E}}_{b}+\sum^{\prime}_{i,j}{\mathscr{E}}_{\rm
WCA}(r_{ij})$ describes the equilibrium semi-flexible polymer, where the last
sum is over all non-bonded pair of monomers.

The activity is implemented via the self-propulsion force ${\bf F}_{p}$, which
is expressed in terms of the constant magnitude $f_{a}$ along the local
tangent, such that

$\displaystyle{\bf F}_{p}=\sum_{i=1}^{N-1}f_{a}\hat{\bf{t}}_{i}\,.$ (4)

This implementation is the same as Sekimoto1995  and differs from Isele2015
in which the magnitude of the active force depends on the local bond length.

The dynamics of the filament are described by the underdamped Langevin
equation for each monomer,

$\displaystyle m\dot{\bf v}_{i}=-\gamma({\bf v}_{i}-v_{0}{\bf
u}_{i})-\bm{\nabla}_{i}{\mathscr{E}}+\gamma\sqrt{2D}\leavevmode\nobreak\
\bm{\eta}_{i}(t),$ (5)

where ${\bf v}_{i}$ is the velocity of $i$-th particle, and ${\bf
u}_{i}=(\hat{\bf{t}}_{i-1}+\hat{\bf{t}}_{i})/2$ with $i=2,\dots,N-1$, with the
boundary terms ${\bf u}_{1}=\hat{\bf{t}}_{1}/2$, ${\bf
u}_{N}=\hat{\bf{t}}_{N-1}/2$. Note that the tangential self-propulsion acting
along the bonds leads to this effective active force on individual monomers.
Moreover, the equilibrium diffusion constant $D=k_{B}T/\gamma$, and the
Gaussian random noise obeys $\langle\bm{\eta}_{i}(t)\rangle=0$ and
$\langle\bm{\eta}_{i}(t)\otimes\bm{\eta}_{j}(0)\rangle=\delta_{ij}\delta(t)\mathbb{1}$.
In the above equation, we used $f_{a}=\gamma v_{0}$ with $v_{0}$ denoting the
self-propulsion speed. The length, energy, and time scales are set by
$\sigma$, $k_{B}T$, and $\tau_{d}=\gamma\sigma^{2}/k_{B}T$, the time to
diffuse over $\sigma$. The dynamics is controlled by the microscopic inertial
relaxation time $\tau_{m}=m/\gamma$, and active time $\tau_{a}=\sigma/v_{0}$,
which can be expressed in terms of the following two dimensionless control
parameters

$\displaystyle
M=\frac{\tau_{m}}{\tau_{d}}=\frac{mk_{B}T}{\gamma^{2}\sigma^{2}},\leavevmode\nobreak\
{\rm and}$ (6) $\displaystyle{\rm
Pe}=\left(\frac{\tau_{a}}{\tau_{d}}\right)^{-1}=\frac{f_{a}\sigma}{k_{B}T}.$
(7)

We perform numerical simulations of $N=64$ bead chains in two dimensions (2d)
using the velocity-Verlet scheme. We use $\epsilon=k_{B}T$ and $r_{0}=\sigma$
for simplicity. The choice of spring constant $k_{s}=10^{3}k_{B}T/r_{0}^{2}$,
keeps the relative mean-squared fluctuation of bond lengths
$\sqrt{\langle\delta b^{2}\rangle}/r_{0}<4\%$ for a chain of mean length
$L=(N-1)r_{0}$, where $\delta b$ is the deviation of bond length from $r_{0}$.
For the worm-like chain model of semiflexible polymers, the equilibrium
persistence length $\ell_{p}=2\kappa/k_{B}T$ in two dimensions. The
persistence parameter $u=L/\ell_{p}$ controls if the chain behaves like a
rigid rod ($u\approx 1$) or flexible chain ($u\approx 10$). In the
intermediate parameter values, the effect of semiflexibility is most
pronounced, e.g., in 2d, the regime $3\lesssim u\lesssim 4$ displays clear
double minima in the Helmholtz free energy corresponding to the coexistence of
rigid-rod and flexible chain behaviors in the equilibrium Dhar2002 ;
Chaudhuri2007 . We choose $u=3.33$ in this study.

We express Eq.(5) in the following dimensionless form, to perform the
numerical simulations

$\displaystyle M\frac{d\tilde{\bf v}_{i}}{d\tilde{t}}=-(\tilde{\bf v}_{i}-{\rm
Pe}\,{\bf u}_{i})-\tilde{\bm{\nabla}}_{i}U+\tilde{\bm{\eta}}_{i}(t),$ (8)

where $\tilde{{\bf v}}_{i}={\bf v}_{i}\tau_{d}/\sigma$,
$\tilde{t}=t/\tau_{d}$, $\tilde{\bm{\nabla}}_{i}=\sigma\bm{\nabla}_{i}$,
$U={\mathscr{E}}/(k_{B}T)$, and
$\tilde{\bm{\eta}}_{i}=\sqrt{\tau_{d}}\bm{\eta}_{i}$. In the integration, we
use a time-step size $\delta{\tilde{t}}=10^{-4}$ in all the simulations. The
results presented in this paper used simulations over $10^{10}$ time steps
with gaps of $10^{4}$ steps to obtain uncorrelated statistics.

##  III Results

Figure 1: (colour onlie) $(a)$ Schematic diagram of tangentially driven
polymer in two dimensions. $(b)$ Calculation of the differential turning
number of the chain between two consecutive monomers. $(c)$ Typical time
series of the turning number with different steady-state representations.
$(d)$ $M$ vs. ${\rm Pe}$ phase diagram. Cross ( $\times$) denotes stable open
and meta-stable spiral phase. Circle-dot ( $\odot$) denotes stable spiral and
meta-stable open phase. Background colors denote the excess kurtosis
(${\pazocal K}_{\psi_{N}}$) with a color bar showing the numerical values.
Configurations of stable states of corresponding points are shown. In the
phase diagram, the green dashed line approximately denotes the transition from
the meta-stable spiral to the stable spiral phase, and the pink dashed denotes
the transition from the stable spiral to the meta-stable spiral phase, showing
the scaling obtained in Eq.(15). Black solid line at ${\rm Pe}=0.1$ denotes
the ${\rm Pe}_{c}$ obtained in Eq.(12). $(e)$ The variance
$\langle\psi_{N}^{2}\rangle$ as a function of ${\rm Pe}$ at different values
of $M$ denoted in the figure legend. The non-monotonicity at higher $M$
indicates re-entrant transition.

In the ${\rm Pe}$-$M$ phase space, we observe spontaneous spiral formation in
a wide range of parameter values. The spirals characterized by the turning
number (Fig. 1$(b)$)
$\psi_{N}=(1/2\pi)\left(\sum_{i=1}^{N-1}[\theta_{i+1}-\theta_{i}]\right)$,
where $\theta_{i}$ is the angle subtended by the local tangent
$\hat{\bf{t}}_{i}=\cos{\theta_{i}}{\hat{x}}+\sin{\theta_{i}}{\hat{y}}$. The
quantity $\psi_{N}$ calculates the number of turns the chain takes between two
ends, with $\psi_{N}=0$ denoting an open chain configuration. The negative and
positive values of $\psi_{N}$ denote clockwise and counter-clockwise turns in
the spiral.

The polymer dynamically transits between spiral and open states at adequately
high activity. Fig. 1$(c)$ shows a typical time series of $\psi_{N}$ where
three possible states appear: an open state where $\psi_{N}$ fluctuates around
zero, and clockwise and anti-clockwise spiral states with equal and opposite
values of $\psi_{N}$. In the absence of chirality, both kinds of spirals are
equally likely.

One can calculate the steady-state distributions of $\psi_{N}$ from the time
series at different ${\rm Pe}$ and $M$ values. For the achiral system under
consideration, this distribution is symmetric around $\psi_{N}=0$ and, in
general, shows three maxima, one at $\psi_{N}=0$, denoting the open state, and
the other two maxima of equal heights at $\psi_{N}=\pm\lambda$, denoting the
clockwise and counter-clockwise spiral states. We identify two distinct phases
from the relative weights: $(a)$ motile open chain (MOC) in which the open
state is more probable, and $(b)$ spinning achiral spirals (SAS) in which the
spiral state is more probable.

###  III.1 ${\rm Pe}-M$ phase diagram

Fig. 1$(d)$ shows the phase diagram for the active polymer with the variation
of control parameters ${\rm Pe}$ and $M$. The phase diagram shows regions of
two phases, SAS and MOC, having two boundaries: $(a)$ The first boundary at
lower ${\rm Pe}$ is independent of $M$. This line characterizes the transition
from a stable MOC to a stable SAS. ($b$) The second boundary at higher ${\rm
Pe}$ which depends on $M$ as $1/M$ marks a re-entrant transition from stable
SAS to stable MOC.

The phase diagram also shows a heat map of the excess kurtosis of turning
number ${\pazocal K}_{\psi_{N}}$, defined as

$\displaystyle{\pazocal
K}_{\psi_{N}}=\frac{\langle\psi_{N}^{4}\rangle}{3\langle\psi_{N}^{2}\rangle^{2}}-1.$
(9)

As we show later, the vanishing and positive ${\pazocal K}_{\psi_{N}}$ regimes
correspond to MOC, and the negative values denote SAS. A detailed analysis of
kurtosis and its relevance in accurately identifying the phases is presented
in Sec.III.2.

The first phase boundary describing the onset of spiral formation can be
estimated using the torque balance condition. For a SAS of radius $R$, it
reads $\Gamma\omega=f_{a}R-\kappa/R$ interpreting $f_{a}$ as the self-
propulsion force acting on each monomer, and using $\Gamma$ to represent the
rotational drag and $\omega$ denoting rotational speed of the spiral. At the
onset of SAS, $\omega=0$, we obtain the condition

$\displaystyle f_{a}^{(c)}=\kappa/R^{2}.$ (10)

This corresponds to a critical Péclet, ${\rm
Pe}_{c}=f_{a}^{(c)}\sigma/k_{B}T$, which determines the onset of spirals for
${\rm Pe}>{\rm Pe}_{c}$. This value depends on the bending rigidity $\kappa$
but is independent of $M$. Such a prediction agrees with the small ${\rm Pe}$
phase boundary in Fig. 1$(d)$.

For larger $f_{a}$ the spiral will start to rotate. At the beginning of the
rotation, the viscous drag $\Gamma\omega=\tilde{R}(f_{a}-f_{a}^{(c)})$ leading
to

$\displaystyle\omega\approx\frac{\tilde{R}}{\Gamma}(f_{a}-f_{a}^{(c)}),$ (11)

a behavior corroborated in Fig. 4($c$). For a single turn of spiral
$\tilde{R}=L/2\pi$. Therefore, at the onset of the spiral formation

${\rm
Pe}_{c}=\frac{f_{a}^{(c)}\sigma}{k_{B}T}=\frac{\ell_{p}\sigma}{2\tilde{R}^{2}}=\frac{2\pi^{2}\sigma}{uL}$
(12)

with $u=L/\ell_{p}$. For the choice of $u=3.33$ and $L=(N-1)\sigma$ with
$N=64$, we get ${\rm Pe}_{c}\approx 0.1$. This estimate agrees well with the
fitting of Fig.4($c$). This is the minimum ${\rm Pe}$ required for spiral
formation, but spirals become a dominant state at a far higher ${\rm Pe}\sim
1$, as indicated in the phase diagram.

Increasing ${\rm Pe}$ generates higher torque, leading to more compact
spirals. Such compaction reduces available space at the center of a spiral,
reducing the probability of the leading tip turning stochastically in the
wrong direction and opening up. As a result, the stability of the spirals
increases as we increase ${\rm Pe}$ from small to intermediate values; see
Fig. 1$(e)$. The absolute turning number $\langle|\psi_{N}|\rangle$ of the
spiral increases with ${\rm Pe}$, and the spiral gets tighter (see
Appendix-A). However, a further higher ${\rm Pe}$ destabilizes the spirals,
reducing the probability of their appearance and leading to a re-entrant
transition to MOC at a higher ${\rm Pe}$. The mean turning number
$\langle|\psi_{N}|\rangle$ of the spirals decreases with $M$ (see Appendix-A).
We must carefully consider their dynamic unwinding mechanism to understand the
spiral instability.

Fig. 2 shows snapshots of the spiral unwinding process. The clockwise rotating
leading tip, denoted by the black arrow, turns around spontaneously in the
anti-clockwise direction, destabilizing the spiral. This eventually unwinds
the whole spiral. For the leading tip turnaround, it is necessary to have
enough open space at the center of the spiral. In the presence of inertia,
high activity leads to enhanced inertial recoil, allowing the self-propelling
tip to move away from its propulsion direction, creating more space and
opportunities for the turnarounds that destabilize the spiral.

To understand this behavior, we must consider the effect of inertial recoil on
the spiral. As we increase activity, $\tau_{a}$ decreases, increasing the
collision frequency. Collisions of the leading tip with the nearest segments
impart force. This picture is similar to a ball bouncing on a wall in the
presence of gravitational force. Within this setting, the equation of motion
of the leading tip having mass $m$ can be expressed as

$\displaystyle m\frac{dv}{dt}=-\gamma
v+f_{a}-f_{a}\tau_{c}\delta(t-\tau_{c}),$ (13)

with collision time $\tau_{c}\approx\ell/v_{0}\propto\tau_{a}$ for a gap
$\ell$, and assuming that the opposite impulse at collision is given by the
active force $f_{a}$ due to the surrounding particles. A straightforward
calculation shows,

$\displaystyle
v(t)=\frac{f_{a}}{\gamma}-\frac{f_{a}\tau_{c}}{m}\exp\left(-(t-\tau_{c})/\tau_{m}\right),$
(14)

where the inertial relaxation time $\tau_{m}=m/\gamma$. The recoil allows the
velocity to change sign at collision, $t=\tau_{c}$, to give
$f_{a}(1/\gamma-\ell/v_{0}m)=0$. Using $\ell=\sigma$, this leads to the
condition $mv_{0}/\gamma\sigma=1$, i.e., $\tau_{m}/\tau_{a}=1$.

Figure 2: (colour online) Unwinding dynamics for $M=1$ and ${\rm Pe}=3$. The
chain’s color gradient denotes the chain’s monomer index, with red as the head
and blue as the tail. Black arrowheads show the propulsion directions of the
polymer head. Violet arrows indicate the particle’s direction of motion that
triggers the unwinding process. The red arrow in the last panel points out the
head.

As long as $\tau_{a}>\tau_{m}$, inertial recoil does not affect the dynamics,
and active motion is regained between consecutive collisions. In the presence
of finite inertia, as we increase ${\rm Pe}$, $\tau_{a}$ decreases, and the
probability of turnarounds due to recoil increases. As a result, SAS state
gets destabilized as $\tau_{a}\lesssim\tau_{m}$. This leads to the estimate of
the re-entrant phase boundary,

$\displaystyle{\rm Pe}\propto 1/M.$ (15)

This prediction shows reasonable agreement with the upper phase boundary in
Fig. 1$(d)$.

On the other hand, in the overdamped limit of $\tau_{m}=0$, the terminal speed
$v_{0}=f_{a}/\gamma$ is regained instantaneously after every collision. In the
absence of recoil, this does not allow for the change in orientation and
thereby suppresses any possibility for re-entrance.

####  III.1.1 Dynamical characterization: center of mass motion

Figure 3: (colour onlie) Mean-squared displacement for $(a)$ $M=0.05$ and
$(b)$ $M=0.5$ at different ${\rm Pe}$-values mentioned in the plots. Black
dashed lines plot guide to eye for $\sim t$ scaling.

Here, we use the mean-squared displacement (MSD) of the filament center of
mass (COM) to characterize the dynamical properties of the chain in various
phases (Fig.3). The initial evolution of all the MSD at non-zero ${\rm Pe}$
shows ballistic-diffusive-ballistic crossovers. The first ballistic-diffusive
crossover is determined by the inertial relaxation time $M$. Thus, it shifts
to a later time for higher inertia; see Fig.3($b$). Asymptotically, at time
scales beyond all correlation times, one expects effective diffusive behavior
Gupta2019 . The details of such crossovers can involve the relaxation of an
emergent COM persistence and fluctuations in effective COM speed Gupta2019 .
For the current purpose, it suffices to note that the second ballistic regime
is due to the active drive and is absent in the equilibrium chain. It is
dominated by the persistent transport of the pure or coexistent open-chain
state. It’s value increases with ${\rm Pe}$. At ${\rm Pe}\sim 1$, where the
dominant state is spiral, the COM of spirals undergoes effective diffusion.
However, the overall MSD, even at this phase, shows the second ballistic
regime due to the coexisting open chains. Thus, the open chain state in this
study is characterized by the motile open chain (MOC).

####  III.1.2 Dynamical characterization: active rotation of spiral

Figure 4: (colour onlie) $(a)$ Two-time correlation of mean unit tangent
vector, $\langle{\hat{\bf u}}(t).{\hat{\bf u}}(0)\rangle$. Points denote the
numerically calculated results for $M=0.50$ at different ${\rm Pe}$ values,
${\rm Pe}=0.3$ ( $\boxdot$), ${\rm Pe}=0.6$ ( $\odot$), and ${\rm Pe}=1$ (
$\bigtriangleup$). Corresponding solid lines plot the fitting of numerical
results with $C_{{\hat{\bf u}}}(t)$ in Eq.(16). $(b)$ The probability of
spiral state $p_{s}$ as a function of ${\rm Pe}$ at different $M$ values,
$M=0.05$ ( $\boxdot$), $M=0.20$ ( $\odot$), $M=0.35$ ( $\bigtriangleup$),
$M=0.50$ ( $\bigtriangledown$), $M=0.65$ ( $\diamondsuit$), $M=0.80$ (
$\pentagon$), and $M=1.00$ ( $\bullet$). $p_{s}$ varies non-monotonically with
${\rm Pe}$ and decreases with $M$. $(c)$ Rotational speed of spirals as
function of ${\rm Pe}$ for different $M$ values, $M=0.05$ ( $\boxdot$),
$M=0.35$ ( $\odot$), $M=0.50$ ( $\bigtriangleup$), $M=0.65$ (
$\bigtriangledown$), $M=1.00$ ( $\diamondsuit$). The black solid line plots
$\omega={\pazocal C}({\rm Pe}-{\rm Pe}_{c})$ treating ${\pazocal C}$ and ${\rm
Pe}_{c}$ as fitting parameters. $(d),\leavevmode\nobreak\ (e)$ Effective
rotational diffusivities, $D_{r}^{o}$ and $D_{r}^{s}$ in Eq.(16),
respectively, as functions of ${\rm Pe}$ for different $M$; i.e., $M=0.05$ (
$\boxdot$), $M=0.20$ ( $\odot$), $M=0.35$ ( $\bigtriangleup$), $M=0.65$ (
$\bigtriangledown$), $M=1.00$ ( $\diamondsuit$). Lines in these two plots are
guides to the eye.

In the spiral state, the chain spins either clockwise or counter-clockwise
depending on the sign of $\psi_{N}$. The spinning spiral’s rotational velocity
$\omega$ can be directly extracted using the dynamics of the local tangent
$\hat{\bf{t}}_{i}(t)$. We employ the two-time correlation $\langle{\hat{\bf
u}}(t)\cdot{\hat{\bf
u}}(0)\rangle:=\frac{1}{N-1}\sum_{i=1}^{N-1}\langle\hat{\bf{t}}_{i}(t)\cdot\hat{\bf{t}}_{i}(0)\rangle$.
While the chain spins in the spiral state, this correlation is expected to
show sinusoidal oscillations with an amplitude that decays due to an eventual
loss of persistence. Moreover, as the chain dynamically transits between the
open and spiral states, we also expect a contribution from the open state in
which the correlation is expected to decay exponentially with a persistence
time. Using a probability for the spiral state $p_{s}$ and of open state
$1-p_{s}$, we use the following expression

$\displaystyle C_{{\hat{\bf
u}}}(t)=(1-p_{s})\exp(-D_{r}^{o}t)+p_{s}\exp(-D_{r}^{s}t)\cos(\omega t),$ (16)

for the correlation and fit it to simulation results, to extract the inverse
persistence times $D_{r}^{o}$ and $D_{r}^{s}$, along with $p_{s}$ and the
rotational speed $\omega$; see Fig. 4($a$). As Fig. 4($b$) shows, the
probability of spiral state $p_{s}$ varies non-monotonically with ${\rm Pe}$
and decreases with $M$. The rotational velocity increases linearly with ${\rm
Pe}$ at high activity; see Fig. 4($c$). Moreover, the data shows good fit to
$\omega={\pazocal C}({\rm Pe}-{\rm Pe}_{c})$, a form same as Eq.(11), with the
proportionality constant ${\pazocal C}=\frac{\tilde{R}}{\Gamma}=0.27$ and the
spiral onset boundary ${\rm Pe}_{c}=0.11$. This agrees well with the analytic
estimate of ${\rm Pe}_{c}\approx 0.1$ obtained in Sec.III.1. Increasing
activity renders increased directional noise in the open state. As a result,
$D_{r}^{o}$, the inverse persistence time in the open state increases as
$\sim{\rm Pe}$ (Fig. 4($d$) ). On the other hand, it varies non-monotonically
with ${\rm Pe}$ in the spiral state (Fig. 4($e$) ). The initial increase in
spiral persistence ($1/D^{s}_{r}$) is associated with its initial compaction.
The SAS state is most stable with the highest spinning persistence near ${\rm
Pe}\approx 1$. The subsequent decrease in persistence ($1/D^{s}_{r}$) at
higher activity is due to the inertial recoil that destabilizes the spiral.

###  III.2 Excess kurtosis

Figure 5: (colour onlie) $(a)$ Excess kurtosis as a function of ${\rm Pe}$ for
different $M$ mentioned in the legend. Dashed line plots ${\pazocal
K}_{\psi_{N}}=0$, which is true for a typical Gaussian system. Lower solid
lines plot ${\pazocal K}_{\psi_{N}}=-2/3$ and ${\pazocal K}_{\psi_{N}}=-1/3$.
$(b)-(g)$ represent probability distributions of the turning number,
$p(|\psi_{N}|)$, for $M=0.5$ at different ${\rm Pe}$-values mentioned in the
plots. The associated ${\pazocal K}_{\psi_{N}}$ values are also mentioned.

Irrespective of the state, due to chiral symmetry in the system, the mean
turning number $\langle\psi_{N}\rangle=0$. To quantify the departure of
$\psi_{N}$ distributions from the Gaussian nature, we calculate the excess
kurtosis of this quantity with mean zero as defined in Eq.(9). The value
${\pazocal K}_{\psi_{N}}=0$ characterizes a Gaussian distribution. In the case
of unimodal distributions, positive ${\pazocal K}_{\psi_{N}}$ corresponds to
long-tailed distributions with tails asymptotically approaching zero more
slowly than Gaussian, and negative ${\pazocal K}_{\psi_{N}}$ suggests a finite
support for the distribution, with less extreme outliers than Gaussian. This
simple interpretation does not apply in the presence of multimodality. The
results of our model show two qualitatively distinct possibilities – open-
chain conformations with unimodal distributions $p(\psi_{N})$ with the maximum
at $\psi_{N}=0$, or coexistence of this behavior with distinctly non-
equilibrium spiral conformations with equal probabilities for clockwise and
anti-clockwise spirals. This second, more generic state shows three maxima,
one at $\psi_{N}=0$ and two others at $\psi_{N}=\pm\lambda$. For different
${\rm Pe}$ and $M$, the relative probabilities of spiral and open states
change.

To gain an insight into the observed properties of ${\pazocal K}_{\psi_{N}}$,
let us consider a linear combination of three Gaussian distributions having
maxima at $0$ and $\pm\lambda$ to approximate the trimodal distributions of
$\psi_{N}$ at coexistence,

$\displaystyle p_{3}(\psi_{N})=\frac{\pazocal{A}}{2}\leavevmode\nobreak\
\left[{\pazocal G}_{-\lambda,\sigma_{s}}(\psi_{N})+{\pazocal
G}_{\lambda,\sigma_{s}}(\psi_{N})\right]+(1-\pazocal{A})\leavevmode\nobreak\
{\pazocal G}_{0,\sigma_{o}}(\psi_{N}),$ (17)

with, ${\pazocal G}_{\lambda,\sigma}(\psi_{N})$ denoting Gaussian distribution
with mean $\lambda$ and variance $\sigma$. Here, we use $\pazocal{A}$ and
$(1-\pazocal{A})$ to denote probabilities of the spiral and open state,
respectively. Thus, within this theoretical approximation, we expect
$\pazocal{A}=p_{s}$, with $p_{s}$ as used in Eq.(16). We still use two
different symbols for these two quantities as they are only theoretical
approximations of a more complex phenomenon. However, as we find later (Fig.9
in Sec.B), the numerical values of $\pazocal{A}$ and $p_{s}$ closely follow
each other, reinforcing confidence in the approximate theoretical picture
developed here.

Using the properties of Gaussian distribution, we get

$\displaystyle\langle\psi_{N}^{2}\rangle$ $\displaystyle=$
$\displaystyle\pazocal{A}\leavevmode\nobreak\
\left(\sigma_{s}^{2}+\lambda^{2}\right)+(1-\pazocal{A})\sigma_{o}^{2},$
$\displaystyle\langle\psi_{N}^{4}\rangle$ $\displaystyle=$
$\displaystyle\pazocal{A}\left(3\sigma_{s}^{4}+6\sigma_{s}^{2}\lambda^{2}+\lambda^{4}\right)+(1-\pazocal{A})\,3\sigma_{o}^{4}.$
(18)

Substituting these expressions in Eq.(9), we obtain

$\displaystyle{\pazocal
K}_{\psi_{N}}=\frac{\pazocal{A}\left(3\sigma_{s}^{4}+6\sigma_{s}^{2}\lambda^{2}+\lambda^{4}\right)+(1-\pazocal{A})\,3\sigma_{o}^{2}}{3[\pazocal{A}\leavevmode\nobreak\
\left(\sigma_{s}^{2}+\lambda^{2}\right)+(1-\pazocal{A})\sigma_{o}^{2}]^{2}}-1.$
(19)

For the pure open chain state with the single central Gaussian,
$\pazocal{A}=0$, we get ${\pazocal K}_{\psi_{N}}=0$. In the other limit of
pure spiral state, $\pazocal{A}=1$, we obtain the following simple form
${\pazocal
K}_{\psi_{N}}=-\frac{2\lambda^{4}}{3(\lambda^{2}+\sigma_{s}^{2})^{2}}$.

In the Dirac-delta function limit of the distribution of spiral state,
$\sigma_{s}\to 0$, this expression reduces to ${\pazocal
K}_{\psi_{N}}=-\frac{2}{3}$. When both the spiral and open states are equally
probable, setting $\pazocal{A}=1/2$ and $\sigma_{o}=\sigma_{s}$ we get
${\pazocal
K}_{\psi_{N}}=-\frac{\lambda^{4}}{3(\lambda^{2}+2\sigma_{s}^{2})^{2}}$. This
expression, in the simplifying limit of three Dirac-delta functions with
$\sigma_{s}\to 0$, leads to the estimate ${\pazocal
K}_{\psi_{N}}=-\frac{1}{3}$, an intermediate value lying between the purely
open chain value ${\pazocal K}_{\psi_{N}}=0$ and purely spiral state value
${\pazocal K}_{\psi_{N}}=-\frac{2}{3}$. These three limiting values set useful
points of comparison and are indicated in Fig.5($a$).

We study the excess kurtosis of the turning number in more detail in Fig.
5($a$). It shows non-monotonic variations of excess kurtosis with increasing
${\rm Pe}$ at different inertia. The corresponding variation of the
probability distribution of turning number amplitude $p(|\psi_{N}|)$ with
increasing ${\rm Pe}$ is also shown at a representative inertia value $M=0.5$;
see Fig. 5($b$)–$(g)$. For small ${\rm Pe}$, the excess kurtosis is
vanishingly small, and the probability distribution remains approximately
Gaussian with the mode at $|\psi_{N}|=0$, corresponding to an open chain. As
${\rm Pe}$ increases, a small local maximum in the distribution arises at non-
zero $|\psi_{N}|$ corresponding to spiral, increasing the excess kurtosis to a
positive value. This behavior is approximately similar to the appearance of a
non-Gaussian longer tail in an unimodal distribution. The excess kurtosis
value starts to decrease as the spiral maximum gets more prominent. It
eventually becomes negative and reaches a minimum. Note that the minimum value
stays between ${\pazocal K}_{\psi_{N}}=-\frac{1}{3}$ and ${\pazocal
K}_{\psi_{N}}=-\frac{2}{3}$, corresponding to the idealized Dirac delta-
function limits of coexistence, having equal probability of the two states,
and pure spiral. Beyond this point, with increasing ${\rm Pe}$, the spiral
state gets destabilized, the non-zero $|\psi_{N}|$ maximum starts to decrease,
and ${\pazocal K}_{\psi_{N}}$ starts to increase again. This sets the onset of
re-entrance. Further, note that the excess kurtosis of the polymers with
different inertia values are not distinguishable at low ${\rm Pe}<0.3$. They
diverge from each other at higher ${\rm Pe}$. Similar emergence of different
physical properties in other systems with activity and inertia have been
observed in other recent studies Mandal2019 ; Fazelzadeh2023 .

Further, we fit $p_{3}(\psi_{N})$ in Eq.(17) to numerically calculated
distribution functions to obtain the probability of spirals $\pazocal{A}$ and
thereby obtain estimates of the excess kurtosis using Eq.(19). The following
tables provide (Table-1) a comparison between the excess kurtosis obtained
using this method and from direct measurements from simulations, and (Table-2)
lists the values of $\pazocal{A}$. Note that an independent estimate of spiral
probabilities $p_{s}$ can be found from Eq.(16). This estimate closely follows
the dependence of $\pazocal{A}$ on ${\rm Pe}$ (Fig.9 in Appendix-B),
suggesting that they correspond to indeed the same measure.

$M$ ${\rm Pe}$ | 0.3 | 0.6 | 1.5 | 4.5
---|---|---|---|---
0.05 | 1.21 (1.18) | -0.28 (-0.28) | -0.56 (-0.56) | -0.47 (-0.47)
0.50 | 1.42 (1.35) | 0.00 (0.00) | -0.50 (-0.49) | 0.56 (0.57)
1.00 | 1.45 (1.38) | 0.00 (0.00) | -0.30 (-0.28) | 7.34 (7.61)
Table 1: A table of excess kurtosis values: numbers outside brackets are estimated from the fitting of simulated distributions to Eq.(17). The directly measured excess kurtosis values are shown in the parenthesis for comparison. $M$ ${\rm Pe}$ | 0.3 | 0.6 | 1.5 | 4.5
---|---|---|---|---
0.05 | $\pazocal{A}=0.10$ | $\pazocal{A}=0.45$ | $\pazocal{A}=0.76$ | $\pazocal{A}=0.62$
0.50 | $\pazocal{A}=0.08$ | $\pazocal{A}=0.31$ | $\pazocal{A}=0.66$ | $\pazocal{A}=0.20$
1.00 | $\pazocal{A}=0.08$ | $\pazocal{A}=0.31$ | $\pazocal{A}=0.46$ | $\pazocal{A}=0.01$
Table 2: Probabilities of spirals $\pazocal{A}$ extracted from the fitting of
Eq.(17) with direct numerical measurement.

###  III.3 Size and shape

Associated with the open-to-spiral transitions, in this section, we
characterize the size and shape of the polymer with the help of $(a)$ the end-
to-end separation and $(b)$ the radius of the gyration tensor.

####  III.3.1 End-to-end separation

Figure 6: (colour onlie) Scaled end-to-end distance, $\tilde{r}_{e}=r_{e}/L$.
$(a),(b)$ are distributions of $\tilde{r}_{e}$ for for $M=0.05$ and $M=1.00$,
respectively. Legends in the plots define the ${\rm Pe}$ values. $(c),(d)$
Mean-squared end-to-end distance, $\langle\tilde{r}_{e}^{2}\rangle$, and,
Kullback-Leibler divergence, $D_{KL}$, as function of ${\rm Pe}$ for different
$M$ values mentioned in the legend.

In Fig. 6$(a),\leavevmode\nobreak\ (b)$ we show the distributions of scaled
end-to-end separation, $\tilde{r}_{e}=r_{e}/L$ where $r_{e}=|{{\bf r}}(L)-{\bf
r}(0)|$, for different ${\rm Pe}$ at small and large inertia values $M=0.05$
and $M=1$ respectively. The end-to-end distribution function
$p({\tilde{r}_{e}})$ is normalized as
$\int_{0}^{1}d{\tilde{r}_{e}}\leavevmode\nobreak\
2\pi{\tilde{r}_{e}}\,p({\tilde{r}_{e}})=1$. At equilibrium ${\rm Pe}=0$, the
distribution shows a shallow maximum near $\tilde{r}_{e}=0.8$ corresponding to
the open chain due to the semiflexibility of the chain. A second maximum at
$\tilde{r}_{e}=0$ possible for the ideal worm-like chain Dhar2002 ;
Chaudhuri2007  is suppressed due to the self-avoidance of the polymer we
considered. As we increase ${\rm Pe}$, a new and more pronounced maximum
appears near $\tilde{r}_{e}\lesssim 0.1$. This maximum corresponds to a
coexistence of the open chain with the SAS state. In the overdamped limit of
$M=0.05$, the position of this maximum shifts toward smaller $\tilde{r}_{e}$
values, and the peak height increases as the spiral shrinks and gets tighter
and more stable with increasing ${\rm Pe}$. In contrast, for larger inertia
$M=1$, the location and height of this second maximum near
$\tilde{r}_{e}\approx 0.1$ varies non-monotonically with increasing ${\rm
Pe}$, associated with the re-entrant transition. At small ${\rm Pe}$, the
spiral gets tighter as in the overdamped case; however, beyond ${\rm Pe}\simeq
1$, the spiral peak position shifts to higher $\tilde{r}_{e}$, and the peak
height decreases as the spirals start to open up.

We also show in Fig. 6$(c)$ the non-monotonic variations of
$\langle\tilde{r}_{e}^{2}\rangle$ with ${\rm Pe}$ for different $M$ values. At
first, with increasing activity, the open chain gets destabilized towards the
spiral state, and $\langle\tilde{r}^{2}_{e}\rangle$ reduces until ${\rm
Pe}\sim 1$. Beyond that, the inertial chain shows swelling and consequent
onset of instability of the spiral structure towards the open chain with
increasing ${\rm Pe}$, and $\langle\tilde{r}_{e}^{2}\rangle$ increases. This
second instability disappears in the overdamped limit of $M=0.05$, and
$\langle\tilde{r}_{e}^{2}\rangle$ saturates. With increasing $M$, the
compaction of $\langle\tilde{r}_{e}^{2}\rangle$ deep inside the spiral state
near ${\rm Pe}\sim 1$ gets less pronounced.

In Fig. 6$(d)$, we present the Kullback-Leibler divergence from equilibrium
using the end-to-end distribution functions by calculating,

$\displaystyle D_{KL}=\int_{0}^{1}d{\tilde{r}_{e}}\leavevmode\nobreak\
p({\tilde{r}_{e}})\leavevmode\nobreak\
\ln\left[\frac{p({\tilde{r}_{e}})}{p_{\rm eq}({\tilde{r}_{e}})}\right],$ (20)

where $D_{KL}$ is, by definition, positive. This is a measure of how the non-
equilibrium distribution $p({\tilde{r}_{e}})$ is different from the
equilibrium distribution $p_{\rm eq}({\tilde{r}_{e}})$. With increasing ${\rm
Pe}$ from zero, $D_{KL}$ initially increases to reach a maximum in the SAS
state near ${\rm Pe}\approx 1$. This denotes the most non-equilibrium state,
with the most compact spirals (smallest $\langle\tilde{r}_{e}^{2}\rangle$)
spinning with the highest persistence (smallest $D_{r}^{s}$). At higher ${\rm
Pe}$, as the spirals open up, $D_{KL}$ decreases. However, inertia suppresses
the difference from equilibrium – with increasing inertia, the magnitude of
$D_{KL}$ even in the SAS state near ${\rm Pe}\approx 1$ decreases. This is
another example of inertial equilibration found in other contexts in recent
studies of active matter Khali2024 ; Mandal2019 ; Patel2023 ; patel2024exact .

####  III.3.2 Radius of gyration tensor

Figure 7: (colour onlie) Scaled radius-of-gyration,
$\langle\tilde{R}_{g}^{2}\rangle$, and shape anisotropy,
$\langle\tilde{R}_{s}^{2}\rangle$ as functions of ${\rm Pe}$ for different $M$
values mentioned in the legend.

Here, we consider the radius of gyration tensor to analyze the polymer size
and shape further. This is given by

$\displaystyle S=\frac{1}{N}\begin{pmatrix}\sum_{i}(x_{i}-x_{\rm
cm})^{2}&\sum_{i}(x_{i}-x_{\rm cm})(y_{i}-y_{\rm cm})\\\ \\\
\sum_{i}(x_{i}-x_{\rm cm})(y_{i}-y_{\rm cm})&\sum_{i}(y_{i}-y_{\rm
cm})^{2}\end{pmatrix},$

where ${\bf r}_{i}=(x_{i},y_{i})$ denotes the instantaneous position of $i$-th
monomer and ${\bf r}_{cm}=(x_{\rm cm},y_{\rm cm})$ denotes the position of the
polymer center of mass ${\bf r}_{cm}=(1/N)\sum_{i}{\bf r}_{i}$. The larger and
smaller eigenvalues of the matrix are $\lambda^{+}$ and $\lambda^{-}$,
respectively. They can be used to determine the polymer size
$R_{g}^{2}=\lambda^{+}+\lambda^{-}$ and shape anisotropy
$R_{s}^{2}=\lambda^{+}-\lambda^{-}$, with $R_{s}^{2}=0$ denoting a circular
shape. In Fig. 7 we show the variation of scaled mean quantities
$\langle\tilde{R}_{g}^{2}\rangle=\langle R_{g}^{2}\rangle/\langle
R_{g}^{2}\rangle_{{\rm Pe}=0}$, and $\langle\tilde{R}_{s}^{2}\rangle=\langle
R_{s}^{2}\rangle/\langle R_{s}^{2}\rangle_{{\rm Pe}=0}$, with ${\rm Pe}$ for
different $M$. Both size and shape show a non-monotonic, associated with the
re-entrant transition to spiral and open chain. Lower inertia stabilizes the
non-equilibrium spiral structures better, which is why, with increasing $M$,
the minimum value of both the size and shape anisotropy increases.

##  IV Conclusion

In summary, we presented a detailed phase diagram identifying the influence of
inertia in the activity-induced transition to a spinning achiral spiral (SAS)
state of a semi-flexible, self-avoiding chain. Inertia destabilizes SAS
towards a motile open chain (MOC) at higher activity. We presented analytical
arguments identifying the motile open chain (MOC) to SAS transition and the
SAS to MOC re-entrant transition. This second transition is entirely an
inertial effect and was absent in the overdamped limit. The dynamics at
different states were analyzed using the mean-squared displacement of the
center of mass and the evolution of the mean local tangents. We identified the
SAS state to be the most out-of-equilibrium state using a Kullback-Leibler
divergence measure from the equilibrium end-to-end distribution. As our
calculations showed, with increasing inertia, the SAS gets more and more
destabilized, and the difference from equilibrium conformations decreases. It
will be interesting to determine entropy production to characterize the notion
of departure from equilibrium, further Fodor2016 ; Chaudhuri2014 ; Ganguly2013
. Our predictions are amenable to direct experimental verification using
macroscopic active chains, e.g., chains of hex-bug nano Zheng2023 .

##  V Acknowledgement

CK thanks Rajneesh Kumar for helping with the figures. The numerical
simulations were performed using SAMKHYA, the High-Performance Computing
Facility provided by the Institute of Physics, Bhubaneswar. DC acknowledges a
research grant from the Department of Atomic Energy
(1603/2/2020/IoP/R&D-II/150288) and thanks the International Centre for
Theoretical Sciences (ICTS-TIFR), Bangalore, for an Associateship.

##  Appendix A Mean turning number for spiral state

Figure 8: (colour onlie) Mean absolute turning number for spiral state,
$\langle|\psi_{N}|\rangle_{s}$, $(a)$ as function of ${\rm Pe}$ for different
$M$ values, and $(b)$ as function of $M$ for different ${\rm Pe}$ values are
plotted with corresponding legend.

We calculate the mean absolute numerical values of the turning number,
$\psi_{N}$, for spiral state only, which denotes the degree of winding of the
spiral structure as functions of ${\rm Pe}$ and $M$. As Fig. 8$(a)$ shows, the
average magnitude of turning number $\langle|\psi_{N}|\rangle$ increases as a
function of ${\rm Pe}$ for every $M$, which means higher activity increases
the turning number, creating a more compact structure of spirals. In Fig.
8$(b)$, we observe that $\langle|\psi_{N}|\rangle$ decreases with inertia at a
given ${\rm Pe}$ because of the swelling due to inertial recoils. The relative
change is more prominent at higher ${\rm Pe}$ values.

##  Appendix B Estimates of spiral state probability

Figure 9: (color online) Comparison between the probability of spiral state
extracted from fitting the numerical data with Eq.(17), $\pazocal{A}$, and
from the fitting of two-time correlation of Eq.(16), $p_{s}$, as a function of
${\rm Pe}$ for different $M$ values. Legends in the plot denote the
corresponding $M$.

In this section, we compare the two independent estimates of the spiral
probabilities, $\pazocal{A}$ and $p_{s}$, extracted from two different
measurements mentioned in the main text: $(1)$ fitting of Eq.(17) to the
numerically calculated distributions of $\psi_{N}$, and $(2)$ fitting of
Eq.(16) with numerically calculated two-time tangent correlation. They follow
each other closely (Fig. 9), thereby indicating the two measures are of indeed
the same quantity, the probability of the spiral state. This vindicates our
approximate theoretical description developed in the main text.

## References

  * [1] Bruce Alberts, Karen Hopkin, Alexander D Johnson, David Morgan, Martin Raff, Keith Roberts, and Peter Walter.  Essential cell biology: Fifth international student edition.  WW Norton & Company, 2018.
  * [2] Navish Wadhwa and Howard C Berg.  Bacterial motility: machinery and mechanisms.  Nature reviews microbiology, 20(3):161–173, 2022.
  * [3] Timothy Sanchez, David Welch, Daniela Nicastro, and Zvonimir Dogic.  Cilia-like beating of active microtubule bundles.  Science, 333(6041):456–459, 2011.
  * [4] Fan Li, David P Josephson, and Andreas Stein.  Colloidal assembly: the road from particles to colloidal molecules and crystals.  Angewandte Chemie International Edition, 50(2):360–388, 2011.
  * [5] Yuji Sasaki, Yoshinori Takikawa, Venkata SR Jampani, Hikaru Hoshikawa, Takafumi Seto, Christian Bahr, Stephan Herminghaus, Yoshiki Hidaka, and Hiroshi Orihara.  Colloidal caterpillars for cargo transportation.  Soft matter, 10(44):8813–8820, 2014.
  * [6] Peter J Vach and Damien Faivre.  The triathlon of magnetic actuation: Rolling, propelling, swimming with a single magnetic material.  Scientific reports, 5(1):9364, 2015.
  * [7] Fernando Martinez-Pedrero, Antonio Ortiz-Ambriz, Ignacio Pagonabarraga, and Pietro Tierno.  Colloidal microworms propelling via a cooperative hydrodynamic conveyor belt.  Physical review letters, 115(13):138301, 2015.
  * [8] Jie Zhang, Erik Luijten, and Steve Granick.  Toward design rules of directional janus colloidal assembly.  Annual review of physical chemistry, 66:581–600, 2015.
  * [9] Volker Schaller, Christoph Weber, Christine Semmrich, Erwin Frey, and Andreas R Bausch.  Polar patterns of driven filaments.  Nature, 467(7311):73–77, 2010.
  * [10] Christina Kurzthaler, Clémence Devailly, Jochen Arlt, Thomas Franosch, Wilson C.K. Poon, Vincent A. Martinez, and Aidan T. Brown.  Probing the Spatiotemporal Dynamics of Catalytic Janus Particles with Single-Particle Tracking and Differential Dynamic Microscopy.  Phys. Rev. Lett., 121(7):078001, aug 2018.
  * [11] Dennis Bray.  Cell Movements.  Garland Science, nov 2000.
  * [12] G.R. Fulford and J.R Blake.  Muco-ciliary transport in the lung.  J. Theor. Biol., 121(4):381–402, aug 1986.
  * [13] William Gilpin, Matthew Storm Bull, and Manu Prakash.  The multiscale physics of cilia and flagella.  Nat. Rev. Phys., 2(2):74–88, jan 2020.
  * [14] Daniel a Fletcher and R Dyche Mullins.  Cell mechanics and the cytoskeleton.  Nature, 463(7280):485–92, jan 2010.
  * [15] F Huber, J Schnauß, S Rönicke, P Rauch, K Müller, C Fütterer, and J Käs.  Emergent complexity of the cytoskeleton: from single filaments to tissue.  Adv. Phys., 62(1):1–112, feb 2013.
  * [16] J Prost, F Jülicher, and J-f Joanny.  Active gel physics.  Nat. Phys., 11(2):111–117, feb 2015.
  * [17] S J Kron and J a Spudich.  Fluorescent actin filaments move on myosin fixed to a glass surface.  Proc. Natl. Acad. Sci. U. S. A., 83(17):6272–6276, 1986.
  * [18] L Bourdieu, T Duke, MB Elowitz, DA Winkelmann, S Leibler, and A Libchaber.  Spiral defects in motility assays: a measure of motor protein force.  Physical review letters, 75(1):176, 1995.
  * [19] Daiki Nishiguchi, Junichiro Iwasawa, Hong-Ren Jiang, and Masaki Sano.  Flagellar dynamics of chains of active Janus particles fueled by an AC electric field.  New J. Phys., 20(1):015002, jan 2018.
  * [20] Ken Sekimoto, Naoki Mori, Katsuhisa Tawada, and Yoko Y Toyoshima.  Symmetry breaking instabilities of an in vitro biological system.  Physical review letters, 75(1):172, 1995.
  * [21] Abhrajit Laskar, Rajeev Singh, Somdeb Ghose, Gayathri Jayaraman, P B Sunil Kumar, and R Adhikari.  Hydrodynamic instabilities provide a generic route to spontaneous biomimetic oscillations in chemomechanically active filaments.  Sci. Rep., 3:1964, 2013.
  * [22] Raghunath Chelakkot, Arvind Gopinath, L. Mahadevan, and Michael F. Hagan.  Flagellar dynamics of a connected chain of active, polar, Brownian particles.  J. R. Soc. Interface, 11(92):20130884, mar 2014.
  * [23] Antina Ghosh and NS Gov.  Dynamics of active semiflexible polymers.  Biophysical journal, 107(5):1065–1073, 2014.
  * [24] Rolf E Isele-Holder, Jens Elgeti, and Gerhard Gompper.  Self-propelled worm-like filaments: spontaneous spiral formation, structure, and dynamics.  Soft matter, 11(36):7181–7190, 2015.
  * [25] Shalabh K Anand and Sunil P Singh.  Structure and dynamics of a self-propelled semiflexible filament.  Physical Review E, 98(4):042501, 2018.
  * [26] Özer Duman, Rolf E Isele-Holder, Jens Elgeti, and Gerhard Gompper.  Collective dynamics of self-propelled semiflexible filaments.  Soft matter, 14(22):4483–4494, 2018.
  * [27] KR Prathyusha, Silke Henkes, and Rastko Sknepnek.  Dynamically generated patterns in dense suspensions of active filaments.  Physical Review E, 97(2):022606, 2018.
  * [28] Yaouen Fily, Priya Subramanian, Tobias M Schneider, Raghunath Chelakkot, and Arvind Gopinath.  Buckling instabilities and spatio-temporal dynamics of active elastic filaments.  Journal of the Royal Society Interface, 17(165):20190794, 2020.
  * [29] Christian A Philipps, Gerhard Gompper, and Roland G Winkler.  Dynamics of active polar ring polymers.  Physical Review E, 105(6):L062501, 2022.
  * [30] Nisha Gupta, Abhishek Chaudhuri, and Debasish Chaudhuri.  Morphological and dynamical properties of semiflexible filaments driven by molecular motors.  Physical Review E, 99(4):042405, 2019.
  * [31] Amir Shee, Nisha Gupta, Abhishek Chaudhuri, and Debasish Chaudhuri.  A semiflexible polymer in a gliding assay: Reentrant transition, role of turnover and activity.  Soft Matter, 17(8):2120–2131, 2021.
  * [32] Chitrak Karan and Debasish Chaudhuri.  Cooperation and competition in the collective drive by motor proteins: mean active force, fluctuations, and self-load.  Soft Matter, 19(9):1834–1843, 2023.
  * [33] Yasemin Ozkan-Aydin, Daniel I. Goldman, and M. Saad Bhamla.  Collective dynamics in entangled worm and robot blobs.  Proc. Natl. Acad. Sci. U. S. A., 118(6), 2021.
  * [34] Anthony Garcia, Gregory Krummel, and Shashank Priya.  Fundamental understanding of millipede morphology and locomotion dynamics.  Bioinspir. Biomim., 16(2):026003, mar 2021.
  * [35] Hamidreza Marvi, Chaohui Gong, Nick Gravish, Henry Astley, Matthew Travers, Ross L. Hatton, Joseph R. Mendelson, Howie Choset, David L Hu, and Daniel I Goldman.  Sidewinding with minimal slip: Snake and robot ascent of sandy slopes.  Science (80-. )., 346(6206):224–229, oct 2014.
  * [36] David L. Hu, Jasmine Nirody, Terri Scott, and Michael J. Shelley.  The mechanics of slithering locomotion.  Proc. Natl. Acad. Sci. U. S. A., 106(25):10081–10085, 2009.
  * [37] Mohd Ilyas Bhat, Prerna Sharma, T. G. Sitharam, and Tejas G. Murthy.  Force transmission during repose of flexible granular chains.  Soft Matter, 19(44):8493–8506, 2023.
  * [38] Kevin Safford, Yacov Kantor, Mehran Kardar, and Arshad Kudrolli.  Structure and dynamics of vibrated granular chains: Comparison to equilibrium polymers.  Phys. Rev. E, 79(6):061304, jun 2009.
  * [39] Ellen Zheng, Martin Brandenbourger, Louis Robinet, Peter Schall, Edan Lerner, and Corentin Coulais.  Self-Oscillation and Synchronization Transitions in Elastoactive Structures.  Phys. Rev. Lett., 130(17):178202, 2023.
  * [40] Ahmad K. Omar, Katherine Klymko, Trevor GrandPre, Phillip L. Geissler, and John F. Brady.  Tuning nonequilibrium phase transitions with inertia.  The Journal of Chemical Physics, 158(7):074904, feb 2023.
  * [41] Suvendu Mandal, Benno Liebchen, and Hartmut Löwen.  Motility-induced temperature difference in coexisting phases.  Physical review letters, 123(22):228001, 2019.
  * [42] Rayan Chatterjee, Navdeep Rana, R Aditi Simha, Prasad Perlekar, and Sriram Ramaswamy.  Inertia drives a flocking phase transition in viscous active fluids.  Physical Review X, 11(3):031063, 2021.
  * [43] Shubhendu Shekhar Khali, Fernando Peruani, and Debasish Chaudhuri.  When an active bath behaves as an equilibrium one.  Phys. Rev. E, 109:024120, Feb 2024.
  * [44] Manish Patel and Debasish Chaudhuri.  Exact moments and re-entrant transitions in the inertial dynamics of active brownian particles.  New Journal of Physics, 25(12):123048, dec 2023.
  * [45] Manish Patel and Debasish Chaudhuri.  Exact moments for trapped active particles: inertial impact on steady-state properties and re-entrance, 2024.
  * [46] Mohammad Fazelzadeh, Ehsan Irani, Zahra Mokhtari, and Sara Jabbari-Farouji.  Effects of inertia on conformation and dynamics of tangentially driven active filaments.  Physical Review E, 108(2):024606, 2023.
  * [47] Abhishek Dhar and Debasish Chaudhuri.  Triple minima in the free energy of semiflexible polymers.  Physical review letters, 89(6):065502, 2002.
  * [48] Debasish Chaudhuri.  Semiflexible polymers: Dependence on ensemble and boundary orientations.  Physical Review E, 75(2):021803, 2007.
  * [49] Étienne Fodor, Cesare Nardini, Michael E. Cates, Julien Tailleur, Paolo Visco, and Frédéric van Wijland.  How Far from Equilibrium Is Active Matter?  Phys. Rev. Lett., 117(3):038103, jul 2016.
  * [50] Debasish Chaudhuri.  Active Brownian particles: Entropy production and fluctuation response.  Phys. Rev. E, 90(2):022131, aug 2014.
  * [51] Chandrima Ganguly and Debasish Chaudhuri.  Stochastic thermodynamics of active Brownian particles.  Phys. Rev. E, 88(3):032102, sep 2013.


# OdoViz: A 3D Odometry Visualization and Processing Tool

Saravanabalagi Ramachandran* and John McDonald *Saravanabalagi Ramachandran
and John McDonald are with Lero - the Irish Software Research Centre and the
Department of Computer Science, Maynooth University, Maynooth, Ireland
{saravanabalagi.ramachandran<EMAIL_ADDRESS>0000-0001-6543-5345
0000-0001-9225-673X

###### Abstract

OdoViz is a reactive web-based tool for 3D visualization and processing of
autonomous vehicle datasets designed to support common tasks in visual place
recognition research. The system includes functionality for loading,
inspecting, visualizing, and processing GPS/INS poses, point clouds and camera
images. It supports a number of commonly used driving datasets and can be
adapted to load custom datasets with minimal effort. OdoViz’s design consists
of a slim server to serve the datasets coupled with a rich client frontend.
This design supports multiple deployment configurations including single user
stand-alone installations, research group installations serving datasets
internally across a lab, or publicly accessible web-frontends for providing
online interfaces for exploring and interacting with datasets. The tool allows
viewing complete vehicle trajectories traversed at multiple different time
periods simultaneously, facilitating tasks such as sub-sampling, comparing and
finding pose correspondences both across and within sequences. This
significantly reduces the effort required in creating subsets of data from
existing datasets for machine learning tasks. Further to the above, the system
also supports adding custom extensions and plugins to extend the capabilities
of the software for other potential data management, visualization and
processing tasks. The platform has been open-sourced to promote its use and
encourage further contributions from the research community.

##  I Introduction

Although autonomous vehicles research can be traced back to the early 1980’s
[1] [2] [3], the past decade has witnessed dramatic progress in the field. A
core ingredient of this progress has been the use of data-driven, and in
particular, deep learning techniques. In order for these approaches to be
possible, multiple research groups and companies have led significant efforts
to collect and release large-scale annotated datasets. These datasets
facilitate the training of new models and approaches, whilst also providing a
means of tracking and benchmarking progress on various research challenges
within the field. Probably most notable here is the KITTI dataset [4] from
Karlsruhe. However, many others have also been released, often targetting more
challenging conditions, particular sensor setups, specific problems, etc.
Examples include: St Lucia [5], CMU Seasons [6], Oxford Robotcar [7], BDD100K
[8], Woodscape [9], etc.

Typically the first step in determining a dataset’s applicability for a given
project is to visualize and analyze its included trajectories. For example,
assessing a dataset’s suitability for visual place recognition research
requires analysing the geographical extent and degree of overlap between
individual trajectories. Many popular public driving datasets only provide a
single view of the included trajectories overlaid on a static aerial or
satellite image (see Figure 1). More recently datasets such as BDD100K have
included executable scripts to visualize the top view of the individual
trajectories. However, such scripts typically do not include functionality for
loading multiple trajectories, analyzing the overlaps, and inspecting
individual pose data (e.g. GPS, heading, image, and other sensor data).

(a) KITTI

(b) New College

(c) Robotcar

(d) St Lucia

Figure 1: Path overlaid satellite images provided by different popular datasets Dataset | Pose File Format | Camera Images
---|---|---
New College [10] | TXT | JPG
KITTI Odometry [4] | TXT | PNG
CMU Seasons [6] | NVM | JPG
St Lucia [5] | LOG | Bayer PNG
Oxford Robotcar [7] | CSV | Bayer PNG
BDD100K [8] | JSON | MOV Video
Table 1: Different file formats used by popular driving datasets

Given a suitable dataset, utilising it requires the researcher to become
familiar with its organisation and structure so as to curate suitable data for
training and evaluating new models. Many file formats have been adopted by
different datasets (as shown in Table 1), with each dataset having its own
sensor types, positioning, and configuration. Ideally, software development
kits (SDKs) are released alongside the datasets to simplify their use (e.g.
Robotcar SDK [11], BDD100K Toolkit [12], etc.). However, in our experience
there is still a steep learning curve associated with most driving datasets.
In particular, one has to expend a lot of effort and time to setup and become
familiar with the SDK. Furthermore, given the variations between the APIs, the
use of different programming languages, etc., any code developed to perform
additional tasks will have limited portability across datasets.

Creating training sets from one or more datasets usually involves (i) sampling
or selecting the images required, (ii) collecting corresponding information
regarding the vehicle’s pose from the Global Positioning System (GPS) and
Inertial Navigation System (INS) data, (iii) applying positional and
rotational offsets, and (iv) finding pose correspondences within or across the
trajectories. For many computer vision challenges, it is often preferable to
select images of importance based on their location on the map e.g. choosing
images of landmarks, images captured at intersections, or images of the same
place captured from different viewpoints. The SDKs are often limited to only
parsing the pose files to obtain GPS/INS data for images and converting the
images to standard file formats and do not include an interactive interface to
perform subsampling or finding such correspondences.

In this paper, we present OdoViz, a new 3D odometry visualization and
processing tool to solve many of these odometry visualization and processing
challenges using a single extensible platform. OdoViz is web-based, flexible,
extensible, easy-to-use, and supports common odometry file formats with
customizable scene and offset settings. The system allows the user to perform
operations such as sampling, comparing and finding pose correspondences within
and across multiple trajectories. It also allows loading, inspecting,
visualizing and processing GPS/INS poses, point clouds and camera images.
OdoViz has out of the box support for popular driving datasets, including:
Oxford Robotcar [7], CMU Seasons [6], BDD100K [8], St. Lucia [5], New College
[10] and KITTI [4]; and can be simply extended to support custom datasets. We
further include plugins for importing and exporting settings, and extensions
for additional tasks, (i) analyzing top-k matches in an image retrieval
benchmark of a feature extractor, and (ii) visualizing topological nodes on a
loaded trajectory. The system also supports adding custom extensions and
plugins for additional tasks.

We explain the design and architecture of OdoViz in Section III, break down
each of the core modules in Section IV, elaborate sampling and finding
correspondences functionalities in Section V, and discuss the extensions and
plugins in Section VI.

##  II Related Work

Processing of autonomous driving datasets typically involves either directly
accessing the data through hand developed code, utilising bespoke SDKs
designed for individual datasets, using related tools from fields such as
photogrammetry, or employing dedicated autonomous vehicle dataset frameworks.

Probably the most notable tool from the field of photogrammetry for
visualization of driving datasets is Visual SFM [13]. This tool allows loading
images, performing Structure from Motion (SfM), saving and loading .nvm files,
and viewing the resultant point cloud and image associated with each camera
pose. Being a full fledged SfM tool, its support does not extend beyond .nvm
files and therefore does not support many of the additional file formats
included with vehicle datasets.

More recently a number of companies within the autonomous vehicles space have
released tools designed specifically to address some of these issues and to
better support research in the space.

Webviz [14] is a web-based tool developed by Cruise for general robotics data
inspection. The tool provides visual insights on ROS bag files and allows
connecting to a live robot or simulation. Webviz allows custom data
visualization layouts from a collection of configurable panels for displaying
information like text logs, 2D charts and 3D depictions of the vehicle’s
environment.

Autonomous Visualization System [15] (AVS) is an open and modular web tool
developed by Uber to load and navigate though individual poses of a
trajectory. It also allows inspecting GPS/INS and point clouds on a frame by
frame basis. However, it does not allow viewing of complete trajectories.

We also note recent additions to the popular Open3D library [16], in
particular the Open3D-ML extension which extends the library to support common
machine learning tasks in autonomous vehicles research. These extensions are
targeted at 3D deep learning tasks such as 3D object detection and semantic
segmentation.

The above tools address and important need within the community by providing
rich frameworks for processing and visualisation at the local level of the
vehicle, i.e. targeting egocentric tasks such as real-time visualisation and
playback of vehicle sensor data, 3D object detection, etc. However, they are
not directly applicable in more global level tasks such as the use-cases
considered in this paper e.g. identifying corresponding poses within or across
trajectories, or for visualizing loop closures.

To the best of our knowledge OdoViz is unique in this regard in that it is the
only tool of which we are aware that supports loading, viewing and processing
of complete trajectories, and performing common odometry tasks such as
sampling and finding pose correspondences. OdoViz was initially created as a
small in-house tool to load and inspect different datasets and to reduce the
effort required to incorporate new datasets within our research. The tool has
been in development since 2019, with multiple features added to the software
since then to aid our research. At this point it has grown mature to act as
generic extensible 3D odometry visualization and dataset curation tool, we
have open-sourced111Source-code is available at
https://github.com/robotvisionmu/odoviz the work under the MIT licence for the
benefit of the wider research community.

A live instance222Live instance is available at https://odoviz.cs.nuim.ie of
OdoViz is hosted online for preview purposes. Documentation and a number of
video tutorials333Video Tutorials are available at
https://www.youtube.com/playlist?list=PLKIavzsN4tuGi1SKDSPss0M8v4zswVEn9 have
been made available to assist the user in getting to know the system and
completing common tasks. Documentation on extending the system to support a
new dataset is also provided.

##  III Design

The OdoViz architecture consists of (i) a front-end providing a rich client
built on React, Redux, and Redux Saga, and (ii) a backend server designed to
act as a JSON API based thin server primarily for serving files. The reactive
front-end equipped with a threejs 3D environment, provides a sophisticated
user interface. The complete application is loaded as a Single Page
Application (SPA), ensuring full functionality and minimum processing latency
after the application is loaded into memory. Internet connectivity is however
required to load new files from the server.

The system is designed around the following principles:

  * •

Web-based: The software is web based and therefore runs without compilation in
all major operating systems directly in the browser, and adding new and
debugging existing features easily with hot-reloading. Dependency resolution
is performed automatically using NPM (Node Package Manager) where webpack
links the dependencies, minifies and bundles the app in a JavaScript file
which can then be served along with a static HTML file. Web-based tools
further allow providing a rich, modern, reactive and easily tweakable user-
interface while being highly accessible and portable.

  * •

Extensible: The system is designed with extensibility in mind. This is
achieved by associating a single parser file with each dataset that includes
paths to its various file locations, along with information used for
extracting data from the info file and linking the data with the images.
Hence, adding support for a new dataset requires only adding a new parser
file. This facilitates the handling of multiple datasets and file formats
within a single platform. OdoViz can also be equipped with extensions that
allow inspecting and modifying loaded odometry data, reading external files,
comparing images, etc.

  * •

Real-time: Data is processed and visualized in real-time. Powered by
JavaScript and React/Redux, OdoViz has asynchronous execution and
immutablility at its core i.e. it runs tasks asynchronously without blocking
the UI, updates the data in an immutable fashion by updating existing pointers
to point to the new data, and displays the changes reactively. This pipeline
allows the changes to variables to reflect on the visualization near
instantly.

Figure 2: Overall architecture of OdoViz

Figure 2 shows the architecture of OdoViz including both the thin-server and
rich-client design. The front-end has a redux store to manage the app’s state
in a nested object literal which acts as a single source of truth for all of
the app’s data and configuration. The store is read-only and can only be
immutably modified as the user interacts with the app using reducers. Reducers
are pure functions that take in the previous state and the current action to
produce a new state. The reactive user-interface comprises of a collection of
components, each of which subscribes to required store data and populates its
template. As data changes in the store, all subscribed components re-render to
reflect the updates. This data flow allows the app to be more predictable,
traceable and reproducible.

The OdoViz architecture allows the system to be deployed in a number of
different ways, including:

  * •

a browser-based front-end tool consuming data served on the same computer
using a NodeJS server.

  * •

a standalone single user installation software packaged up individually for
various operating systems using a packager system such as ElectronJS.

  * •

an in-house app in an organization or research group with a common server to
serve files stored centrally, which can then be consumed by its members.

  * •

an online interactive visualization tool for publicly available datasets that
will allow the users to visually explore and inspect the various trajectories
before downloading them. With all the computation taking place in the client,
this allows setting up a server with virtually no compute load, hosted only to
serve files. For servers with limited network bandwidth, a smaller subset of
the dataset can be made available to be interactively viewed. The software can
additionally be customized to have only limited features and can also be setup
to allow users to selectively download desired trajectories.

##  IV Core Modules

In this section, details are provided for each of the core modules that make
up the overall system.

###  IV-A Data Parser

OdoViz supports loading Oxford Robotcar GPS, INS and Odometry CSV files,
BDD100K info JSON files, CMU Seasons NVM files, KITTI txt files, New College
txt files and St. Lucia log files. OdoViz also supports loading other generic
.nvm bundler files with point-cloud visualization. Additional parser files can
be easily added to provide support for custom datasets. Data parsed from any
source is consistently loaded into the browser’s memory in a master JavaScript
object literal containing the following keys: index, timestamp, position,
orientation, gps, altitude, imageIndex, and image. Visualization, sampling,
matching and all other tasks can then use this data for processing. In cases
where it may not be possible to load proprietary file formats, the files must
first be converted to any open format and then parsed accordingly. For
example, .mat files, which are binary MATLAB files that store workspace
variables, should be loaded in MATLAB and then exported as one or more .csv
files.

The fused GPS/INS will often have pose data with frequency over 50 Hz, while
the camera will typically operate at a lower frequency. Furthermore, in
general, the GPS/INS timestamps will not be synchronised with the camera
images as the sensors record the information independently. It is therefore
preferable to only compute information necessary for the poses from which the
images are captured. This pose information is computed by the data parser by
interpolating the neighbouring poses from the GPS/INS data. The included data
parsers employ linear interpolation between the two nearest poses, however,
this can be tailored within any given parser. Poses are colored using a
gradient (red to orange by default) making it easy to distinguish poses that
belong to overlapping traversals (see Figure 3).

Performance Optimizations: The custom parser scripts written in JavaScript are
run in a web-client which introduces some language-level processing
limitations. In particular, the JavaScript interpreter on a web-client cannot
fully utilize all the cores of the CPU for compute-intensive tasks. Also, the
use of the GPU for processing in web-clients is limited. Some workarounds and
alternatives to these shortcomings include running asynchronous operations
like fetch and parse in separate worker threads using Web Workers API, and
leveraging the client side GPU through libraries such as GLMatrix [17] to
optimize many of the matrix operations used for transforming poses using WebGL
operations. Alternatively, compute intensive operations or GPU-based code can
be run on the server. To do this, OdoViz’s NodeJS backend can be extended to
expose an API endpoint configured to call external code that is natively
executed on the server and seamlessly integrated within OdoViz.

###  IV-B Offset Settings

Many datasets and their associated file formats will have their own
conventions for coordinate frames e.g. swapped Y and Z axis for positioning
and inverted Y rotations. OdoViz allows adjusting the offsets in each of the 3
dimensions for position $P_{x}$, $P_{y}$ and $P_{z}$ and rotation $R_{x}$,
$R_{y}$ and $R_{z}$. It is also possible to invert (additively) values
assigned to each of the above six fields, swap any two $R$ axes or $P$ axes,
and/or scale up or down all axes equally. With known translation and rotation
of the camera, it is possible to precisely visualize the vehicle’s pose using
these offset settings. Further, this conveniently allows loading unadjusted
data captured from cameras or INS sensors mounted upside-down, rotated, and/or
translated and thus is helpful in making new datasets from captured raw logs.
The user interface is carefully designed allowing angle snapping to multiples
of 45∘ and providing controls for fine tuning to precisely adjust the scale.

Given the increased error in GPS altitude data [18] [19] when compared to
latitudinal and longitudinal data, loading a journey with the same start and
end points can result in a significant error in the z-coordinate (e.g. the
Oxford Robotcar 2014-12-10-18-10-50 trajectory results in a significant height
difference across the journey). To cater for this, OdoViz allows the altitude
to be ignored. Alternatively, the system allows the z-axis to be used to
represent time differences i.e. in addition to the trajectory gradient
coloring, the z-coordinate increases with time where the rate of increase is
adjustable with fine-tuners. This feature is particularly useful when
visualizing multiple and overlapping journeys, and in developing extensions
and plugins to visualize loop closures such as the HTMap [20] extension
(explained later in Section VI-C).

(a)

(b)

Figure 3: Screenshots showing the difference between flattened and time-
encoded z-axis. (a) Flat z-axis, only colored based on index of the pose (b)
Time-encoded z-axis, z-offset added based on the index of the pose. As it is
in 3D, the difference is understood more clearly in the video available at
https://youtu.be/KsksVkYRmlg

###  IV-C Scene Settings

By default, the 3D scene is setup with an oblique view, directional light and
an auto-expanding grid for reference, with each vehicle pose represented as a
low-polygon 3D model of a car. Further settings are provided to switch between
different preset view points (e.g. top-view), toggle grid and lights, and to
adjust the scale of the elements of the 3D model to cater for different levels
of zoom.

Similarly, for data with point-clouds, the size of the points can be adjusted
for either the selected pose or the entire dataset. Point-clouds are uniformly
colored with perceptually uniform444if the data goes from 0.1 to 0.2, this
should create about the same perceptual change in color as if the data goes
from 0.8 to 0.9 and robust to color-blindness viridis colormap [21] [22] based
on the depth using GLSL shader. User defined colourmaps can also be added.

Given that the noise associated with point-clouds often increases
significantly with depth, these areas consume a disproportionately large
region of the color spectrum, leaving a smaller bandwidth for the nearby
points. To ameliorate this issue, this colour mapping can be adjusted by
excluding (farther) points above a certain percentile while coloring. By
default we exclude points above the $90^{th}$ percentile. OdoViz further
provides a setting to add a camera object to each pose, introducing new
possibilities for extensions and plugins to add new tasks based on these
cameras. For example, we have employed these camera objects to develop a
plugin that finds intersecting camera frustums to create datasets of images
from overlapping viewpoints.

Mouse interaction to control the viewfinder defaults to Orbit controls (Mouse-
drag controls rotation and Alt + Mouse-drag controls translation) however this
can be changed to Map controls (or vice versa). Mouse-hover highlights and
selects the pose while right mouse-click pins/unpins the currently selected
pose. Mouse-hover will not trigger selection when an object is pinned. This is
useful when performing other operations on the scene while keeping the desired
object selected.

Additionally, there is an animate feature that starts from the first pose and
propagates to subsequent poses with an adjustable time delay to smoothly
visualized a replay of the entire journey sequentially. As the animation
proceeds, poses are selected one after the other, with the viewfinder’s target
set to the selected object and the selection being pinned to avoid other mouse
interactions. This allows rotating and zooming in/out of the map whilst
keeping the currently animated object in the center of view.

(a) Selected Pose

(b) Info Viewer

(c) Image Viewer

Figure 4: Screenshots showing (a) the viewport showing the selected pose
highlighted in black, (b) information about the selected pose in the Info
Panel, and (c) the image along with an embedded minimap in the Image Panel

###  IV-D Info and Image Viewer

On selection of a pose in the visualisation tool’s main viewport (see 4(a))
the associated information and the corresponding image can be viewed in the
info panel and the image viewer panel, respectively (i.e. when the panels are
activated). This information includes data such as latitude, longitude,
altitude, heading, etc., (see 4(b)) and the image taken from the data-point
(see 4(c)). We also developed a plugin to conveniently visualize in real-time
the selected pose on satellite imagery using its GPS data if available. To do
this, we show the selected pose on a mini-map above the image using LeafletJS
[23] and OpenStreetMap [24] which updates as selection changes. Additionally
we integrated a feature that allows viewing the selected pose in a new browser
tab on Google Maps and on Google Street-View. It should be noted that heading
information of the current pose is used for comparison of the image against
recent 360 captures from the same pose.

##  V Pose Processing

###  V-A Adaptive Sampling

Many datasets offer dense data with poses sampled at a rate that can be as
high as 200 Hz. For example, visualizing a 10 km journey through
Oxford555Oxford Robotcar [7] trajectory 2014-11-18-13-20-12 with GPS logged at
50 Hz yields $118763$ poses whereas images logged at 16 Hz yields $35514$
poses. Rendering such large number of data-points would require excessive
computational resources resulting in very large loading times of up to a few
minutes even on a modern high-end consumer-grade CPU. This data is often
uniformly sampled using scripts to reduce the amount of data-points rendered
in the 3D environment.

This uniform sampling is often also applied when training models that make use
of keypoints in the images. In each of these cases, and particularly in the
latter, such an approach to sampling may not be suitable. This is due to the
fact that a lot of data-points will be decimated around corners despite their
exhibiting large variation in the visual content due to the rapid change of
heading.

(a)

(b)

(c)

(d)

Figure 5: Screenshots (a) and (b) show poses present in a portion of Oxford
Robotcar trajectory after uniform sampling and adaptive sampling respectively.
Contours connecting the sampled poses (c) and (d) highlights the difference in
results between the two methods and shows how the adaptive sampling preserves
the corners of the trajectory. A screen-cast showing how changing the
constraints $\tau_{d_{\text{acc}}}$ and $\tau_{\theta_{\text{acc}}}$ affects
sampling in real-time, is available at
https://www.youtube.com/watch?v=9Vf26sgRqSc

Usually a sparse set of data points are uniformly sampled from such dense data
based on a fixed distance threshold. For example, one pose every 5 metres
would reduce the total number of poses from $35514$ to less than $1000$ in the
above Robotcar trajectory. As such, this distance-based uniform sampling also
removes redundant poses at the same GPS co-ordinates captured as the vehicle
waits at a red traffic light at an intersection. However, we also lose a lot
of visually dissimilar and feature rich images around the corners as the
vehicle sweeps a larger heading angle in a very short distance. For example,
in a tight turn with 10 or more visually distinct viewpoints, uniform sampling
will reduce the resultant segment to one or two images if sampled only based
on a distance threshold.

In order to overcome this issue, we present an adaptive sequence-based
sampling technique which is dependent on the rate of change of angle with
respect to distance. The algorithm for adaptive sampling is shown in Algorithm
1.

Result: List of sampled_poses

poses = list of poses;

// population, input

sampled_poses = [];

// result placeholder

$d_{\text{acc}}$ = 0;

// accumulated distance

$\theta_{\text{acc}}$ = 0;

// accumulated angle

$\tau_{d_{\text{acc}}}$ = 12;

// static distance threshold ($m$)

$\tau_{\theta_{\text{acc}}}$ = 15;

// adaptive distance threshold ($\deg$)

foreach  _pose in poses_ do

$d_{\text{acc}}$ = $d_{\text{acc}}$ \+ $\Delta{d}$ ;

$\theta_{\text{acc}}$ = $\theta_{\text{acc}}$ \+ $\Delta{\theta}$ ;

if  _$\theta_{\text{acc}}$ > $\tau_{\theta_{\text{acc}}}$ or
$\theta_{\text{acc}}$ > $\tau_{\theta_{\text{acc}}}$_ then

Add pose to sampled_poses;

// choose sample

end if

end foreach

Algorithm 1 Adaptive Sampling

This technique traverses the poses using timestamps and decimates the poses
only along the sequence, preserving the poses on overlapping routes within the
journey. In contrast binning the poses based on the GPS locations using a KD-
Tree and selecting one pose per bin, would yield fewer samples as all poses
from a certain GPS location would fall in the same bin regardless of whether
it belongs to an overlapping route or not. Hence, the sequence-based sampling
is preferred as the resultant set of poses can be used in many place
recognition related tasks such as computing loop closure detection on fewer
samples from the same trajectory.

A plugin for sampling added to the visualization tool allows us to perform
both uniform sampling using a static distance threshold
$\tau_{d_{\text{acc}}}$ and adaptive sampling using an adaptive distance
threshold $\tau_{\theta_{\text{acc}}}$ based on the angle accumulated,
$\theta_{\text{acc}}$, over a distance, $d_{\text{acc}}$ . We avoid computing
interpolation of data as $\tau_{d_{\text{acc}}}$ or
$\tau_{\theta_{\text{acc}}}$ changes, by pre-computing the interpolated data
for all images. This makes it possible to interactively vary both
$\tau_{d_{\text{acc}}}$ and $\tau_{\theta_{\text{acc}}}$ for adjusting
sampling with real-time visual feedback.

5(a) and 5(b) shows the different poses sampled based on the uniform sampling
and adaptive sampling, respectively. The plugin also shows total poses that
will be sampled based on the criteria chosen and features a facility to export
sampled poses as a json file for training machine learning models.

###  V-B Finding Pose Correspondences

To train computer vision models to extract features from images robust to
different viewpoints, seasons and different times of the day, requires many
thousands of image pairs from corresponding locations. This data can be
curated based on the GPS data. In curating such datasets, it is important to
compare images and information regarding the poses of same or another journey
traversed on the same route, either partially or completely. We compute a
matching pose with the least loss for each of the poses in the journey
selected for finding correspondences, where the matching loss between a query
pose $x$ and a match candidate pose $y$ is defined as follows:

$\begin{split}\text{Loss}&=\alpha\;\Delta{d}+\beta^{*}\;\Delta{\theta}\\\
\beta^{*}&=\begin{cases}\beta\;\dfrac{\theta_{\text{acc}}}{\tau_{\beta_{\theta}}},&\text{if}\
\theta_{\text{acc}}>\tau_{\beta_{\theta}}\\\
\beta,&\text{otherwise}\end{cases}\end{split}$ (1)

where,

$\alpha$ ${}={}$ | distance importance factor
---|---
$\beta$ ${}={}$ | angle importance factor
$\beta^{*}$ ${}={}$ | adaptive angle importance factor
$\Delta{d}$ ${}={}$ | absolute distance666computed using the Haversine Formula [25] i.e. the great-circle distance between two points on a sphere given their longitudes and latitudes between $x$ and $y$
$\Delta{\theta}$ ${}={}$ | absolute heading difference between $x$ and $y$
$\theta_{\text{acc}}$ ${}={}$ | angle accumulated up to a distance of $\tau_{\beta_{d}}$ from $y$
$\tau_{\beta_{\theta}}$ ${}={}$ | beta limiter threshold

In order to speed up the matching process, we discard poses that have a
distance loss greater than 30 m and any loss greater than a defined
$\tau_{\text{loss}}$. To avoid having multiple poses matching to more than one
query pose, an additional step is performed to check if the match has been
paired with any other pose. We update the match only if it has a lower loss
than other matches. All the above operations are fully customizable to suit
individual needs in a separate matcher file.

When a journey is loaded and sampled, OdoViz can load another overlapping
journey and find matching poses for each of the poses in the current journey
as described above. The matched poses from the new journey are grouped
together, and added to the same 3D scene with a different color. Figure 6
shows the color coded matching results of loading two traversals against the
loaded traversal. As with the pose sampling plugin, this plugin features an
export as json option where the resulting file can be used directly for
training machine learning models e.g. CNN-based metric learners [26] [27]
[28].

Figure 6: Left: the main viewport loaded with three Oxford Robotcar
trajectories obtained by matching Winter Night 2014-12-10-18-10-50 (green) and
Summer Day 2015-05-19-14-06-38 (indigo) against an adaptively sampled Winter
Day 2014-12-09-13-21-02 (orange). Right: Images corresponding to the three
matched poses marked in red in the left image: top - Winter Day, middle -
Winter Night, and bottom - Summer Day.

##  VI Extensions and Plugins

Further to the core modules described in the previous sections, OdoViz’s
functionality can be extended through the addition of visualization and
compute extensions and plugins for importing and exporting data. Compute
intensive extensions are recommended to use Web Workers for compute operations
that asynchronously load the compute data. Here we highlight three such
extensions that are included with the software in order to provide examples of
the versatility of the system.

###  VI-A Save and Restore Plugin

The Save plugin is a simple import/export plugin that saves store data to the
browser’s storage. The current view, offset settings, scene settings, sampling
settings and the loaded file can be saved and restored using this plugin.
Additionally the plugin indicates if there have been any changes made since
the last load, for example, to check if the sampling was performed using
previously saved settings before exporting sampled poses.

###  VI-B top-k Image Retrieval Analysis Extension

A common approach for visual place recognition using deep neural networks is
to compute a compact embedding that provides a compressed representation of an
image’s visual appearance suitable for matching and retrieval. When each image
can be represented compactly in a low dimensional learned embedding, it is
important to visually analyze the precision and robustness of the resulting
embeddings. Often a top-k precision and/or top-k recall metric is used to
evaluate the quality of the embeddings using retrieval performance. The top-k
Image Retrieval Analysis extension accepts one or more ($i$) .npz file
containing pairwise distances, labels and top-k distances output during
training for different epochs of a machine learning algorithm and ($ii$) the
corresponding data.json containing the mapping from label and index to the
original image file location on disk. This data is then presented in an
intuitive tabulated format showing Top-k matches, with $k=5$ by default. The
interface allows the user to interactively explore the results, selecting
different query or anchor images, visualising the top-k matches, varying $k$
using a slider, etc. (see Figure 7). In particular, when a row is selected in
the table, an image comparison interface on the right shows images of the
ground truth and the top match one below the other, while showing smaller
thumbnails of the top-5 matches below. Ground Truth is shown in yellow while
the match is shown in blue; as font-color in the table and as border in the
image comparison interface. Results for a given epoch can be compared with
other epochs using the slider provided.

Figure 7: Screenshot of top-k Image Retrieval Analysis extension showing top-5
matches for all images in a batch at step 32949

###  VI-C HTMap Extension

As a final example we present a visualisation plugin to render the output of
the Hierarchical Topological Maps (HTMap) technique of Garcia et al. [20].
This approach divides trajectories by hierarchically grouping images into a
set of topologically connected nodes. The HTMap extension allows loading
results of HTMap to provide a 3D view of how the trajectory is divided into
multiple parts with a different color for each location and where the image
loops have been found. Figure 8 shows the HTMap result for one of the Oxford
Robotcar trajectories. Notice the different color for sets of poses belonging
to the same topological node and the loop closure connections in red that
connects the poses of the images matched.

Figure 8: Screenshot of HTMap plugin showing loop closure connections in an
overlapped route within the same trajectory loaded with time in Z-axis

##  VII Conclusions

In the paper we presented OdoViz, a new web-tool for simplifying the task of
utilising autonomous vehicle datasets within machine learning research. The
platform facilitates:

  * •

viewing and inspecting complete trajectories supporting many popular datasets
out of the box

  * •

interactive viewing of information, image and point-cloud data associated with
individual poses

  * •

viewing poses on satellite imagery inline, externally on Google Maps and the
corresponding omnidirectional image on Google Street View.

  * •

pose processing including adding offsets, sampling, comparing, and finding
pose correspondences within and across the trajectories

  * •

exporting resultant poses and correspondences in _json_ format suitable for
use in machine learning

  * •

adjusting, exporting and importing settings related to the 3D environment and
pose processing tasks

  * •

adding extensions and plugins to extend the capabilities

  * •

integrating server-side compute intensive and GPU-based operations

The tool is released as an open-source platform for use and extension by other
researchers, and is under further active development within our own group. The
tool can be deployed flexibly as single user installation software, browser
based tool served from a common organization server, or an online interactive
visualization tool for publicly available datasets. Future releases will
include:

  * •

Rendering pose on standard and custom satellite imagery

  * •

Rendering 3D Buildings over satellite imagery with the ability to perform
tasks that utilise and operate on the 3D polygon data

  * •

A plotting plugin for producing graphs and/or histograms related to the pose
data

  * •

Supporting and visualising geo-spatial tasks such as clustering, hexbinning,
and generating heatmaps from the resultant data

## Acknowledgments

Research presented in this paper was supported by Science Foundation Ireland
grant 13/RC/2094 to Lero - the Irish Software Research Centre and grant
16/RI/3399.

## References

  * [1] E. D. Dickmanns, _Dynamic Vision for Perception and Control of Motion_. Springer London, 2007. [Online]. Available: https://doi.org/10.1007/978-1-84628-638-4
  * [2] J. Delcker, “The man who invented the self-driving car (in 1986),” https://www.politico.eu/article/delf-driving-car-born-1986-ernst-dickmanns-mercedes/.
  * [3] J. Schmidhuber, “Highlights of Robot Cars History,” https://people.idsia.ch//~juergen/robotcars.html.
  * [4] A. Geiger, P. Lenz, and R. Urtasun, “Are we ready for autonomous driving? the kitti vision benchmark suite,” in _IEEE CVPR_ , 2012.
  * [5] M. Warren, D. McKinnon, H. He, and B. Upcroft, “Unaided Stereo Vision Based Pose Estimation,” in _Australasian Conference on Robotics and Automation_ , Brisbane, 2010.
  * [6] H. Badino, D. Huber, and T. Kanade, “Real-time topometric localization,” in _2012 IEEE International Conference on Robotics and Automation_. IEEE, 2012, pp. 1635–1642.
  * [7] W. Maddern, G. Pascoe, C. Linegar, and P. Newman, “1 Year, 1000km: The Oxford RobotCar Dataset,” _The International Journal of Robotics Research (IJRR)_ , vol. 36, no. 1, pp. 3–15, 2017. [Online]. Available: http://dx.doi.org/10.1177/0278364916679498
  * [8] F. Yu, H. Chen, X. Wang, W. Xian, Y. Chen, F. Liu, V. Madhavan, and T. Darrell, “BDD100K: A Diverse Driving Dataset for Heterogeneous Multitask Learning,” 2018.
  * [9] S. Yogamani, C. Hughes, J. Horgan, G. Sistu, P. Varley, D. O’Dea, M. Uricár, S. Milz, M. Simon, K. Amende, _et al._ , “Woodscape: A multi-task, multi-camera fisheye dataset for autonomous driving,” _arXiv preprint arXiv:1905.01489_ , 2019.
  * [10] M. Cummins and P. Newman, “FAB-MAP: Probabilistic Localization and Mapping in the Space of Appearance,” _The International Journal of Robotics Research_ , vol. 27, no. 6, pp. 647–665, 2008. [Online]. Available: http://ijr.sagepub.com/cgi/content/abstract/27/6/647
  * [11] M. Gadd, G. Pascoe, D. Barnes, S. Brahmbhatt, C. Ros, and Farid, “Robotcar Dataset SDK,” https://github.com/ori-mrg/robotcar-dataset-sdk.
  * [12] F. Yu, X. Li, X. Wang, T. Fisher, and J. Pang, “BDD100K Toolkit,” https://github.com/bdd100k/bdd100k.
  * [13] C. Wu, “Visual SFM,” http://ccwu.me/vsfm/doc.html.
  * [14] J. P. e. a. Cruise Automation, Audrey Li, “Webviz: Visualizing robotics data in the browser,” https://webviz.io/.
  * [15] U. ATG and VIS.GL, “The autonomous visualization system,” https://avs.auto.
  * [16] Q.-Y. Zhou, J. Park, and V. Koltun, “Open3D: A modern library for 3D data processing,” _arXiv:1801.09847_ , 2018.
  * [17] B. J. et al., “glMatrix, A Javascript Matrix and Vector library for High Performance WebGL apps,” https://github.com/toji/gl-matrix.
  * [18] M. Albéri, M. Baldoncini, C. Bottardi, E. Chiarelli, G. Fiorentini, _et al._ , “Accuracy of Flight Altitude Measured with Low-Cost GNSS, Radar and Barometer Sensors: Implications for Airborne Radiometric Surveys,” _Sensors_ , vol. 17, no. 8, p. 1889, Aug. 2017.
  * [19] Garmin Ltd, “Understanding the Accuracy of the GPS Elevation Reading,” 2005\.
  * [20] E. Garcia-Fidalgo and A. Ortiz, “Hierarchical place recognition for topological mapping,” _IEEE Transactions on Robotics_ , vol. 33, no. 5, pp. 1061–1074, Oct 2017.
  * [21] Stéfan van der Walt and Nathaniel Smith, “A Better Default Colormap for Matplotlib,” https://bids.github.io/colormap/, 2015.
  * [22] N. Camgöz, C. Yener, and D. Güvenç, “Effects of hue, saturation, and brightness: Part 2: Attention,” _Color Research & Application_, vol. 29, no. 1, pp. 20–28, Dec. 2003.
  * [23] V. Agafonkin, “Leaflet - a JavaScript library for interactive maps,” https://leafletjs.com.
  * [24] OpenStreetMap contributors, “Planet dump retrieved from https://planet.osm.org ,” https://www.openstreetmap.org, 2017.
  * [25] R. W. Sinnott, “Virtues of the Haversine,” _skytel_ , vol. 68, no. 2, p. 158, Dec. 1984.
  * [26] R. Hadsell, S. Chopra, and Y. LeCun, “Dimensionality Reduction by Learning an Invariant Mapping,” in _2006 IEEE CVPR_ , vol. 2, June 2006, pp. 1735–1742.
  * [27] F. Schroff, D. Kalenichenko, and J. Philbin, “FaceNet: A unified embedding for face recognition and clustering,” _2015 IEEE CVPR_ , Jun 2015.
  * [28] W. Chen, X. Chen, J. Zhang, and K. Huang, “Beyond triplet loss: a deep quadruplet network for person re-identification,” _CoRR_ , vol. abs/1704.01719, 2017.