Skip to content

Nixpkg support for ConnectModules branch#505

Draft
arntanguy wants to merge 56 commits intojrl-umi3218:masterfrom
arntanguy:topic/nix-ConnectModules
Draft

Nixpkg support for ConnectModules branch#505
arntanguy wants to merge 56 commits intojrl-umi3218:masterfrom
arntanguy:topic/nix-ConnectModules

Conversation

@arntanguy
Copy link
Collaborator

@arntanguy arntanguy commented Feb 24, 2026

This is an up-to-date version of #495 rebased on top of #462 and currently used for the experimental nixpkg packaging.
We either need to cherry-pick nix-related fixes on top of #495 or merge both aforementioned PR together ;)

arntanguy and others added 30 commits February 18, 2026 16:35
Nix sets them to an absolute path with clashes with the usual assumtion
that GNUInstallPaths returns them as relative names (e.g lib, bin, ...)
This is required to build controllers into a separate install prefix in
nix
…able

This allows to easily set a default configuration in docker environments
This method allows to generate a new RobotModule by connecting two
modules together.
Boost 1.74 has a bug in bfs::copy_path, use std::filesystem instead
arntanguy and others added 24 commits February 18, 2026 19:49
The introduction of RobotModule::connect made it interesting to compose
robot modules. In order to expose new modules that are composed of
multiple other existing modules, it is necessary to allow loading other
robot modules while creating a new one.

This effectively allows calling get_robot_module from within the
create() function of a new robot module library. To do so we unlock the
mutex just before the actual call to create().

This may have unintended side effects.
jointConfig for a free joint is a 0-matrix, thus the transform is a zero
matrix. This messes up the root joint's inertia and such.
For now we do not generate a connected robot module using the real urdf
paths, we probably should. To support display as-is in ROS, we use the
control urdf as real urdf.
This allows to define collisions and ignore them if the convex files are
missing. Useful for quick multi-robot FSM setups.
…ULT_RUNTIME_INSTALL_PREFIX

MC_STATES_DEFAULT_RUNTIME_INSTALL_PREFIX should always point to mc_rtc's
own install prefix, regardless of MC_RTC_HONOR_INSTALL_PREFIX value
…brarie files

- Merge library runtime paths (ControllerPaths, RobotModulePaths, etc).
This is useful for Nix to provide multiple mc_rtc.yaml files building
the full runtime paths, and to allow overriding nix default derivations
with local builds in the user's environment. The first loaded library
gets picked up, which corresponds to that of the latest mc_rtc.yaml file
loaded.

- Fix a logic inconsistency in loader.cpp: we were looping twice over
each library file
Nix installs all ros packages in their own separate install prefix. This
breaks some default assumption we had, in particular in paths fallback
when package:// cannot be resolved. We use to assume that we could
fallback to a path relative to mc_env_description, this is no longer
possible. In addition we explicitely check that manually provided
fallback paths actually exist.

Instead we make mc_env_description, mc_int_obj_description and
jvrc_description paths detected at compile-time available through
mc_rtc/config.h. This further simplifies cmake/test logic as a bonus

In addition, fix an issue in find_description_package that would cause
duplicated share/jvrc1_description/share/jvrc1_description. It seems to
be an odd edge-case of cmake's set(...) function with
variable-of-variables
@arntanguy arntanguy force-pushed the topic/nix-ConnectModules branch from 97e0a53 to 2d323fe Compare March 3, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants