Skip to content

Commit

Permalink
New remove collision object service now used
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 11, 2023
1 parent 43a0d68 commit 615ae97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions armer/robots/ROSRobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ def __init__(self,

rospy.Service(
'{}/remove_collision_object'.format(self.name.lower()),
AddCollisionObject,
RemoveCollisionObject,
self.remove_collision_obj_cb
)

Expand Down Expand Up @@ -1973,7 +1973,7 @@ def add_collision_obj_cb(self, req: AddCollisionObjectRequest) -> AddCollisionOb

return AddCollisionObjectResponse(success=True)

def remove_collision_obj_cb(self, req: AddCollisionObjectRequest) -> AddCollisionObjectResponse:
def remove_collision_obj_cb(self, req: RemoveCollisionObjectRequest) -> RemoveCollisionObjectResponse:
"""
This will take a given key and (if it exists) and removes said key object as a collision shape
NOTE: currently expects the following
Expand All @@ -1982,7 +1982,7 @@ def remove_collision_obj_cb(self, req: AddCollisionObjectRequest) -> AddCollisio
# Handle early termination on input error for name and type
if req.name == None or req.name == '':
rospy.logerr(f"[REMOVE COLLISION OBJ CB] -> Remove collision object service input error: name [{req.name}] | type [{req.type}]")
return AddCollisionObjectResponse(success=False)
return RemoveCollisionObjectResponse(success=False)

if req.name in self.collision_dict.keys():
# Stage Backend to Remove Object
Expand All @@ -2000,7 +2000,7 @@ def remove_collision_obj_cb(self, req: AddCollisionObjectRequest) -> AddCollisio
self.interactive_marker_server.erase(name=req.name)
self.interactive_marker_server.applyChanges()

return AddCollisionObjectResponse(success=True)
return RemoveCollisionObjectResponse(success=True)
else:
rospy.logerr(f"[REMOVE COLLISION OBJ CB] -> Unknown name [{req.name}] requested; not in collision dictionary")

Expand Down

0 comments on commit 615ae97

Please sign in to comment.