Organizations: Department of Bioengineering, Imperial College London, UK. · Department of Mechanical Engineering, The University of Hong Kong, Hong Kong SAR. · School of Computation, Information and Technology, Technical University of Munich, Germany.
Magnetic navigation provides contact-free and line-of-sight-independent feedback for robotic systems, yet existing approaches typically rely on explicit pose estimation or direct use of raw magnetic measurements, making accurate control susceptible to modeling errors, measurement noise, and disturbances. This work presents MagServo, a hierarchical learning-based framework for robust 6-DoF magnetic servoing directly using the learned latent magnetic feature. MagServo learns uncertainty-resilient magnetic representations through masked reconstruction and captures state-dependent interaction dynamics between robot motion and latent magnetic transitions without analytical magnetic models or explicit Jacobian supervision. Based on the learned dynamics, a hierarchical controller combines nonlinear model predictive control for coarse approach with local Jacobian inversion for precise fine regulation. Extensive physical experiments demonstrate submillimeter and subdegree accuracy, achieving mean terminal errors of 0.386 mm and 0.479 degree for 6-DoF pose reaching. MagServo further outperforms a localization-based control baseline in complex trajectory tracking and maintains robust performance under unseen magnetic-source configurations without retraining. A supplementary video of the real-robot experiments is available at https://youtu.be/rZt1NUP1Mr0.
Figures & tables
Fig. 1: Magnetic servoing system comprising a robot manipulator, a dual-magnet end-effector fixture, and a 4×4 magnetometer array.
Fig. 2: Three-stage magnetic representation training. Stage I learns magnetic representations by reconstructing complete observations from masked inputs. Stage II learns latent dynamics with the encoder frozen and selects representative anchors through clustering. Stage III jointly refines the representation and dynamics using reconstruction and prediction losses, with Rosetta anchor regularization to limit latent coordinate drift.
Fig. 3: Closed-loop control architecture of MagServo. A shared encoder maps target and measured magnetic fields to latent states. The latent-error norm selects between coarse MPC and local Jacobian inversion. The selected action u drives the robot, closing the loop through magnetic feedback.
Fig. 4: Single-pose reaching results. (a) Servoing trajectories from 12 different initial poses toward the same target pose. (b) Heatmaps of the 4×4 magnetic measurements at iterations 0, 30, 60, and 90 compared with the target reference. The table reports the corresponding tracking errors and the final errors at the termination step.
Trajectory
ep (mm)
er ( ∘ )
Actions
δx
δy
δz
ϕx
ϕy
ϕz
Spiral
0.179±0.196
0.238±0.223
0.055±0.048
0.156±0.136
0.128±0.122
0.084±0.069
673
Raster
0.255±0.311
0.580±0.485
0.118±0.120
0.673±0.440
0.288±0.343
0.235±0.239
894
TABLE I: Tracking accuracy for the selected spiral and raster trajectories.
Fig. 5: Trajectory-following results. (a) Spiral and (b) raster trajectories. The left column shows the reference and executed servoing trajectories, while the middle and right columns show the corresponding position and rotation errors, respectively.
Trajectory
Method
ep (mm)
er ( ∘ )
Spiral
Localization
1.409±0.673
1.559±0.627
MagServo
0.333±0.267
0.249±0.155
Raster
Localization
1.650±0.795
1.538±0.589
MagServo
0.712±0.505
0.855±0.478
TABLE II: MagServo versus the localization-based baseline.
Trajectory
Magnetic Sources
ep (mm)
er ( ∘ )
Actions
δx
δy
δz
ϕx
ϕy
ϕz
Spiral
Two
0.179±0.196
0.238±0.223
0.055±0.048
0.156±0.136
0.128±0.122
0.084±0.069
673
Three
0.304±0.245
0.268±0.248
0.119±0.093
0.253±0.176
0.292±0.202
0.122±0.093
684
Raster
Two
0.255±0.311
0.580±0.485
0.118±0.120
0.673±0.440
0.288±0.343
0.235±0.239
894
Three
0.239±0.289
0.491±0.489
0.123±0.122
0.408±0.364
0.226±0.285
0.208±0.223
824
TABLE III: Tracking accuracy with two and three magnetic sources.