-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SW-822] Spot Driver without gripper #430
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d22402a
added gripperless parameter to define if the arm is missing a gripper…
tcappellari-bdai f252bad
added gripperless paramet4er to example yaml
tcappellari-bdai 4d4aa2a
typo
tcappellari-bdai 9228de0
Merge branch 'main' into tcap/gripperless_driver
tcappellari-bdai d5a5c3f
Merge branch 'main' into tcap/gripperless_driver
tcappellari-bdai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,6 +248,8 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
self.declare_parameter("spot_name", "") | ||
self.declare_parameter("mock_enable", False) | ||
|
||
self.declare_parameter("gripperless", False) | ||
|
||
# When we send very long trajectories to Spot, we create batches of | ||
# given size. If we do not batch a long trajectory, Spot will reject it. | ||
self.declare_parameter(self.TRAJECTORY_BATCH_SIZE_PARAM, 100) | ||
|
@@ -287,6 +289,8 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
self.graph_nav_seed_frame: str = self.get_parameter("graph_nav_seed_frame").value | ||
self.initialize_spot_cam: bool = self.get_parameter("initialize_spot_cam").value | ||
|
||
self.gripperless: bool = self.get_parameter("gripperless").value | ||
|
||
self._wait_for_goal: Optional[WaitForGoal] = None | ||
self.goal_handle: Optional[ServerGoalHandle] = None | ||
|
||
|
@@ -412,6 +416,7 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
port=self.port, | ||
logger=self.cam_logger, | ||
cert_resource_glob=self.certificate, | ||
gripperless=self.gripperless, | ||
) | ||
except SystemError: | ||
self.spot_cam_wrapper = None | ||
|
@@ -428,7 +433,7 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
has_arm = self.mock_has_arm | ||
if self.spot_wrapper is not None: | ||
has_arm = self.spot_wrapper.has_arm() | ||
if has_arm: | ||
if has_arm and not self.gripperless: | ||
all_cameras.append("hand") | ||
self.declare_parameter("cameras_used", all_cameras) | ||
self.cameras_used = self.get_parameter("cameras_used") | ||
|
@@ -564,22 +569,23 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
callback_group=self.group, | ||
) | ||
|
||
self.create_service( | ||
Trigger, | ||
"open_gripper", | ||
lambda request, response: self.service_wrapper( | ||
"open_gripper", self.handle_open_gripper, request, response | ||
), | ||
callback_group=self.group, | ||
) | ||
self.create_service( | ||
Trigger, | ||
"close_gripper", | ||
lambda request, response: self.service_wrapper( | ||
"close_gripper", self.handle_close_gripper, request, response | ||
), | ||
callback_group=self.group, | ||
) | ||
if not self.gripperless: | ||
self.create_service( | ||
Trigger, | ||
"open_gripper", | ||
lambda request, response: self.service_wrapper( | ||
"open_gripper", self.handle_open_gripper, request, response | ||
), | ||
callback_group=self.group, | ||
) | ||
self.create_service( | ||
Trigger, | ||
"close_gripper", | ||
lambda request, response: self.service_wrapper( | ||
"close_gripper", self.handle_close_gripper, request, response | ||
), | ||
callback_group=self.group, | ||
) | ||
|
||
self.create_service( | ||
SetBool, | ||
|
@@ -861,7 +867,7 @@ def __init__(self, parameter_list: Optional[typing.List[Parameter]] = None, **kw | |
self.handle_graph_nav_set_localization, | ||
callback_group=self.group, | ||
) | ||
if has_arm: | ||
if has_arm and self.gripperless: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tcappellari-bdai shouldn't this be |
||
self.create_service( | ||
GetGripperCameraParameters, | ||
"get_gripper_camera_parameters", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this param is not used at all in this node and can be completely deleted (it's all in C++ now)