Hi @mmmarinho , although this issue is similar to issue #20 , I decided to open it because it is related to another file.
Bug description
- The method pose_jacobian() of DQ_DifferentialDriveRobot is giving a runtime error saying that it tried to access link index 3.
To Reproduce
Code
import numpy as np
from dqrobotics.robot_modeling import DQ_DifferentialDriveRobot
q = np.array([0.12, 0.0, 0.0])
diff_robot = DQ_DifferentialDriveRobot(1,1)
J = diff_robot.pose_jacobian(q)
print(J)
Output
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Tried to access link index 3 which is unnavailable.
Expected behavior
- The code should return a jacobian matrix as in the following matlab code
Matlab code
q = [0.12 0 0];
robot = DQ_DifferentialDriveRobot(1,1);
J_pose = robot.pose_jacobian(q)
Matlab output
J_pose =
0 0
0 0
0 0
0.5000 -0.5000
0 0
0.2500 0.2500
0.0300 -0.0300
0 0
Environment:
- OS: Ubuntu 18.04
- dqrobotics version 20.4.0.22
- Python version 3.6.9
Additional context
- Since the Python code depend on the C++ code, I believe there is a problem between lines 50 to 52 of the DQ_DifferentialDriveRobot.
When calculating the Jacobian of the DifferentialDriveRobot, it tries to access link with index 3 because of line 50 in DQ_DifferentialDriveRobot.
Hi @mmmarinho , although this issue is similar to issue #20 , I decided to open it because it is related to another file.
Bug description
To Reproduce
Code
Output
Expected behavior
Matlab code
Matlab output
Environment:
Additional context
When calculating the Jacobian of the DifferentialDriveRobot, it tries to access link with index 3 because of line 50 in DQ_DifferentialDriveRobot.