Skip to content
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

[PN-68] Refactor _robot_command_goal_complete #167

Merged
merged 31 commits into from
Dec 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2f58b5a
added beginning of test
abaker-bdai Sep 13, 2023
c79e43c
Added test cases for method
abaker-bdai Oct 19, 2023
0f9913a
refactor _robot_command_goal_complete
abaker-bdai Oct 19, 2023
c33b9e2
no pattern matching
abaker-bdai Oct 20, 2023
b55de91
tiny comment change
abaker-bdai Oct 20, 2023
b3a2697
removed a random comment
abaker-bdai Oct 20, 2023
37f917c
refactor tests
abaker-bdai Oct 23, 2023
e19b97b
fix test issues
abaker-bdai Oct 23, 2023
e3b12e9
revert test to pre-refactor state
abaker-bdai Oct 23, 2023
1ab3556
fix imports
abaker-bdai Oct 23, 2023
1c20fe2
fix rebase mistakes
abaker-bdai Oct 23, 2023
14a126b
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Oct 24, 2023
2bbe303
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Oct 25, 2023
b33dbee
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 1, 2023
ad3613f
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 1, 2023
6c5f74e
[PN-68] Add missing failure conditions and update unit test (#179)
abaker-bdai Nov 7, 2023
08047f7
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 7, 2023
81a52b9
pre-commit
abaker-bdai Nov 7, 2023
958d445
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 9, 2023
073001e
Now returning GoalResponse.SUCCESS
abaker-bdai Nov 9, 2023
cb0e9c8
Added test annotations for better identification
abaker-bdai Nov 9, 2023
c8d2313
Merge branch 'abaker/PN-68-refactor-_robot_command_goal_complete' of …
abaker-bdai Nov 9, 2023
9ed93ad
fixed logic
abaker-bdai Nov 9, 2023
ecc9ca6
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 13, 2023
fc1d197
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Nov 16, 2023
e988445
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Dec 4, 2023
6e5ef9a
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Dec 4, 2023
3910fe2
Add logic for Arm Impedance feedback statuses (#204)
abaker-bdai Dec 5, 2023
2de5576
Merge branch 'main' into abaker/PN-68-refactor-_robot_command_goal_co…
abaker-bdai Dec 5, 2023
7f1ff66
robot command feedback better documented
abaker-bdai Dec 14, 2023
9e8ff97
add comment
abaker-bdai Dec 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added beginning of test
abaker-bdai committed Oct 23, 2023
commit 2f58b5a744ad174d3a48bd2cadb984a4b3551f82
13 changes: 13 additions & 0 deletions spot_driver/test/test_spot_driver.py
Original file line number Diff line number Diff line change
@@ -3,9 +3,11 @@

import bdai_ros2_wrappers.scope as ros_scope
import rclpy
from bosdyn_msgs.msg import RobotCommandFeedback
from std_srvs.srv import Trigger

import spot_driver.spot_ros2
from spot_driver.spot_ros2 import GoalResponse
from spot_msgs.srv import ( # type: ignore
Dock,
)
@@ -65,6 +67,17 @@ def test_wrapped_commands(self) -> None:
resp = self.dock_client.call(Dock.Request())
self.assertEqual(resp.success, True)

def test_robot_command_goal_complete(self) -> None:
self.assertEqual(self.spot_ros2._robot_command_goal_complete(None), GoalResponse.IN_PROGRESS)

feedback = RobotCommandFeedback()

# Testing FullBodyFeedback
feedback.command.command_choice = feedback.command.COMMAND_FULL_BODY_FEEDBACK_SET

feedback.command.full_body_feedback.status.value = feedback.command.full_body_feedback.status.STATUS_UNKNOWN
self.assertEqual(self.spot_ros2._robot_command_goal_complete(feedback), GoalResponse.IN_PROGRESS)


if __name__ == "__main__":
unittest.main()