How to get values from structure array

Hello. I wonder how to get values from structure array, in my case. I know that second line is: incorrect--possibly unbalanced (, {, or [. Code:
Pose = rget( Kawasaki, 'pose');
getPoseValue =(Pose.x,Pose.y,Pose.z,Pose.o,Pose.t);
rset( Kawasaki, 'base', rpoint(getPoseValue) );
This is how it should be done with constant values. I want to get fresh values from pose of my robot.
Code2:
%rset( Kawasaki, 'base',
%rpoint(177.957,349.963,-229.418,15.983,179.610,-162.582) );

2 件のコメント

Walter Roberson
Walter Roberson 2018 年 1 月 22 日
Damian
Damian 2018 年 1 月 22 日
Yes of course. I use this toolbox to control robot Kawasaki FS03N in my university lab. But I build pick and place task for my robot. Still i got many "unclear matters".

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2018 年 1 月 22 日

0 投票

getPoseValue = [Pose.x,Pose.y,Pose.z,Pose.o,Pose.t];
temp = num2cell(getPoseValue);
rset( Kawasaki, 'base', rpoint(temp{:}) );
... might be easier to just call
rset( Kawaski, 'base', rpoint(Pose.x,Pose.y,Pose.z,Pose.o,Pose.t))

3 件のコメント

Damian
Damian 2018 年 1 月 22 日
I tried your proposition and that what's I get:
Not enough input arguments.
Error in rpoint
Error in testtt (line 4)
rset( Kawasaki, 'base', rpoint(temp{:}) );
First line is Kawasaki = 1; (this is the first condition to make it works.) So... i tried to get all the input arguments. What i got
Code:
Kawasaki = 1;
getPoseValue = [Pose.x,Pose.y,Pose.z,Pose.o,Pose.t,Pose.j1,Pose.j2,Pose.j3,Pose.j4,Pose.j5,Pose.j6,Pose.poscfg,Pose.typ,Pose.move,Pose.signal,Pose.pulse,Pose.speed,Pose.acceleration,Pose.deceleration,Pose.accuracy,Pose.wait];
temp = num2cell(getPoseValue);
rset( Kawasaki, 'base', rpoint(temp{:}) );
Struct contents reference from a non-struct array object.
Error in rset
Error in testtt (line 4)
rset( Kawasaki, 'base', rpoint(temp{:}) );
Walter Roberson
Walter Roberson 2018 年 1 月 22 日
The documentation I found (and linked to above) gives only a bare outline of the commands. The source code itself is not openly available, requiring an application for permission to use it. Unfortunately I am not considered "academic" and I am not a robotics researcher, so I am probably not qualified to access it.
Damian
Damian 2018 年 1 月 22 日
編集済み: Damian 2018 年 1 月 22 日
I have an access and permission to this Toolbox, but... this good when you have Kawasaki or KUKA robot near you to test it :) . I am only preparing code to get it working when iam going to lab.
Small taste of it i can share with you here:
But the matter of fact now is... that:
rset( Kawasaki, 'base', rpoint(temp{:}) );
It its good but function it gets values... but in cell. It will be works with struct? Any propsition for struct type to get values?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFunctions についてさらに検索

質問済み:

2018 年 1 月 22 日

編集済み:

2018 年 1 月 22 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by