Conversation
- TODO: release mc_rtc itself - TODO: ros2, python
|
In its current state, this builds a nix-shell that builds mc-rtc and its dependencies, and runs a controller. |
New approach: - build mc-rtc without plugins in mc-rtc.nix - build plugins/robot modules/controllers against this mc-rtc version - generate mc_rtc.yaml configuration with runtime paths to these plugins
add mesh_sampling dependency
|
cbb9f48 is the first truly exploitable prototype. Dependencies are still in branches, but their ref is up-to-date and everything has been pushed to mc-rtc-cachix (no build required). It provides an It looks like this for now: mc-rtc-superbuild = prev.callPackage ./pkgs/mc-rtc/mc-rtc-superbuild.nix {
robots = [
mc-hrp2
mc-panda
mc-panda-lirmm
# note that panda-prosthesis is not strictly-speaking a robot, but it builds a robot module so we need it here as well to populate the robots runtime paths
# it (obviously) won't be built multiple times ;)
panda-prosthesis
];
# MainRobot = "HRP2DRC";
# Enabled = "CoM";
# controllers = [lipm-walking-controller];
controllers = [ panda-prosthesis ];
configs = [ "${panda-prosthesis}/lib/mc_controller/etc/mc_rtc.yaml" ]; # extra mc_rtc.yaml
observers = [];
plugins = [];
apps = [ mc-rtc-magnum mc-franka ];
};and can be tested with git clone --recursive https://github.com/mc-rtc/nixpkgs -b upgrade
git checkout cbb9f483f1453eea52deb99e8d46f45c79ca1d24
nix develop
mc-rtc-magnum &
mc_rtc_tickerNote on non NixOS system, one might need to use system-manager to get opengl apps to work, but I haven't tested it yet. It ough to be setup in the flake though. For now, derivations can be overridden with a local git repository, but this is done manually, and triggers a full rebuild on change. This has been successfully deployed on Seanan's system with Windows 11 + WSL2 + NixOS today! |
This allows to override nix derivations with local builds of a controller. This is achieved by providing the path to the local install in the last loaded mc_rtc.yaml and setting LD_LIBRARY_PATH accordingly (this could probably be avoided with more rigourous rpath handling) e.g mc_rtc.yaml ControllerModulePaths: ["/home/arnaud/devel/mc-rtc-nix/install/lib64/mc_controller"] RobotModulePaths: ["/home/arnaud/devel/mc-rtc-nix/install/lib64/mc_robots"] ObserverModulePaths: [] GlobalPluginPaths: ["/home/arnaud/devel/mc-rtc-nix/install/lib64/mc_plugins"]
…es use With the symlinkJoin approach, ros packages built with buildRosPackage are unavailable (mc-rtc-rviz, ros2 cli, etc). Restore the previous approach for now.
…c-magnum/mc-rtc-imgui
This is currently not entirely separated, as we use the same local source folders for overriden impure package with callWithLocal. Good enough for now: - mc-rtc-superbuild uses only commited code - mc-rtc-superbuild-rolkneematics uses only commited code - mc-rtc-superbuild-stanalone-magnum uses local override for magnum - mc-rtc-superbuild-hugo uses override from mc-rtc's commited fork (nix + polytope constraints) and local overrides for hugo's controller So for now nothing clashes explicitely, but not everything is pushed/released TODO: fix resolution issue in mc-rtc-magnum-stanalone
|
Still unfinished, but will merge as-is as:
|
mc_rtc.yamlandLD_LIBRARY_PATHis providedccacheStdenvcould be an option there.mc_log_ui,mc_rtc_new_fsm_controller, etc)