-
Notifications
You must be signed in to change notification settings - Fork 418
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
PyKDL: PyBind11 based #229
Conversation
This prevents docstrings like: __init__(self: PyKDL.Segment, name: unicode, joint: PyKDL.Joint = NoName:[None, axis: [ 0, 0, 0], origin[ 0, 0, 0]], f_tip: PyKDL.Frame = [[ 1, 0, 0; 0, 1, 0; 0, 0, 1] [ 0, 0, 0]], I: PyKDL.RigidBodyInertia = <PyKDL.RigidBodyInertia object at 0x7f78c1d9fc38>) -> None Instead the docstring looks like: __init__(self: PyKDL.Segment, name: unicode, joint: PyKDL.Joint = Joint(), f_tip: PyKDL.Frame = Frame.Identity(), I: PyKDL.RigidBodyInertia = RigidBodyInertia.Zero()) -> None
…nctions This prevents any cpp scoping in docstrings
This reverts commit 3c9f22d.
This reverts commit 9968bcb.
@MatthijsBurgh , thanks a lot for all you effort. I'll add you as an extra maintainer so you can move on with merging and releasing your stuff. Both me and @meyerj are quite busy with other stuff, so adding a maintainer makes total sense to me. |
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.
If this entire PR gets merged as is we'll break the API due to the Joint::None
--> Joint::Fixed
change, this means we effectively need to create a new major number release since we are following the semantic versioning here, which seems a pitty for such a minor API breaking change. I'm not sure this is worth it. All other changes LGTM . Also if we want to release for ROS all of this can only go into the next ROS release and we cannot rerelease in any exisiting ROS distro.
orocos_kdl/src/framevel.inl
Outdated
@@ -317,7 +352,7 @@ void VectorVel::ReverseSign() { | |||
} | |||
doubleVel VectorVel::Norm() const { | |||
double n = p.Norm(); | |||
return doubleVel(n,dot(p,v)/n); | |||
return doubleVel(n,n ? dot(p,v)/n : 0); // Setting norm of p to 0 in case norm of v is 0 |
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.
Comparing against exactly zero here, it might help to compare against eps
if you want to prevent Inf
, but in that case you might want to set n to zero as well?
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.
Will look into this.
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.
@smits The API is not broken, as None still available in kdl,
Also None is still available in the python 2 API of PyKDL. So only in python 3 is not available, but that has not been released yet. So nothing to break yet. |
@MatthijsBurgh , I missed that part 👍 . In that case I think this is in really good shape. |
eps is used to determine when to set norm to zero
@MatthijsBurgh Congrats for pushing this through. |
@zchen24 It started with your work, which was a good starting point. |
Congrats @MatthijsBurgh & wonderful to see the team of maintainers expanded! |
PyKDL: PyBind11 based
This PR includes the following:
BUILD_PYKDL_PYBIND11
. So SIP is still there, but PyBind11 is the default. PyBind11 is included as submodule.std::vector
support to separate file.__getitem__
and__setitem__
functions.__repr__
and equality operators.Frames
andFrameVel
classes. (Still a lot to gain)Resolves #219
Fixes #227, fixes #230