Fight results:
This repo won't teach you how to get the DH parameters, to do that I higly recommend the 3rd chaptor of Spong. Nevertheless, I will let some pictures that are useful.
Lazyness alert: Before unfold the picture, try yourself. It's the best way to learn.
In the fortunate case you are working with the PX100 things maybe a little bit different. I found mr. Chitiva's repo quite good.
Lazyness alert no. 2: Use the repo as a guide, don't steal his code, try first.
We have used the Matlab RTB, but you know Matlab, so lets install the python version.
Open a terminal and run:
sudo apt install python3-pip
pip3 install roboticstoolbox-python
pip3 install sympy
Check the following sources:
Definitely Peter Corke is so pro, I printed a poster of him 😆.
Let's create a python script:
import roboticstoolbox as rtb
from spatialmath import SE3
robot = rtb.DHRobot([rtb.RevoluteDH(a=1),rtb.RevoluteDH(a=1)],name="2R")
print(robot)
robot.plot([0.75,0.26])
input()
Run the px_rtb.py script and check if you obtain the a real PhantomX model.
Activity: Create a notebook and follow the same pipeline presented in px_rtb.py. What does happen with the figures? 😬
Moveit! is a sort of sourcery that allows you to plan your robot's motion. It relies mainly on the OMPL, which is a full library for motion planning.
In the case you do not have moveit installed:
sudo apt install ros-noetic-moveit
Note: By the time I wrote this, the last stable version of moveit was 1.1.9.
Because our main focus is on robotics we will have a short taste of what Moveit is capable of, so first clone px_text_moveit on your catkin_ws and compile it.
cd ~/catkin_ws/src
git clone https://github.com/felipeg17/px_test_moveit.git
catkin build px_test_moveit
Remember to keep px_robot updated, so give it a pull. Go to the px_robot folder and type:
git pull origin master
I added a couple of interesting new files, the most important px_moveit_v2.py, it should be located on ../scripts.
Source everything and run:
roslaunch px_robot px_moveit.launch
If everything goes well, you shall see something like this:
Then go to the px_robot/scripts and run:
python px_moveit_v2.py
Note: Do not dare bitching about the quality. It was for speed purposes.
If you want to learn more about moveit y recommend the following resources:
Notice: Also Realpe has a lot of experience on moveit, go and check out his repos. Realpe and Fajardo have been working with me, if you want to have a portfolio like them, consider joining to my research team, it is a limited offer, once I complete the team, people will beg for being part of this project.
<Lab guide>
: https://drive.google.com/file/d/1RGBmvqbng3HATgVkgL6y5xWPqr2GDuzn/view?usp=sharing
<Recorded class:>
:
https://drive.google.com/file/d/12lFjGgYykycmhP98ZCwVEyhBpqWARUnh/view?usp=sharing
Acknowledgments:
- Jose Manuel Fajardo
- Sebastian Realpe
- Cristian Chitiva (Well crafted repo for the PX100)
- William Sierra (Thanks for the pics)
- Brian Vasquez (Thanks for the pics)
This repo has taken a lot of effort, so consider to leave a star, follow me, and if you feel generous I have Paypal (just kidding).