Add pybindings for VolumetricGridLookupField#657
Add pybindings for VolumetricGridLookupField#657gokulp01 wants to merge 6 commits intogazebosim:gz-math8from
Conversation
Signed-off-by: gokulp01 <gokulgns@gmail.com>
Signed-off-by: gokulp01 <gokulgns@gmail.com>
Signed-off-by: gokulp01 <gokulgns@gmail.com>
Signed-off-by: gokulp01 <gokulgns@gmail.com>
|
Hi @scpeters / @adityapande-1995 / @ahcorde, just wanted to follow up on this (: If there’s anything more needed from my end, I’d be happy to address it! Thanks for your time and guidance. |
Signed-off-by: gokulp01 <gokulgns@gmail.com>
|
Hi @ahcorde thank you for the review! I’ve addressed your feedback. Let me know if there’s anything else to update. Thanks! |
| using Class = gz::math::VolumetricGridLookupField<T, I>; | ||
| using Vector3Type = gz::math::Vector3<T>; | ||
|
|
||
| auto toString = [](const Class &si) { |
|
|
||
| auto toString = [](const Class &si) { | ||
| std::stringstream stream; | ||
| stream << "VolumetricGridLookupField"; |
There was a problem hiding this comment.
| stream << "VolumetricGridLookupField"; | |
| stream << si; |
There was a problem hiding this comment.
this doesn't work because VolumetricGridLookupField doesn't overload the << operator
There was a problem hiding this comment.
from a brief inspection, classes that don't overload << also don't define a python method for __str__, so I think you could omit it for VolumetricGridLookupField
example:
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Signed-off-by: Gokul <43350089+gokulp01@users.noreply.github.com>
|
Hi @gokulp01, there are some review comments that are still not addressed. Do you think you'll have time to get to them before the Jetty code freeze (see https://discourse.openrobotics.org/t/feature-freeze-for-gazebo-jetty/48187/3?u=azeey) |
|
Hi @azeey sorry, I had been v caught up--I will wrap it up ASAP! |
|
@gokulp01 we've had a change of policy regarding the feature/code freeze. I suggest targetting |
🎉 New feature
Closes #477
Summary
This pull request adds Python bindings for
VolumetricGridLookupField, enabling its usage in Python.Changes:
CMakeLists.txtto build the new Python bindingsInterpolationPointpybindings, which are dependencies forVolumetricGridLookupFieldVolumetricGridLookupFieldDetails:
src/python_pybind11/CMakeLists.txt: Modified to include new files in the buildsrc/python_pybind11/src/_gz_math_pybind11.cc: Updated to include headers for the bindingssrc/python_pybind11/src/InterpolationPoint.ccand.hh: Provide pybindings forInterpolationPointsrc/python_pybind11/src/VolumetricGridLookupField.ccand.hh: Implement pybindings forVolumetricGridLookupFieldsrc/python_pybind11/test/VolumetricGridLookupField_TEST.py: Test file for validating the functionalityTest it
Build the project and test the bindings with
Expected Result:
VolumetricGridLookupFieldbindings should function correctly in Python.Checklist
codecheckpassed (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-bymessages.