diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index da1270e..a285e97 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,9 @@ "dockerfile": "../Dockerfile" }, "runArgs": [ - "--privileged" // for real-time access + "--privileged", // for real-time access + "--cap-add=sys_nice", + "--ulimit", "rtprio=99" // for real-time access ], // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/colcon_defaults.yaml b/colcon_defaults.yaml index 72df3fd..a371b8c 100755 --- a/colcon_defaults.yaml +++ b/colcon_defaults.yaml @@ -1,6 +1,6 @@ { "build":{ - # "symlink-install": true, + "symlink-install": true, "cmake-args": [ "-DCMAKE_BUILD_TYPE=RelWithDebInfo", "-DCMAKE_EXPORT_COMPILE_COMMANDS=True", diff --git a/src/casestudy/src/casestudy_example.cpp b/src/casestudy/src/casestudy_example.cpp index 257a448..ca9ac06 100644 --- a/src/casestudy/src/casestudy_example.cpp +++ b/src/casestudy/src/casestudy_example.cpp @@ -43,7 +43,12 @@ void run_one_executor( << ": " << strerror(errno) << std::endl; std::cerr << "This operation requires root privileges. Please run the program with sufficient permissions." << std::endl; +#ifndef WIN_DOCKER_IS_BROKEN exit(EXIT_FAILURE); +#else + // Windows Docker workaround: just print the error and continue + std::cerr << "Continuing without setting scheduler, fuck Windows" << std::endl; +#endif } // Set the process name to "ros_experiment" for easier identification during debugging or system monitoring.