pollen-robotics / reachy2-sdk

Reachy 2 Python SDK
https://www.pollen-robotics.com
Apache License 2.0
5 stars 0 forks source link

393 add translate by and rotate by to mobile base #394

Closed glannuzel closed 1 month ago

glannuzel commented 2 months ago

Add new functions reachy.mobile_base.translate_by(x, y) and reachy.mobile_base.rotate_by(x, y).

No test has been added as the mobile base movements are not simulated so far.

:warning: WARNING : Not tested on the robot so far

github-actions[bot] commented 2 months ago

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
897 826 92% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
tests/units/online/test_advanced_goto_functions.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 9cdec50 by action🐍

ClaireHzl commented 2 months ago

translate_by works perfectly on the real robot ! But rotate_by doesn't work well, because reachy.mobile_base.odometry['theta'] is always = 0

glannuzel commented 1 month ago

Waiting for PR https://github.com/pollen-robotics/reachy2_sdk_server/pull/176 to be merged on SDK server

glannuzel commented 1 month ago

https://github.com/pollen-robotics/reachy2_sdk_server/pull/176 has been merged!

ClaireHzl commented 1 month ago

Works fine on the robot but maybe the tolerance is too high on the orientation ? image

For the translate_by, it's always in the initial frame of the robot. So if you did a rotate_by(90) then a translate_by(x = 0.2, y =0), the robot will translate to the right and not front.