@@ -334,14 +334,14 @@ void Servo::setCommandType(const CommandType& command_type)
334
334
expected_command_type_ = command_type;
335
335
}
336
336
337
- KinematicState Servo::haltJoints (const std::vector<size_t >& joint_variables_to_halt ,
338
- const KinematicState& current_state, const KinematicState& target_state) const
337
+ KinematicState Servo::haltJoints (const std::vector<size_t >& joint_indices_to_halt, const KinematicState& current_state ,
338
+ const KinematicState& target_state) const
339
339
{
340
340
KinematicState bounded_state (target_state.joint_names .size ());
341
341
bounded_state.joint_names = target_state.joint_names ;
342
342
343
343
std::stringstream halting_joint_names;
344
- for (const auto idx : joint_variables_to_halt )
344
+ for (const auto idx : joint_indices_to_halt )
345
345
{
346
346
halting_joint_names << bounded_state.joint_names [idx] + " " ;
347
347
}
@@ -361,7 +361,7 @@ KinematicState Servo::haltJoints(const std::vector<size_t>& joint_variables_to_h
361
361
// Halt only the joints that are out of bounds
362
362
bounded_state.positions = target_state.positions ;
363
363
bounded_state.velocities = target_state.velocities ;
364
- for (const auto idx : joint_variables_to_halt )
364
+ for (const auto idx : joint_indices_to_halt )
365
365
{
366
366
bounded_state.positions [idx] = current_state.positions [idx];
367
367
bounded_state.velocities [idx] = 0.0 ;
@@ -534,14 +534,14 @@ KinematicState Servo::getNextJointState(const moveit::core::RobotStatePtr& robot
534
534
target_state.velocities = (target_state.positions - current_state.positions ) / servo_params_.publish_period ;
535
535
536
536
// Check if any joints are going past joint position limits.
537
- const std::vector<size_t > joint_variables_to_halt =
538
- jointVariablesToHalt (target_state.positions , target_state.velocities , joint_bounds, joint_limit_margins_);
537
+ const std::vector<size_t > joint_indices_to_halt =
538
+ jointsToHalt (target_state.positions , target_state.velocities , joint_bounds, joint_limit_margins_);
539
539
540
540
// Apply halting if any joints need to be halted.
541
- if (!joint_variables_to_halt .empty ())
541
+ if (!joint_indices_to_halt .empty ())
542
542
{
543
543
servo_status_ = StatusCode::JOINT_BOUND;
544
- target_state = haltJoints (joint_variables_to_halt , current_state, target_state);
544
+ target_state = haltJoints (joint_indices_to_halt , current_state, target_state);
545
545
}
546
546
}
547
547
0 commit comments