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. The 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 uses the same names as the C++ classes. The pybind11 module exposes SerialManipulatorEDH, SimulatorDummy, AdaptiveController, VFI, MeasureSpace, Primitive, VFI_Direction, VFI_DistanceType (and the _ParameterSpaceEDH submodule with Example_Parameter / Example_ParameterType), so there is a 1:1 match between the C++ and Python layers. Note: this dropped the historical M3_* Python names — consumers that used them need a mechanical M3_ removal (the book/ tutorial and adaptive_control_import_eval.py have been updated accordingly).

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 was aligned with the C++ classes in the same step: the pybind11 module now exposes SerialManipulatorEDH, SimulatorDummy, AdaptiveController, VFI, MeasureSpace, Primitive, VFI_Direction, VFI_DistanceType (and the _ParameterSpaceEDH submodule) — the historical M3_* Python names are gone, and the book/ tutorial + adaptive_control_import_eval.py were updated to the new 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.47-cp313-cp313-macosx_26_0_arm64.whl (384.7 kB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp312-cp312-macosx_26_0_arm64.whl (384.6 kB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp311-cp311-macosx_26_0_arm64.whl (383.0 kB view details)

Uploaded CPython 3.11macOS 26.0+ ARM64

marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp310-cp310-macosx_26_0_arm64.whl (381.9 kB view details)

Uploaded CPython 3.10macOS 26.0+ ARM64

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp313-cp313-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fe8f50190ab98709f53f9af3b37082867d76c95f22eaa6507de0c1b24c24a57
MD5 263254ee122c5a0d2cc1267dd2e30b36
BLAKE2b-256 f925cfb52aface5dbfb7e8358cc06dd6fa07758081bdc1298dd96c79d860faa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp313-cp313-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dbd460e057142842d475bd935fa59966dcb9348f767d8a7f50f79c6f58fba29e
MD5 c1fbfae78643b0e89044d663f22b1db9
BLAKE2b-256 be30da9b59effdb723c7da0e675fb1f2ad4b5f709b2302c248d5715c7479cb6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 370c8d9e499a26ea0cc51c1841dbd0fd822df9c810cc5d015d81fc2ab4ae179e
MD5 f98820e282cf0602fccd14f3bb426656
BLAKE2b-256 c15c4bc5cb9e1d584a8aab241477a9cae52855ce2196ab7f4c836ad712c2b528

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5cd023b40f9b5b9b847ea95b4a80a323c21f23d9c39d1131c6615c16656518b
MD5 612a8e7abe997eba9a20e6d6497618f5
BLAKE2b-256 09b402726cf99d502423d3c79dd9e0fcd758860bc2540f60a0063f256ef53dd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp312-cp312-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9a72bb29112fc45acc59e39e77987a5202cbdc16ba35e8c1ab23e51bc4dc3322
MD5 a236de3eac3f420035a3a95fcef25022
BLAKE2b-256 0527b5fcc79f4be447c619b42d1ebe703ca2844c1bc0c0f4e8d6a55f0928d2d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 86073edb7e7956931feff89adcf29b6925b38bb4afc59d14d9013e2311b08151
MD5 bd358fd7dc24033044cb49d76d83f0a9
BLAKE2b-256 55ecc510b350d31cc25f601239a0a4f6827d6c1251d552755cc162f3db6d1f9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 120f88082c6cd25d4bf200d005c68457f353478ab0a05fe530a402adb569833e
MD5 20fd620b0fcddc9be1d881c0457e9ca0
BLAKE2b-256 b0d359f95f4f04e691143546d0293c4ee3410e90feeb94318a42803409925b17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp311-cp311-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 40de4a6f535ebc0af5abdc6ed88b287ac74d11f08142c07016f1c9ad13ce9ff6
MD5 6382cf7c2a5dbc0448a00fef52aa5d93
BLAKE2b-256 cccf89c6c36b59c2d6aaaddd4a037decc3cabd1d753ae1294b782486513e0d4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp311-cp311-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 4a4f26652a226e848303bc100f7d8e5557f4a40cec8c8a5fbfaae3d4e4f05e50
MD5 95cbf46726ae1ae85a711fb1115be9c9
BLAKE2b-256 f0c1af80d1dc9902e4a9fe335e8ef1f509e6b3e378a434c92cd3c45698a078f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f099604490d55fd33227d411bef5dd7ae0b3b661685cfcd015918c200a18250
MD5 a0aa806c3388d1ddcc55e63ebeee804c
BLAKE2b-256 070e9d7da2cb8e676883865208e8fb5a1a9da9f0079b27f0eff3b53075bfa70e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp310-cp310-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 77a04482dd380cb7aa86560749e0eb3e8bd9057dbfd3253a422393ab49634521
MD5 d1f9789a895593547e253a91d1abf463
BLAKE2b-256 527203e40700c720d7ce813ccc0704747de8679876f4cb173df1aff12ae986b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marinholab_papers_tro2022_adaptivecontrol-25.6.0.47-cp310-cp310-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 03f9292d35aa1381567150b51300591d6e87208c9dc5dc9f0788052afa5825f0
MD5 59169d3bba9fe9e31cfab72df0bb2d34
BLAKE2b-256 f624f26538ccfcee989635dc5d190583ca4e255a4abb245de6daaadf9638103e

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

This release

25.6.0.47 This release

12 files

25.6.0.46

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