Skip to content

Commit 7b58966

Browse files
davetcolemanrhaschke
authored andcommitted
Remove #attempts from setFromIK (#43)
1 parent b8e40d0 commit 7b58966

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/imarker_end_effector.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ void IMarkerEndEffector::iMarkerCallback(const visualization_msgs::InteractiveMa
136136
void IMarkerEndEffector::solveIK(Eigen::Isometry3d& pose)
137137
{
138138
// Cartesian settings
139-
const std::size_t attempts = 2;
140139
const double timeout = 1.0 / 30.0; // 30 fps
141140

142141
// Optionally collision check
@@ -151,7 +150,7 @@ void IMarkerEndEffector::solveIK(Eigen::Isometry3d& pose)
151150
}
152151

153152
// Attempt to set robot to new pose
154-
if (imarker_state_->setFromIK(arm_data_.jmg_, pose, arm_data_.ee_link_->getName(), attempts, timeout, constraint_fn))
153+
if (imarker_state_->setFromIK(arm_data_.jmg_, pose, arm_data_.ee_link_->getName(), timeout, constraint_fn))
155154
{
156155
imarker_state_->update();
157156
// if (psm_->getPlanningScene()->isStateValid(*imarker_state_))

src/imarker_robot_state.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ bool IMarkerRobotState::setFromPoses(const EigenSTL::vector_Isometry3d poses,
281281

282282
// ROS_DEBUG_STREAM_NAMED(name_, "First pose should be for joint model group: " << arm_datas_[0].ee_link_->getName());
283283

284-
const std::size_t attempts = 10;
285284
const double timeout = 1.0 / 30.0; // 30 fps
286285

287286
// Optionally collision check
@@ -303,7 +302,7 @@ bool IMarkerRobotState::setFromPoses(const EigenSTL::vector_Isometry3d poses,
303302
std::size_t outer_attempts = 20;
304303
for (std::size_t i = 0; i < outer_attempts; ++i)
305304
{
306-
if (!imarker_state_->setFromIK(group, poses, tips, attempts, timeout, constraint_fn))
305+
if (!imarker_state_->setFromIK(group, poses, tips, timeout, constraint_fn))
307306
{
308307
ROS_DEBUG_STREAM_NAMED(name_, "Failed to find dual arm pose, trying again");
309308

0 commit comments

Comments
 (0)