@@ -59,18 +59,6 @@ bool isStateValid(const planning_scene::PlanningScene* planning_scene, bool verb
59
59
robot_state->setJointGroupPositions (group, ik_solution);
60
60
robot_state->update ();
61
61
62
- #if 0 // Ensure there are objects in the planning scene
63
- const std::size_t num_collision_objects = planning_scene->getCollisionEnv()->getWorld()->size();
64
- if (num_collision_objects == 0)
65
- {
66
- RCLCPP_ERROR(LOGGER, "No collision objects exist in world, you need at least a table "
67
- "modeled for the controller to work");
68
- RCLCPP_ERROR(LOGGER, "To fix this, relaunch the teleop/head tracking/whatever MoveIt "
69
- "node to publish the collision objects");
70
- return false;
71
- }
72
- #endif
73
-
74
62
if (!planning_scene)
75
63
{
76
64
RCLCPP_ERROR (LOGGER, " No planning scene provided" );
@@ -163,7 +151,6 @@ void IMarkerEndEffector::iMarkerCallback(
163
151
164
152
// Only allow one feedback to be processed at a time
165
153
{
166
- // boost::unique_lock<boost::mutex> scoped_lock(imarker_mutex_);
167
154
if (!imarker_ready_to_process_)
168
155
{
169
156
return ;
@@ -183,10 +170,7 @@ void IMarkerEndEffector::iMarkerCallback(
183
170
imarker_callback_ (feedback, robot_ee_pose);
184
171
185
172
// Allow next feedback to be processed
186
- {
187
- // boost::unique_lock<boost::mutex> scoped_lock(imarker_mutex_);
188
- imarker_ready_to_process_ = true ;
189
- }
173
+ imarker_ready_to_process_ = true ;
190
174
}
191
175
192
176
void IMarkerEndEffector::solveIK (Eigen::Isometry3d& pose)
@@ -210,16 +194,7 @@ void IMarkerEndEffector::solveIK(Eigen::Isometry3d& pose)
210
194
if (imarker_state_->setFromIK (arm_data_.jmg_ , pose, arm_data_.ee_link_ ->getName (), timeout, constraint_fn))
211
195
{
212
196
imarker_state_->update ();
213
- // if (psm_->getPlanningScene()->isStateValid(*imarker_state_))
214
- // {
215
- // ROS_INFO_STREAM_NAMED(name_, "Solved IK");
216
197
imarker_parent_->publishRobotState ();
217
- // }
218
- // else
219
- // {
220
- // visual_tools_->publishRobotState(imarker_state_, rviz_visual_tools::RED);
221
- // exit(0);
222
- // }
223
198
}
224
199
}
225
200
@@ -235,7 +210,6 @@ void IMarkerEndEffector::initializeInteractiveMarkers()
235
210
void IMarkerEndEffector::updateIMarkerPose (const Eigen::Isometry3d& /* pose*/ )
236
211
{
237
212
// Move marker to tip of fingers
238
- // imarker_pose_ = pose * imarker_offset_.inverse();
239
213
sendUpdatedIMarkerPose ();
240
214
}
241
215
@@ -255,15 +229,7 @@ void IMarkerEndEffector::make6DofMarker(const geometry_msgs::msg::Pose& pose)
255
229
int_marker_.header .frame_id = " world" ;
256
230
int_marker_.pose = pose;
257
231
int_marker_.scale = 0.2 ;
258
-
259
232
int_marker_.name = name_;
260
- // int_marker_.description = "imarker_" + name_; // TODO: unsure, but I think this causes a caption in Rviz that I
261
- // don't want
262
-
263
- // insert a box
264
- // makeBoxControl(int_marker_);
265
-
266
- // int_marker_.controls[0].interaction_mode = InteractiveMarkerControl::MENU;
267
233
268
234
InteractiveMarkerControl control;
269
235
control.orientation .w = 1 ;
@@ -301,7 +267,6 @@ void IMarkerEndEffector::make6DofMarker(const geometry_msgs::msg::Pose& pose)
301
267
302
268
imarker_server_->insert (int_marker_, std::bind (&IMarkerEndEffector::iMarkerCallback, this , std::placeholders::_1));
303
269
304
- // menu_handler_.apply(*imarker_server_, int_marker_.name);
305
270
}
306
271
307
272
visualization_msgs::msg::InteractiveMarkerControl&
0 commit comments