Repository navigation
Remove of collision Object when attaching it with apply planning scene service - #148
Conversation
| robot_state::robotStateMsgToRobotState(*ftf_, state, *kstate_); | ||
| robot_state::robotStateMsgToRobotState(*ftf_, state_no_attached, *kstate_); | ||
|
|
||
| // we add object types to the planning scene, if any are specified |
There was a problem hiding this comment.
can you replace this comment with a new one?
There was a problem hiding this comment.
the comment explained the old patch.
The new code calls processAttachedCollisionObjectMsg and does not add types here anymore.
The new loop is pretty much self-explaining imho.
There was a problem hiding this comment.
ok. but in general i think we need more comments, not less
|
First of all, I helped writing this patch. So +1 (after the comment I asked for has been added).
The patch proposes to pass in a robot state without attached bodies to |
|
I think @rhaschke should take a look - you guys understand the intricacies of the PSM better than me |
…e service This is part of the issue moveit#103. The current state is that the collision object will be removed from the planning scene when attaching it to the robot with the asynchronous attachObject function of the move_group_interface. So we want the same behavior with the synchronous apply planning scene service. To reach this we need to call the processAttachedCollisionObjectMsg, the same function as in attachObject, to attach the object to the robot and not in the robotStateMsgsToRobotState, because we can't get access to the collision objects in the robot state. Therefore we give this method a scene without the attached objects and attach them with the process funcion afterwards. In this effect we add a error message for the case that the roboState is_diff is false and someone uses a different operation than ADD.
This case happens if the robotState is_diff is not set and the object should be removed. In this case all attached objects are not considered anyway so nothing happens, but there should be a error message.
cc23e75 to
e4b8209
Compare
|
Cherry-picked to J/K. |
This is part of the issue #103.
The current state is that the collision object will be removed from the planning scene when attaching
it to the robot with the asynchronous attachObject function of the move_group_interface.
So we want the same behavior with the synchronous apply planning scene service.
In this effect we added two error messages for the case that the roboState is_diff is not set.