Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make repr precision match constructor tolerance? #168

DanielFeshbach started this conversation in Ideas
Discussion options

The repr for an SE3 matrix seems to internally call on the numpy array repr, which prints to a number of digits set in numpy's precision printoption, which defaults to 8. However, SE3's constructor checks the validity of the orientation using an expression which needs to be within 0 up to precision higher than 8 digits. As a result, I have encountered a few examples where using SE3's repr gives an output which, when evaluated to reconstruct it, results in a "bad argument to constructor" exception. Here is one such example:

SE3(array([[ 0.68199836, -0.7313537 , 0. , -1.11677745],
 [ 0.7313537 , 0.68199836, 0. , 2.09607829],
 [ 0. , 0. , 1. , 0. ],
 [ 0. , 0. , 0. , 1. ]]))

In my application, I got around this problem by temporarily setting the numpy print precision to 16 within the repr of the class I'm encoding (a Kinematic Chain class, which stores a pose matrix for each joint - I'm writing a repr so we can save and load chains via text files). However, this was rather challenging to debug, so unless I'm missing a cleaner way I should have handled this, I think it would be convenient if the SE3 repr defaulted to setting its own precision to match that required by its constructor.

Thanks for making a great library!

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /