Prof. Corke,
Thank you for adding me to the group. I am new to MATLAB and your Robotics toolbox. I was introduced to them at the same time and made good use of the SerialLink and ctraj, oa2r, ikine6s and fkine commands to make my virtual robot perform some interesting tasks.
The problem at hand it is to path plan an armed robot (Exact Dynamics iARM) around a 3D generated model of a skull. I have gone through chapter 5 of your book and ran the dstar, PRM, and RRT examples to get familiar as well as makemap() to generate a 2D obstacle course that resembled something like my problem. I am now trying to understand the Vehicle class to customize a robot that is a 3-link 6 DOF armed robot. Is this possible in the RTB 9.9? (Also, using MVTB 3.3) If it is not, is it possible to create multiple vehicles that are linked together? Ideally I would like to use my robot below and plan obstacle free paths that it can follow.
This is attempt to create a 3D matrix of ones and zeros , i.e. a cubed obstacle in the center and then trying to plan around it with the RRT but when this is visualized the key points seem to be right where the cube is centered and around. The vehicle was just clipped from one of your examples.
%% 3d attempt
map3d = zeros(500,500,500);
map3d(150:350, 150:350, 150:350) =1;
close all
rrt=RRT(map3d, Vehicle([], 'stlim', 1.2));
rrt.plan();
rrt.visualize()
goal=[0 1.3 0]
start=[.4 .5 0]
p=rrt.path(start,goal)
about(p)
figure(1);
hold on
plot3(p(:,1), p(:,2), p(:,3), 'r', 'linewidth', 3)
WIll imorph work on a 3D obstacle? I have not tried this command yet.
As a side note, when plotting my linked robot now, the look of the figure is different than previous and a warning (below) is thrown which only started to happen since I downloaded the machine vision toolbox. Any thoughts?
%% ARMED Robot
L(1)=Link([0 0 0 pi/2]);
L(2)=Link([0 0 1 0]);
L(3)=Link([0 0 1 -pi/2]);
L(4)=Link([0 0 0 pi/2]);
L(5)=Link([0 0 0 -pi/2]);
L(6)=Link([0 0 0 0]);
robot=SerialLink(L)
robot.tool=rt2tr(eye(3),[0 0 .5]');
Q=[0 0 0 0 0 0];
T1= rt2tr(eye(3),[0 2 1]')
T2= rt2tr(eye(3),[1.5 -1.5 1]')
Tmove=ctraj(T1,T2,20)
Qmove=robot.ikine6s(Tmove,'d')
for i=1:20
clf
drawrobot(robot,Qmove(i,:))
hold on
end
creating new robot
Warning: Stretch-to-fill scaling not supported;
use DASPECT or PBASPECT before calling ARROW3.
> In arrow3 at 377
In trplot at 232
In SerialLink.plot>create_robot at 443
In SerialLink.plot at 247
In drawrobot at 9
DRAWROBOT function:
function drawrobot( robot, Q )
Ttip0=robot.fkine(Q);
T60 = Ttip0*inv(robot.tool);
P60 = transl(T60);
Ptip0 = transl(Ttip0);
axis([-2 2 -2 2 -2 2])
line([P60(1) Ptip0(1)],[P60(2) Ptip0(2)], [P60(3) Ptip0(3)],'LineWidth',2,'Color', 'g')
hold on
robot.plot(Q)
hold off
robot.ikine6s(T60)
end
Thank you so much for your time and creating these products,
Jordan Sorg