giulioturrisi/KUKA-KR5-Simulator

I want to use my *.stl files to make a robot and move joint in three js but failed

Closed this issue · 1 comments

fallow your code, i build a robot int threejs. But when i change the Joint2 angles, the axis just don't move around the own axis,it seems like the axis was around the (0,0,0). I checked my code and it just like yours, is there any problem about my *.stl files?
Best wishes,

The issue can be caused by the piece of code inside the AddRobot() function(line 597). The stl files from the kuka robot was originally well positioned and so if you try to run the program eliminating all the code about the pose it will graphically work(second.position.set(-75, 0, 0);....nd_block.position.x = 75;...ecc..just put it to zero, also for the other links).
BUT the axis of rotations will be (0,0,0)...So what i have done it was just shift the group every time, and re-shift of the same amount inversing the sign the links!

So basically you can see if your robot is well positioned eliminating all the pieces of code that i just wrote before, and then make a quick tweak of these translation parameters to move the rotation axes.

Hopefully this will help