No action when using Simulink ROS Publish block

1 Ansicht (letzte 30 Tage)
SOREL
SOREL am 7 Sep. 2018
Kommentiert: SOREL am 17 Okt. 2018
Hi everyone.
This is a strange problem. I'm trying to use simulink Ros block to monitor and actuate a robotic arm. After several attempts, the Subscribe block is finally capable to provide real time measures of the robot sensors (Joint Positions).
What I'm trying to do now is to Publish torque command in order to achieve one task.
So I input Sine wave signals to all my joints (fixed array [7 x 1]) just to see what happens when I publish it with Ros Publish Block. From time to time I got a Segmentation Fault in my Robot Ros node, but most of the time nothing happens.
I really don't understand what is the problem.
So anybody experience would be welcome.
Sincerely

Akzeptierte Antwort

Sebastian Castro
Sebastian Castro am 3 Okt. 2018
In the Simulink-ROS interface, all arrays are treated like C arrays. You need both the content and the length of the array to successfully publish.
In addition to setting the Effort signal, you need to go into the Effort_SL_Info > CurrentLength signal and set its value to the dimension of the vector -- in this case, a uint32 valued 7.
- Sebastian
  1 Kommentar
SOREL
SOREL am 17 Okt. 2018
Thanks, Sebastian. It's working no more Segmentation Fault.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Network Connection and Exploration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by