problems of baxter_cor​e_msgs/Joi​ntCommand in simulink

2 visualizaciones (últimos 30 días)
peidong
peidong el 1 de Jul. de 2015
Respondida: Darsana Thulasi el 9 de Jul. de 2015
Hi All,
I tried to control baxter robot using simulink, but I find there may be some problem of creating topic. 1, there is no names(data type, string[]) for baxter_core_msgs/JointCommand; 2, the Msg.command input port requires 128X1 elements of array, while actually we only need 7X1 array to publish the topic e.g. '/robot/limb/left/joint_command'. what's the 128X1 elements of array composed of? it works in matlab manuscripts,as follows, pub=rospublisher('/robot/limb/left/joint_command','baxter_core_msgs/JointCommand'); Msg=rosmessage('baxter_core_msgs/JointCommand');
command=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0];% here we can see it's 7X1, not 128X1 declared in simulink. names=[{'left_w0'}, {'left_w1'}, {'left_w2'}, {'left_e0'}, {'left_e1'}, {'left_s0'}, {'left_s1'}]; mode=1; Msg.Command=int64(command);
Msg.Mode=int32(1); Msg.Names=(names); send(pub,Msg); Looking forward to your answers! Thanks,
John

Respuestas (1)

Darsana Thulasi
Darsana Thulasi el 9 de Jul. de 2015
128X1 is the default size. You can change this by going to Tools>>Robot Operating System and set the value in Manage Size Arrays. Please see this doc link for more information: http://www.mathworks.com/help/robotics/ug/manage-array-sizes-in-simulink-ros.html

Categorías

Más información sobre Network Connection and Exploration en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by