Skip to content

Commit

Permalink
Fix loop_time
Browse files Browse the repository at this point in the history
  • Loading branch information
anasarrak committed Jun 13, 2019
1 parent 082b80f commit a527755
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ int PR2ArmIKSolver::cartToJntSearch(const KDL::JntArray& q_in, const KDL::Frame&
double initial_guess = q_init(free_angle_);

rclcpp::Time start_time = rclcpp::Clock().now();
rclcpp::Time time;
double loop_time = 0;
int count = 0;

Expand All @@ -193,8 +192,7 @@ int PR2ArmIKSolver::cartToJntSearch(const KDL::JntArray& q_in, const KDL::Frame&
q_init(free_angle_) = initial_guess + search_discretization_angle_ * count;
if (verbose)
RCLCPP_WARN(LOGGER_PR2_ARM_KINEMATICS_PLUGIN, "%d, %f", count, q_init(free_angle_));
time = rclcpp::Clock().now();
loop_time = time.seconds() - start_time.seconds();
loop_time = rclcpp::Clock().now().seconds() - start_time.seconds();
}
if (loop_time >= timeout)
{
Expand Down

0 comments on commit a527755

Please sign in to comment.