Skip to main content

Adaptive Constrained Kinematic Control using Partial or Complete Task-Space Measurements

Python

venv

    python3 -m venv venv
    source venv/bin/activate
    python3 -m pip install dqrobotics --pre
    python3 -m pip install marinholab-papers-tro2022-adaptivecontrol

When you cannot use a venv (e.g. ROS2)

    python3 -m pip install dqrobotics --pre --break-system-packages
    python3 -m pip install marinholab-papers-tro2022-adaptivecontrol --break-system-packages

Reference

Sample code and minimal example for our TRO2022 paper.

@Article{marinhoandadorno2022adaptive,
  author       = {Marinho, M. M. and Adorno, B. V.},
  title        = {Adaptive Constrained Kinematic Control using Partial or Complete Task-Space Measurements},
  journal      = {IEEE Transactions on Robotics (T-RO)},
  year         = {2022},
  month        = dec,
  doi          = {10.1109/TRO.2022.3181047},
  volume       = {38},
  number       = {6},
  pages        = {3498--3513}
}

C++ code layout & namespaces

All C++ declarations (headers under include/marinholab/papers/tro2022/adaptive_control/ and sources under src/example/) live in the namespace

marinholab::papers::tro2022::adaptive_control

which mirrors the Python package path marinholab.papers.tro2022.adaptive_control. To match the namespace, the C++ identifiers no longer carry the legacy M3_ prefix; each class is named after the package path instead:

marinholab::papers::tro2022::adaptive_control:: File
AdaptiveController AdaptiveController.{h,cpp}
SerialManipulatorEDH (with nested ParameterSpaceEDH) SerialManipulatorEDH.{h,cpp}
SimulatorDummy (headless, in-memory scene) SimulatorDummy.{h,cpp}
VFI (with Primitive, VFI_Direction, VFI_DistanceType) VFI.{h,cpp}
MeasureSpace (with get_measure_space_dimension) MeasurementSpace.{h,cpp}

The free helpers the example relies on (get_variable_boundary_inequalities, closest_invariant_error, get_example_scene_vfis, randomize_parameters, set_parameter_space_boundaries) are in the same namespace; the standalone example (src/adaptive_control_example.cpp) pulls it in with using namespace marinholab::papers::tro2022::adaptive_control;.

The Python API is unchanged. The pybind11 module still exposes the historical M3_* names (M3_SerialManipulatorEDH, M3_SimulatorDummy, M3_AdaptiveController, M3_VFI, M3_MeasureSpace, ...), so the Python package and the notebook under book/ keep working without changes. The M3_ prefix was dropped only from the C++ layer.

Standalone Example

  • The estimated robot model starts out on purpose very wrong, to evaluate the adaptation.
  • The estimation usually converges within a few seconds using measurements from a simulated sensor.
  • Simultaneously, the robot proceeds through the box toward the target poses, without collisions.
  • The example runs headless on the in-memory stand-in simulator (SimulatorDummy), so no external simulator is required.
  • You can change the pose of the xd0 and xd1 target objects (see SimulatorDummy::load_reference_scene), as long as you do it before the simulation starts.

The paper's original demonstration (recorded with the robot model in the GUI):

https://github.com/mmmarinho/tro2022_adaptivecontrol/assets/46012516/2abe0b0b-6e48-46e9-9a86-061ba013b355

Usage

Download & extract the standalone version (only do this once)

