jhavl / robotacademy-code Goto Github PK
View Code? Open in Web Editor NEWCode Translations for Robot Academy
License: MIT License
Code Translations for Robot Academy
License: MIT License
Will Update to find which specific lines are causing this to occur
the coordinates produced in the file don't line up with the robotics system toolbox
For Files:
Velocity of a 6 joint robot arm - translation
line 13: J = geometricJacobian(p560,config,'link6')
produces different results to: J = p560.jacobe(qn)
Velocity of a 6 joint robot arm - rotation
line 16: T = getTransform(p560,config,'link7')
produces different results to: T = p560.fkine(qn)
line 19-21:
config(1) = config(1)+0.01;
Td = getTransform(p560,config,'link7')
produces different results to: Td = p560.fkine(qn + [0.01 0 0 0 0 0])
for same files in mathworks inverse kinematics issue
no equivalent way to the robotics system toolbox to specify "r,rd,ld" (if it should be right handed, left handed etc...). Will comment in the file
Analyzing a very simple 1- joint robot arm, Analyzing a very simple 2-joint planar robot arm, Analyzing a very simple 3-joint planar robot arm, Analyzing a robot arm that moves in 3D, Rigid-Body Dynamics: Symbolics don't work with the MathWorks functions
Analyzing a very simple 1- joint robot arm, Analyzing a very simple 2-joint planar robot arm, Analyzing a very simple 3-joint planar robot arm, danavit-hartenberg notation, Redundant robots, Velocity Ellipse in 2D, Jacobian and number of robot joints, Forces acting on robot links, Rigid body dynamics, Gravity and payload, inertia and acceleration coupling, velocity coupling, forces acting on robot links: No simple method for generating the planar arms or the 20 joint arm, this could be written up as a separate library function however using the rigid body tree modeling method for MathWorks.
Base and tool transforms: Unable to find method for translating the base of the robot, should be a quick fix if the function is found for this.
Forward Dynamics: No equivalent way to simulate collapse under gravity, possible to write up a function for this however
The image jacobian: cannot find method for image jacobians for MathWorks, it seems their library wasn't really meant for this kind of stuff, a question thread on the mathworks website for it points to peters toolbox instead
Setting the robot dataformat to 'row' using eg. p560.DataFormat = 'row';
allows for standard arrays to be used to set the coordinates, will update files with this to simplify
** joint interpolated motion:** Unable to display animations with the show robot function
Joint interpolated motion, cartesian interpolated motion: Unable to locate the qplot equivalent function for MathWorks, a separate function could be written up for this most likely
Hit and Miss Transform: No triple point function for MathWorks, a function could be written up for this however
Need to use the computer vision toolbox as well as the image processing toolbox to achieve similar levels of capability
This:
print(np.power(m,np.ones((4,4))*2), "\n")
can be simply done as m**2
Big Issues:
Python Issues:
Redundant robots: Hyper3d robot produces indexerror: too many indices for array: array is 0-dimensional, but 1 were indexed (issue exists in the robotics toolbox documentation as well https://petercorke.github.io/robotics-toolbox-python/arm_dh.html#roboticstoolbox.models.DH.Hyper3d)
Minor Issues:
Different Values Matlab/Python:
View From a Moving Camera (seems like the camera view in python is rotated compared to the matlab version)
https://robotacademy.net.au/masterclass/getting-images-into-a-computer/?lesson=632
@Tjeard0 is there really no easier way to extract images?
@Tjeard0 could you please go through the python codes and check that we use float64 when Peter uses double in MATLAB? This could be confusing. E.g. https://robotacademy.net.au/masterclass/getting-images-into-a-computer/?lesson=633
@Tjeard0 this is the case in quite a few Python snippets
In https://robotacademy.net.au/masterclass/spatial-operators/?lesson=676 the code currently says that some implementations are not available in Python. See page 457 how to do it.
Unable to display animations with the show robot function in mathworks, will comment in the file
located in: code/lesson/robot-arm-configuration-change
In the finding edges lecture, we can use:
K = [0.5, 0, -0.5]
im.convolve(K).disp(colormap="signed")
(see Peter's book, p. 448)
Also, the Sobel kernel is available:
Du=Kernel.Sobel()
Ideally we should add simple code snippets to those as well, see e.g. https://robotacademy.net.au/masterclass/spatial-operators/?lesson=678 - this way it's easy to see which function to use in other toolboxes.
Inverse kinematics for mathworks wont solve correctly
Located in: code/lesson/numerical-inverse-kinematics
The constrained trajectory function for mathworks doesn't fully work the same as the robotics toolbox, this ultimately produces different graphs for this specific file, I have tried to adjust the values to get similar looking graphs for now.
For File: code/lesson/multi-dimensional-trajectory
Update Folder name to denavit not danavit
located in code/lesson/danavit-hartenberg-notation
https://robotacademy.net.au/masterclass/color/?lesson=727
the python code has an issue where the blobs function is dividing by 0 for some reason and is throwing an error, the rest of the code should all be working
Inverse kinematics for mathworks not solving correctly.
located in code/lesson/inverse-kinematics-for-a-general-purpose-robot-arm-that-moves-in-3d
when using the code
m = f1.match(f2);
in the finding correspondence using surf features video the following error is produced
Execution of script closest as a function is not supported:
C:\Users*USERNAME*\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Machine Vision Toolbox for MATLAB\vision\closest.m
Error in SurfPointFeature/match (line 122)
[cor2,err] = closest(D1, D2);
Error in rvc2 (line 18)
m = f1.match(f2);
This same issue for closest.m occurs in the advanced mathematical morphology code as well for the colorkmeans function
I have linked a text file for the contents of the closest.m file to help with this issue. If you follow the file directories shown earlier with your own username this should point to the matlab file as well.
Mathworks inverse kinematics doesn't seem to solve for the correct location, it could be due to the different coordinate conventions for the end effector positions accross the different toolboxes.
Example code:
aik = analyticalInverseKinematics(p560);
aik.KinematicGroup generateIKFunction(aik,'robotIK');
qs = robotIK(Ts(:,:,end))'
I have narrowed this down to the mathworks robotics toolbox including the base of the robot in its position calculations as every location is skewed downwards. There also appears to be issues with getting the tool to be rotated in the correct position but I was unable to figure this out. It seems that the base of the robot is roughly 0.6 tall so instead of the transform benign [0.4, 0.2, 0] it would be [0.4, 0.2, 0.6] to have it in the equivalent position.
For Videos: cartesian interpolated motion, joint interpolated motion, numerical inverse kinematics, robot arm configuration change, inverse kinematics for a general purpose robotic arm that moves in 3d, denavit-hartenberg notation
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.