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

186 create reachyhome #197

Merged
merged 9 commits into from
Jan 30, 2024
Merged

186 create reachyhome #197

merged 9 commits into from
Jan 30, 2024

Conversation

glannuzel
Copy link
Member

Add a function reachy.home() to reset all joints to 0.

@glannuzel glannuzel linked an issue Jan 25, 2024 that may be closed by this pull request
@glannuzel glannuzel self-assigned this Jan 25, 2024
Copy link

github-actions bot commented Jan 25, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1768 1238 70% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/reachy2_sdk/arm.py 54% 🟢
src/reachy2_sdk/reachy_sdk.py 39% 🟢
tests/test_advanced_goto_functions.py 100% 🟢
TOTAL 64% 🟢

updated for commit: 6e59633 by action🐍

Copy link
Contributor

@FabienDanieau FabienDanieau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works but I'd double check last results of the test

assert np.isclose(
Quaternion.distance(reachy_sdk_zeroed.head.get_orientation(), zero_head), 0, atol=1e-03
) # why not 1e-04 here?
assert np.allclose(reachy_sdk_zeroed.r_arm.get_joints_positions(), zero_arm, atol=1e-01)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. precision is very low compare to above (in my tests)

assert reachy_sdk_zeroed.get_goto_state(req_r).goal_status == GoalStatus.STATUS_SUCCEEDED
assert reachy_sdk_zeroed.get_goto_state(req_l).goal_status == GoalStatus.STATUS_SUCCEEDED
assert np.isclose(Quaternion.distance(reachy_sdk_zeroed.head.get_orientation(), zero_head), 0, atol=1e-04)
assert np.allclose(reachy_sdk_zeroed.r_arm.get_joints_positions(), zero_arm, atol=1e-01)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

atol=1e-01 is low. It actually works without atol (= default high precision) which is better

@glannuzel glannuzel merged commit dfd0f5b into develop Jan 30, 2024
5 checks passed
@glannuzel glannuzel deleted the 186-create-reachyhome branch January 30, 2024 09:38
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create reachy.home()
2 participants