cd ~
sudo apt install curl jq -y
wget $(curl -sL https://api.github.com/repos/mmmarinho/tro2022_adaptivecontrol/releases/latest | jq -r '.assets[].browser_download_url')
tar -xvf tro2022_adaptivecontrol_example.tar.xz

Running

cd ~/tro2022_adaptivecontrol_example
./run_example.sh

Troubleshooting

If the pre-compiled example fails with a GLIBC/GLIBCXX version error, please use Ubuntu 22.04 or later, or build from source (below).

Known limitations of this example/TODO list/Extra info

  • The stopping criterion is elapsed time, so it might not converge for all initial parameters.
  • The initial convergence to measurements mentioned in the paper TODO for this example.
  • The estimated model is randomized so it might start in an implausible zone. Fixing this is TODO for this example.
  • Sample code for partial measurements is included, but they have not been tested in this example, only in the physical robot. The adaptation is supposed to move the parameters of the estimated_robot towards the ideal kinematic model defined by real_robot in the code.
  • A different solver was used in the paper's experiments; in this example we use an open-source solver, so the behavior might be somewhat different.
  • The final target position is, ON PURPOSE, chosen as somewhere the robot cannot reach. It serves to show that even in such case the robot does not collide with the environment.

Build from source

Ubuntu

sudo apt install g++ cmake git libeigen3-dev

macos

brew install cmake eigen

Download the repo

cd ~
mkdir git
cd git
git clone https://github.com/mmmarinho/tro2022_adaptivecontrol.git --recursive

Build

With all dependencies correctly configured,

cd ~/git/tro2022_adaptivecontrol
chmod +x .build.sh
./.build.sh

Running

The example runs headless on the in-memory stand-in simulator (SimulatorDummy):

cd ~/git/tro2022_adaptivecontrol
chmod +x .run.sh
./.run.sh

Example console output of the results

Running on an 8 core Ubuntu VM.

Not considering the setup step prints

Reference timeout for xd0
  Average computational time = 0.00126314 seconds.
  Clock overruns =7 (Too many, i.e. hundreds, indicate that the sampling time is too low for this CPU).
  Final task pose error norm 2.37699e-15 (Dual quaternion norm).
  Final task translation error norm 0 (in meters).
  Final measurement error norm 9.3756e-16 (Dual quaternion norm).
  Final measurement translation error norm 0 (in meters).
Reference timeout for xd1
  Average computational time = 0.000902905 seconds.
  Clock overruns =7 (Too many, i.e. hundreds, indicate that the sampling time is too low for this CPU).
  Final task pose error norm 0.0225817 (Dual quaternion norm).
  Final task translation error norm 0.044178 (in meters).
  Final measurement error norm 0.000940036 (Dual quaternion norm).
  Final measurement translation error norm 0.001836 (in meters).

Tested on

  • Ubuntu 22.04 5.19.0-41-generic #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
  • g++ --version g++ (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
  • DQ Robotics cpp as shown in the submodule information.
  • DQ Robotics cpp-interface-qpoases as shown in the submodule information.
  • qpOASES as shown in the submodule information.
  • sas_core as shown in the submodule information.

Changelog

  • 2026.09. Dropped the legacy M3_ prefix from the C++ identifiers and moved all C++ code into the marinholab::papers::tro2022::adaptive_control namespace (headers/sources renamed to AdaptiveController, SerialManipulatorEDH, SimulatorDummy, VFI, MeasurementSpace). The Python API is unchanged and still exposes the historical M3_* names.
  • 2026.08. Removed the dependency on the external robot simulator and its network interface: the example now runs headless on the in-memory stand-in simulator M3_SimulatorDummy (dry testing), so no external simulator is required to build or run it.
  • 2025.05. Updating code to work with an external-simulator-based interface.
  • 2025.06. Removed Python wrapper instructions now that it's available via PyPI.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-macosx_26_0_arm64.whl (384.6 kB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-macosx_26_0_arm64.whl (384.5 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-macosx_26_0_arm64.whl (382.8 kB view details)

Uploaded CPython 3.11macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-macosx_26_0_arm64.whl (381.7 kB view details)

Uploaded CPython 3.10macOS 26.0+ ARM64

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06c69851ff4dd399d5fe1680c1dd7c43b918be46f08fbaf54b7712ed9bbf019e
MD5 93acedf9941802c0542012cefc8016b0
BLAKE2b-256 f06d65dbc12e675ec9b009c83ca7d8ac12d016bca7f1350472c04bed84799949

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5952d7a2ec3e79cc53705e0c346a03963b4bab38767682f13d4bb73affa1b355
MD5 4db36b07bdce9d199791b84a1523de79
BLAKE2b-256 80304932bcea93d309b5752a1a9362974b170540ee212288ad3f97b65fc9d2ad

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 4f86c3f5d244f67580a98ce90e18ae113e790ed89e3b6bcc3320f98963067c33
MD5 5a848aa786edadc4cd67858510dd0710
BLAKE2b-256 d2807f9ff6cd04d3fecf84b797bf02e5488a213fb19bf86fb00e5c516343c52e

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1361c5a857451098afb1fdc9e76b96c696c4c5dca21e3283654a9d62a4d1a344
MD5 85cdafc9085034c3a5c8371d2381e8e7
BLAKE2b-256 2b545a17794fa3ada0f7218288255de94a895f9ba24bf050e535197cf8c48ff1

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a9485491e9fdef7f14ada7f929a3c38cd3c4f27b582d1eea100056e08d16451f
MD5 f6d2c30859d686978be3c01ff26a0a25
BLAKE2b-256 73e8fa30ad87faf582fb8e3d04bcd7ddff61d500704b4d1697f50daabb69c4d9

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 f85ea5e6fb13a9de7b243b75a3b33a89eee1a62ee7f4c4c2470e04ab4aa64787
MD5 858efe5ff8a2b293b72519870bd886fe
BLAKE2b-256 9fb75be13e755bd34a2d5c881bec96c73a844af19b956397cc026de8aa2a7d67

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1309e3e016ce14563ac140f4c09f696bc9f039445fed73bf492d9519a851340a
MD5 376a7b59bc00c9281695e0ba6c18c1ef
BLAKE2b-256 09f8781453c10f4620867a047b6a4197f97f4071c6d528e097d892923f3a64b8

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a96ee5d8362af2e95478b443da973443cb801dc7c752092070c15b468e0c8c03
MD5 f0580760a2f94abde287c78fce72c574
BLAKE2b-256 aa809b5c53bbf3a3640bee5e420bb2b1b3a5abf70f69a5b07f3aa43dc8cabb76

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp311-cp311-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 060ba79c87f72901c26f05491ca446cef3baea316a5161e53481f783d4986e61
MD5 b02ffd33bcf4cf8bc20742605ac72d58
BLAKE2b-256 ef045bee6b72e1161e4d796c214cf64d90432e4270956fd861b872ed261aaad0

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf1111a05e304eee9296077b963d7fc9a7e4d30276ffae1724a145f68f7137d7
MD5 c281d785b1123752d0a7cc43297ef2b8
BLAKE2b-256 f7010549447a53fd4c1a794769d97180e301f80284bf39e55968433afaa4feb5

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 92bb2e1edfc85143f82175e5b90fa036c8bff437bbbe5848a6f2bfcd83cc7af5
MD5 ad17008ac3128c9ed0d4cf4a941da4b7
BLAKE2b-256 6772bc03c716588c672e61319e7e7eb4f0eb551e9fed4eb32b21ad2164f37df5

See more details on using hashes here.

File details

Details for the file marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.46-cp310-cp310-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 6d4e8969fcaa722ffec358b11249b6d053d511863fb07facd2666aae2c625da9
MD5 892a7ef1dfb467254286960c906f8e56
BLAKE2b-256 2938b91f11439b1228e3d58cc9d60f31107a91b4a26daa1d77b0f08c803cb5d0

See more details on using hashes here.

Release history Release notifications | RSS feed

25.6.0.50

12 files

25.6.0.49

12 files

25.6.0.48

12 files

25.6.0.47

12 files

This release

25.6.0.46 This release

12 files

25.6.0.45

12 files

25.6.0.34

12 files

25.6.0.33

12 files

25.6.0.27

12 files

25.6.0.26

12 files

25.6.0.25

12 files

25.6.0.24

12 files

25.6.0.23

12 files

25.6.0.22

6 files

25.6.0.21

4 files

25.6.0.20

8 files

25.6.0.18

5 files

25.6.0.17

1 file

25.5.6

9 files

25.5.5

9 files

25.5.4

10 files

25.5.3

10 files

25.5.2

10 files

25.5.1

2 files

25.5.0

2 files

23.6.0

2 files

0.0.1

8 files

0.0.0

8 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page