From 28e943f4a65800847847b054bd8cc5f13454e075 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Mon, 8 Apr 2024 16:43:40 +0000 Subject: [PATCH] Use explicit assignment --- gazebo_ros2_control/src/gazebo_system.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gazebo_ros2_control/src/gazebo_system.cpp b/gazebo_ros2_control/src/gazebo_system.cpp index bd943f79..1a573cab 100644 --- a/gazebo_ros2_control/src/gazebo_system.cpp +++ b/gazebo_ros2_control/src/gazebo_system.cpp @@ -536,9 +536,8 @@ GazeboSystem::perform_command_mode_switch( // mimic joint has always position control mode for (const auto & mimic_joint : this->info_.mimic_joints) { - this->dataPtr->joint_control_methods_[mimic_joint.joint_index] &= - static_cast(VELOCITY & EFFORT); - this->dataPtr->joint_control_methods_[mimic_joint.joint_index] |= POSITION; + this->dataPtr->joint_control_methods_[mimic_joint.joint_index] = + static_cast(POSITION); } return hardware_interface::return_type::OK; }