MATLAB simulinkとRobotics System toolboxを用い​た/joy形式のパブ​リッシュ用信号の作成​について

MATLAB simulinkとRobotics System toolboxでROS開発を行っていますが、/joy形式のメッセージの作成についてよく分からず苦戦しております。 どなたか詳しい方、資料でもいいのでご教授お願いいたします。

 채택된 답변

Tohru Kikawada
Tohru Kikawada 2019년 1월 8일
편집: Tohru Kikawada 2019년 1월 8일

2 개 추천

もう少し具体的にやりたいこと(/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

ueda takumi
ueda takumi 2019년 5월 28일
遅くなりましたが、大変参考になりました
ありがとうございます。
AYKUT SIRMA
AYKUT SIRMA 2022년 8월 26일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Robotics에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2018년 8월 3일

댓글:

2022년 8월 26일

Community Treasure Hunt

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

Start Hunting!