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; }