[Robotics] Force/torque/collision sensor

Arnaud Degroote arnaud.degroote at laas.fr
Wed Jun 15 18:34:11 CEST 2011


On 15/Jun - 13:21, Anna Chiara Bellini wrote:
> Hi Fernando,
> 
> my issue was this: the mathutils.Matrix*.transpose()*
> (beam.worldorientation.transpose(), line 11 ) doesn't return a new instance
> of Matrix, but rather it trasnposes the matrix itself, and returns None.
> As such, on line 11 the beam orientation is transposed, the operation
> returns None and the multiplication fails with and exception, and the rest
> of the script is ignored
> 
> rot = (beam.worldOrientation.transpose() * base.worldOrientation).to_euler()
>                                     this ^ fails
> 
> On the Blender console I see:
> Python script error - object 'Beam', controller 'Python Script#CONTR#1':
> Traceback (most recent call last):
>   File "joint_controller.py", line 11, in <module>
> TypeError: Matrix multiplication: not supported between 'NoneType' and
> 'mathutils.Matrix' types
> 
> So, here is what I did:
> 
> beam_rot = beam.worldOrientation.copy() # so that subsequent transpose()
> doesn't change the beam's real orientation
> beam_rot.transpose()
> rot = (beam_rot * base.worldOrientation).to_euler()
> 
> I have given it for granted this was a bug introduced by Blender's huge api
> change, but I'm not sure, I wanted to try it on an older Blender, but...
> hem, I don't know how to work with pre-2.5 :-)

It is a change between 2.56 and 2.57 

See http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils
for some documentation.


-- 
Arnaud Degroote
PhD Student 
RIA LAAS / CNRS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.blender.org/pipermail/robotics/attachments/20110615/7ae1990f/attachment.pgp 


More information about the Robotics mailing list