@@ -284,16 +284,16 @@ bool plan_execution::PlanExecution::isRemainingPathValid(const ExecutableMotionP
284
284
req.group_name = t.getGroupName ();
285
285
req.pad_environment_collisions = false ;
286
286
moveit::core::RobotState state = plan.planning_scene ->getCurrentState ();
287
- std::map<std::string, const moveit::core::AttachedBody*> current_attached_objects, sample_attached_object ;
287
+ std::map<std::string, const moveit::core::AttachedBody*> current_attached_objects, sample_attached_objects ;
288
288
state.getAttachedBodies (current_attached_objects);
289
289
for (std::size_t i = std::max (path_segment.second - 1 , 0 ); i < wpc; ++i)
290
290
{
291
291
state = t.getWayPoint (i);
292
292
collision_detection::CollisionResult res;
293
- state.getAttachedBodies (sample_attached_object );
293
+ state.getAttachedBodies (sample_attached_objects );
294
294
295
295
// If sample state has attached objects that are not in the current state, remove them from the sample state
296
- for (const auto & [name, object] : sample_attached_object )
296
+ for (const auto & [name, object] : sample_attached_objects )
297
297
{
298
298
if (current_attached_objects.find (name) == current_attached_objects.end ())
299
299
{
@@ -305,7 +305,7 @@ bool plan_execution::PlanExecution::isRemainingPathValid(const ExecutableMotionP
305
305
// If current state has attached objects that are not in the sample state, add them to the sample state
306
306
for (const auto & [name, object] : current_attached_objects)
307
307
{
308
- if (sample_attached_object .find (name) == sample_attached_object .end ())
308
+ if (sample_attached_objects .find (name) == sample_attached_objects .end ())
309
309
{
310
310
RCLCPP_DEBUG (logger_, " Attached object '%s' is not in the robot state. Adding it." , name.c_str ());
311
311
state.attachBody (std::make_unique<moveit::core::AttachedBody>(*object));
0 commit comments