AMABerkeley / jelly_locomotion

locomotion controller for jelly and pybullet simulator
2 stars 1 forks source link

Jacobian is always zero #3

Closed littleggghost closed 5 years ago

littleggghost commented 5 years ago

Hi, @wuphilipp I do my test in script dog_simulator.py and try your varies of examples, like walk, trot and bound, some can move, and some fall down. When I run the func compute_action() with desire pitch or roll, it doesn't move. That's abnormal.

  1. I analyze the codes, and find that the QP solver generate right force, but I get only zero torques.
  2. I print the Jacobian matrix and it always be zeros, which means force_to_torque() wrong. More deeply, the JntToJac() is wrong.

t = JT*F

  1. I print self.chain.getNrOfJoints() of each chain and get zeros too. Maybe because the KDL chain didn't find joints.

Could you have a check when you have the time? Thanks in advance!

littleggghost commented 5 years ago

The KDL need to init it's chain by addSegment(), which uses D-H method. reference: https://github.com/surgical-vision/compgx01_lab/blob/master/inverse_kinematics/src/inverse_kinematics/YoubotKDL.py#L32

littleggghost commented 5 years ago

Oh, my fault. The reason is the names of each link are wrong. The correct name can be checked from it's own URDF file.