Tried to make windows docker behave, failed, added code

access using: `colcon build --cmake-args -DCMAKE_CXX_FLAGS="-DWIN_DOCKER_IS_BROKEN"`
This commit is contained in:
Niklas Halle 2025-04-02 13:17:53 +02:00
parent abf3496c78
commit 98cc5a6a3f
3 changed files with 9 additions and 2 deletions

View file

@ -9,7 +9,9 @@
"dockerfile": "../Dockerfile" "dockerfile": "../Dockerfile"
}, },
"runArgs": [ "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 to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},

View file

@ -1,6 +1,6 @@
{ {
"build":{ "build":{
# "symlink-install": true, "symlink-install": true,
"cmake-args": [ "cmake-args": [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo", "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=True", "-DCMAKE_EXPORT_COMPILE_COMMANDS=True",

View file

@ -43,7 +43,12 @@ void run_one_executor(
<< ": " << strerror(errno) << std::endl; << ": " << strerror(errno) << std::endl;
std::cerr << "This operation requires root privileges. Please run the program with sufficient permissions." std::cerr << "This operation requires root privileges. Please run the program with sufficient permissions."
<< std::endl; << std::endl;
#ifndef WIN_DOCKER_IS_BROKEN
exit(EXIT_FAILURE); 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. // Set the process name to "ros_experiment" for easier identification during debugging or system monitoring.