Skip to content

Commit

Permalink
Use explicit assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Apr 8, 2024
1 parent 74556d5 commit 28e943f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gazebo_ros2_control/src/gazebo_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ControlMethod_>(VELOCITY & EFFORT);
this->dataPtr->joint_control_methods_[mimic_joint.joint_index] |= POSITION;
this->dataPtr->joint_control_methods_[mimic_joint.joint_index] =
static_cast<ControlMethod>(POSITION);
}
return hardware_interface::return_type::OK;
}
Expand Down

0 comments on commit 28e943f

Please sign in to comment.