Skip to content

Commit

Permalink
Merge branch 'humble' into mergify/bp/humble/pr-1852
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Nov 5, 2024
2 parents fee70a4 + 4a3daec commit bd05a97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions controller_manager/src/ros2_control_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ int main(int argc, char ** argv)
RCLCPP_WARN(
cm->get_logger(), "Unable to set the CPU affinity : '%s'", affinity_result.second.c_str());
}

const bool lock_memory = cm->get_parameter_or<bool>("lock_memory", true);
std::string message;
if (lock_memory && !realtime_tools::lock_memory(message))
{
RCLCPP_WARN(cm->get_logger(), "Unable to lock the memory : '%s'", message.c_str());
}

RCLCPP_INFO(cm->get_logger(), "update rate is %d Hz", cm->get_update_rate());
Expand Down
4 changes: 1 addition & 3 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ controller_manager
******************

* The ``ros2_control_node`` node now accepts the ``thread_priority`` parameter to set the scheduler priority of the controller_manager's RT thread (`#1820 <https://github.com/ros-controls/ros2_control/pull/1820>`_).
<<<<<<< HEAD
* Added support for the wildcard entries for the controller configuration files (`#1724 <https://github.com/ros-controls/ros2_control/pull/1724>`_).
=======
* The ``ros2_control_node`` node has a new ``lock_memory`` parameter to lock memory at startup to physical RAM in order to avoid page faults (`#1822 <https://github.com/ros-controls/ros2_control/pull/1822>`_).
* The ``ros2_control_node`` node has a new ``cpu_affinity`` parameter to bind the process to a specific CPU core. By default, this is not enabled. (`#1852 <https://github.com/ros-controls/ros2_control/pull/1852>`_).

Expand Down Expand Up @@ -89,4 +87,4 @@ ros2controlcli
.. code-block:: bash
ros2 control <verb> <arguments> --ros-args -r __ns:=<namespace>
>>>>>>> 98f0795 ([ros2_control_node] Add option to set the CPU affinity (#1852))

0 comments on commit bd05a97

Please sign in to comment.