-
Notifications
You must be signed in to change notification settings - Fork 69
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
Added MecanumDriveOdometry Python wrapper #549
Conversation
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ign-math6 #549 +/- ##
==========================================
Coverage 99.38% 99.38%
==========================================
Files 75 75
Lines 7029 7029
==========================================
Hits 6986 6986
Misses 43 43 ☔ View full report in Codecov by Sentry. |
Is it okay if we wait till after Harmonic for this? |
this is targeting Fortress, but we can wait no problem |
I understand, but I think we should focus our review efforts on |
friendly ping @azeey @scpeters or @adityapande-1995 |
std::string pyclass_name = typestr; | ||
py::class_<Class>(m, | ||
pyclass_name.c_str(), | ||
py::buffer_protocol(), |
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.
Do we need py::buffer_protocol
here? If so, doesn't it require implementing def_buffer
(https://pybind11.readthedocs.io/en/stable/advanced/pycpp/numpy.html)
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 don't think this has been addressed
# Setup the wheel parameters, and initialize | ||
odom.set_wheel_params(wheelSeparation, wheelRadius, wheelRadius,wheelRadius) | ||
startTime = datetime.datetime.now() | ||
odom.init(datetime.timedelta()) |
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.
Should this use startTime
?
Angle(1.0 * math.pi / 180), | ||
Angle(1.0 * math.pi / 180), | ||
Angle(1.0 * math.pi / 180), | ||
time1 - startTime) |
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.
The C++ version uses just time1
here.
Angle(2.0 * math.pi / 180), | ||
Angle(2.0 * math.pi / 180), | ||
Angle(2.0 * math.pi / 180), | ||
time2 - startTime) |
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.
This is also different from the C++ test
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.
Looks good overall. Just a few issues with pybind11 options and differences with the C++ test
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.
Looks good overall. Just a few issues with pybind11 options and differences with the C++ test
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
…mDriveOdometry_pytohn
@azeey Time is a little bit different in Python, you can take a look the |
friendly ping @azeey |
1 similar comment
friendly ping @azeey |
So from the pybind11 docs, it looks like |
@osrf-jenkins run tests |
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@azeey I added your feedback |
Thanks. I think now the test can be updated to match the C++ version. Specifically, |
…mDriveOdometry_pytohn
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@azeey Included feedback |
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
🎉 New feature
Closes #548
Summary
Added MecanumDriveOdometry
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.