Skip to content

Commit

Permalink
Lock memory by defult on a realtime system setup
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Nov 28, 2024
1 parent 73fe227 commit 02b9dd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controller_manager/src/ros2_control_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ int main(int argc, char ** argv)

const bool use_sim_time = cm->get_parameter_or("use_sim_time", false);

const bool lock_memory = cm->get_parameter_or<bool>("lock_memory", false);
const bool has_realtime = realtime_tools::has_realtime_kernel();
const bool lock_memory = cm->get_parameter_or<bool>("lock_memory", has_realtime);
std::string message;
if (lock_memory && !realtime_tools::lock_memory(message))
{
Expand Down

0 comments on commit 02b9dd5

Please sign in to comment.