This repository hosts a nix overlay for mc_rtc.
This is especially meant to be used to tests controllers in clean environments, in particular during the mc_rtc "vanilla" edition and mc_rtc with TVM (i.e. mc_rtc 2.0.0).
It is currently possible to run MCUDPControl within this setup and thus to run experiments on a robot that uses mc_udp servers.
- Install Nix on your system
- Install cachix:
nix-env -iA cachix -f https://cachix.org/api/v1/install - Enable the ROS cache:
cachix use ros - Clone this repository
- Navigate to the cloned folder
- Run
nix-shell --pure --arg with-tvm true
-
with-tvmfalse(default) gets you the master version of mc_rtctruegets you the experimental/preview version of mc_rtc + TVM
-
with-rostrue(default) build mc_rtc with ROS supportfalsebuild mc_rtc without ROS support
-
with-udpfalse(default) runs a simple ticker (similar tomc_rtc_ticker)truerunsMCUDPControl
Each argument must be specified with --arg, for example:
# Run MCUDPControl with vanilla mc_rtc and no ROS support
nix-shell --pure --arg with-tvm false --arg with-udp true --arg with-ros falseshell.nix contains a simple example to show how to point nix to your local source for trying out your code on mc_rtc 2.0.0, you should change the following:
- Change
enabledto your controller name - Point the src attribute of the
my-controllerderivation to your local source folder - Add
(pkgs.callPackage my-controller {})in mc-rtc plugins list
If you need extra dependencies you should add them as arguments to the derivation and in the buildInputs array.
A migration guide is provided on mc_rtc wiki
You can still visualize your controller output using your host RViZ installation:
roslaunch mc_rtc_ticker display.launchYou can also try mc_rtc-raylib within nix:
nix-shell display.nix --pureNote: If you are using an intel graphics card change nixGLNvidia to nixGLIntel in display.nix
- Enable mc_openrtm in Nix (requires Choreonoid to build in Nix first)