expose the projectors and shared geometry to Python - #11
Open
zeerekahmad wants to merge 1 commit into
Open
Conversation
Binds Pose2D, Point2D, AxleReference, rectangle_footprint and transform_footprint, plus all three projectors and their projected-state structs. Footprint is std::vector<Point2D>, which pybind11/stl.h renders as a plain list of Point2D; the package aliases it so annotations can name the concept. Removes Twist2D, normalize_angle and transform_pose from the Python package. They were leftovers from when Pose2D was a Python shim, and are superseded by the bound C++ Pose2D and normalizeAngle. ament_add_pytest_test now names test_python_bindings.py explicitly rather than the test directory, so adding a pytest suite doesn't silently join this target, and runs it from the source directory. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: expose the projectors and shared geometry to Python
zeerekahmad/kinematics-python-bindingszeerekahmad/kinematics-dual-build1c96c08Description
Brings the new C++ API to Python.
Pose2D,Point2D,AxleReference,rectangle_footprintandtransform_footprint, plus all threeprojectors and their projected-state structs.
Footprintisstd::vector<Point2D>, whichpybind11/stl.hrenders as a plain list of
Point2D; the package aliases it so annotations can name the concept.Twist2D,normalize_angleandtransform_posefrom the Python package. They were leftoversfrom when
Pose2Dwas a Python shim, and are superseded by the bound C++Pose2DandnormalizeAngle.ament_add_pytest_testnow namestest_python_bindings.pyexplicitly rather than the test directory, soadding a pytest suite doesn't silently join this target, and runs it from the source directory.
Migration Guide
Breaking for Python callers of the removed shims:
from polymath_kinematics import Twist2Dwith the bound C++ types — construct the body commanddirectly from the model/projector API (
linear_velocity_m_s,angular_velocity_rad_s).normalize_angle(theta)with the boundnormalize_anglefrom the C++normalizeAngle.transform_pose(...)withPose2Dandtransform_footprint(...).No C++ callers are affected.
Related issues
Completeness checklist
Stack created with GitHub Stacks CLI • Give Feedback 💬