-
Notifications
You must be signed in to change notification settings - Fork 7
Implement direct kinematics for a 6DOF arm
RBT1001/src/week4/direct_kinematics.py
. This is an uncomplete code for a ROS Node that computes the forward kinematics for the arm.
### TODO
and add your code in there.
- ❗ We will use the Numpy (numerical python) library for computing the following values:
- cos:
np.cos(...)
- sin:
np.sin(...)
- pi:
np.pi(...)
- cos:
- ❗ Note that the matrix multiplication (dot product) between numpy matrices can be obtained using the
@
operator, e.g.
self.HR('z', np.pi/2) @ self.HR('y', np.pi/2)
Once you have finished it's time to test it!
ros2 launch week3 view_robot.launch.py description_file:=mecharm_270_m5.urdf.xacro
❗ You can reduce the dimension of the reference frames by setting the "Marker Scale" to 0.5 in the left bar options under TF.
python3 src/week4/direct_kinematics.py
ros2 run tf2_ros tf2_echo base link6
. ❗ If your transformation is correct, you should see the same matrix - randomize the joints positions to check if the transformation is always accurate.
Parts for the workshops are extracted, edited from and/or inspired by the following sources.
- Official ROS humble tutorials: https://docs.ros.org/en/humble/Tutorials.html
- Elephant Robotics docs: https://docs.elephantrobotics.com/docs/gitbook-en/