EngM

10 Reputation

4 Badges

5 years, 117 days

MaplePrimes Activity


These are questions asked by EngM

Hello all, 

How to animate a set of vectors?

for example, 

q:=Matrix(3,10,(i,j)->i^2+j+2*i); # some matrix which holds the 3x1 vectors. 

with(plots):

animate(arrow,[q(..,i)],i = 1..10);

I get an error 

Error, unsupported type of index, i

In real use, the input to 'arrow' function will be a vector valued function so the 'animate' command will show the resulting vectors. 

 

thanks.

 

EngM.


 

Hello All, 

I am trying to solve a nonlinear equation as a part of inverse kinematic for a robot tip. 

The robot is mostly redundant, and thus, the optimization package is the best to use. 

I looked the NLPSolve function in matrix form. 

the equation(s) am trying to solve is of the following format

Tip - Desired = 0 

Tip is a 6x1 vector and is a function (or expression) of q1 ..., qn number of joints. 

Desired is 6x1 numerical values representing the desired Tip position and orientation. 

for example, for a planar robot with only x,y coordinates

<cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]), sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1])> - <1,1> = 0

I am a bit confused on how to use the NPLSolve command in matrix form. 

I understand that I need to formulate a procedure p(v) where v is a vector (here it will be v := <q[1], .., q[n]> ) , however, I am not solving one objective function rather 6 of them for 6-degrees of freedom. 

I tried something like

p:=proc(q)
    <cos(q[1])*cos(q[3])-sin(q[1])*sin(q[3])+sin(q[1])*q[2]+cos(q[1]) - 1,sin(q[1])*cos(q[3])+cos(q[1])*sin(q[3])-cos(q[1])*q[2]+sin(q[1]) -1>;
    end proc;
    Optimization[NLPSolve](3,p,initialpoint = evalf(q_start),maximize = false)
where q_start is 3x1 vector giving the initial point. 

but I always get 

Error, (in Optimization:-NLPSolve) non-numeric result encountered

 

How can I solve for set of equations?

thanks.

EngM

Hello, 

is there a way I can use data (variables) from Maple environment in the Maplesim environment. 

I have a scirpt in maple that generates the robots joints angles and need to use them in the 3D robot built in maplesim. I know I can export/Import data, but this sounds redundant. Is there a way to simply use an input block as a source of the data in maplesim and have the variable name generated in maple used int. Similar to what Matlab/Simulink does.. 

 

 

thanks.

Page 1 of 1