gkjohnson / urdf-loaders

URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files open sourced from NASA JPL
https://gkjohnson.github.io/urdf-loaders/javascript/example/bundle/index.html
Apache License 2.0
469 stars 121 forks source link

Hexapod kinematics failed #287

Closed yvanblanchard closed 6 months ago

yvanblanchard commented 6 months ago

Hello,

I tried to load the hexapod URDF file with the loader lib, but result does not look fine:

image

I know that this loader does not contain IK solver (just URDF viewer), but I think components should be correctly placed and connections (joints) between them as well. The urdf data were taken from your 'PI_ROS_Driver/master/pi_hexapod_driver' repo.

Is it a bug or a limitation of the actual loader library ? Thank for your help.

gkjohnson commented 6 months ago

Is it a bug or a limitation of the actual loader library ?

No this is how the "0" orientation are defined for the joints in this URDF model.

I think components should be correctly placed and connections (joints) between them as well.

There is no requirement in the URDF specification that the 0-angle joints be oriented in a physically possible way. When using a robotic model like this the joint values reported by the solver in the ROS system would orient the kinematics correctly.

Unfortunately URDF does not support parallel-kinematic systems so there's no way to infer from the file how these joints should be connected without some manual annotation.

yvanblanchard commented 6 months ago

OK, clear , thank you Garett

virtuamechanica commented 6 months ago

@gkjohnson please notice that there is a trick to handle closed chains kinematics in urdf: through gazebo xml tag: https://github.com/2b-t/closed_loop/blob/humble/urdf/closed_loop.urdf.xacro