MATLAB simulinkとRobotics System toolboxを用いた/joy形式のパブリッシュ用信号の作成について
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ueda takumi
am 3 Aug. 2018
Kommentiert: AYKUT SIRMA
am 26 Aug. 2022
MATLAB simulinkとRobotics System toolboxでROS開発を行っていますが、/joy形式のメッセージの作成についてよく分からず苦戦しております。 どなたか詳しい方、資料でもいいのでご教授お願いいたします。
0 Kommentare
Akzeptierte Antwort
Tohru Kikawada
am 8 Jan. 2019
Bearbeitet: Tohru Kikawada
am 8 Jan. 2019
もう少し具体的にやりたいこと(/Joy形式のメッセージを作って何をどうしたいか)を記載すると回答が集まりやすいかと思います。
MATLAB/Simulinkからsensor_msgs/Joy形式のメッセージを作成して、publishしたいと理解しました。
MATLABの場合には下記のようにメッセージを作成し、publishいただけます。
joyMsg = rosmessage('sensor_msgs/Joy')
joyMsg =
ROS Joy message with properties:
MessageType: 'sensor_msgs/Joy'
Header: [1×1 Header]
Axes: [0×1 single]
Buttons: [0×1 int32]
Use showdetails to show the contents of the message
rosinit('<ROS_MASTER_URI>')
joyPub = rospublisher('/joy','sensor_msgs/Joy');
send(joyPub,joyMsg)
2 Kommentare
AYKUT SIRMA
am 26 Aug. 2022
To receive only the Axes and Buttons data readings from 'sensor_msgs/Joy' message, what do I need to do? I try to write a callback function to get these 'sensor_msgs/Joy' to access Axes and Buttons information and put them into an array to use. I will be very glad if you would guide me, thank you very much.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu パブリッシャーとサブスクライバー 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!