Re: [eigen] Transform.rotation() hang |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Transform.rotation() hang
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 10 Feb 2009 22:01:34 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wLm3/TEVJkl1Dig/sp6bUN96WvEzA4VikKXtBUm/YKk=; b=kdaRHv6N9Pz6deI1utJwtW5iTqNFjr83hJ5Gk4llGvvcAl8rlNTyE9znd1UpA8W+WO olJwqFFdwrDRvgyQPA9hmEQ7d52FFgQ9s8lVVsQpSbM9baCOV+tpxk7BA9VzGJSaBmFf W2km+Biop0agYhUjmKzXWwAdvHpF02kFu+t1E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=eN20EJiUoLmmv88s00u/2QT8uh9tqpd+hoYGokZOtMM+laR58vL1PgAfgbJNyqj0RB L7QBdPj7sxtC7tQ6n89sCC4gBrzlcB8r9V7KlYObYOFiRwXeSPLtsksBYY/T1RYZDHjD ygCJUOVgYLvSvsdO31c1xbKjUmTxo90Hxf7t8=
Meanwhile, here are some thoughts if you absolutely have to live with
the current SVD.
What I can see on your matrices, is that while their norm is (of the
order of magnitude of) 1, they have some coefficients of the order of
magnitude of 1e-300. That could easily be what triggers a bug in the
current SVD.
So one thing you can do, before calling the SVD (i.e. before calling
rotation()) is to:
1) compute N = matrix.norm()
2) for each entry matrix(i,j),
if(ei_isMuchSmallerThan(matrix(i,j), N))
matrix(i,j) = 0;
Cheers,
Benoit
2009/2/10 Ben Axelrod <baxelrod@xxxxxxxxxxxx>:
> Sometimes calling Eigen::Transform.rotation() hangs and does not return.
>
>
>
> This transform matrix runs fine:
>
> 1 0 -1.931e-312 1
>
> 0 1 0 0
>
> 1.931e-312 0 1 1.5
>
> 0 0 0 1
>
>
>
> This transform matrix hangs:
>
> 1 0 -2.357e-312 1
>
> 0 1 0 0
>
> 1.179e-311 0 5 7.5
>
> 0 0 0 1
>
>
>
>
>
> Any help?
>
>
>
> Detailed info: the transforms were computed by:
>
>
>
> Tf * Tr * Qt * Sc
>
>
>
> Where, for the good transform:
>
>
>
> Tf = Transform:
>
> 1 0 0 1
>
> 0 1 0 0
>
> 0 0 1 0
>
> 0 0 0 1
>
>
>
> Tr = Translation:
>
> 0
>
> 0
>
> 1.5
>
>
>
> Qt = Quaternion:
>
> 0
>
> -9.653e-313
>
> 0
>
> 1
>
>
>
> Sc = Scaling:
>
> 1
>
> 1
>
> 1
>
>
>
>
>
> And for the bad transform:
>
>
>
> Tf = Transform:
>
> 1 0 0 1
>
> 0 1 0 0
>
> 0 0 5 0
>
> 0 0 0 1
>
>
>
> Tr = Translation:
>
> 0
>
> 0
>
> 1.5
>
>
>
> Qt = Quaternion:
>
> 0
>
> -1.179e-312
>
> 0
>
> 1
>
>
>
> Sc = Scaling:
>
> 1
>
> 1
>
> 1
>
>
>
>
>
> Thanks,
>
> -Ben