RobotecAI / ros2-for-unity

High-performance ROS2 solution for Unity3D
Apache License 2.0
446 stars 58 forks source link

The message "Invalid message type" will appear. #79

Closed izakisyoutarou closed 1 year ago

izakisyoutarou commented 1 year ago

I got the following error when using ros2-for-unity to publish a custom message. Please let me know how to deal with it.

Screenshot from 2023-07-10 18-50-18

publisher's source code image

custommessage file /home/izakisyotaro/ros2_studies_ws/src/my_messages.zip

version ubuntu 22.04 distribution humble build ./build.sh --standalone

adamdbrw commented 1 year ago

@izakisyoutarou this looks like you are successfully publishing your custom message, but receiving it is the problem. Did you source your custom package (my_messages) also in the terminal where you typed ros2 topic echo?

izakisyoutarou commented 1 year ago

Thanks for your reply @adamdbrw The custom messages (my_messages) only has a cmake file, an xml file, and a message file. So I don't think I can do ros2 topic echo because there is no topic name, how do you do it?

adamdbrw commented 1 year ago

You posted a screen where you ran ros2 topic echo command. In this console, source your built message package first. Please refer to ROS 2 resources (tutorials etc) on how to do that.

izakisyoutarou commented 1 year ago

I forgot the source install setup bash command. I was able to run my own message successfully. Thank you very much for your support.

izakisyoutarou commented 1 year ago

Sorry, you asked me to reply to this.

From: Adam Dąbrowski @.> Sent: Wednesday, July 12, 2023 3:47 PM To: RobotecAI/ros2-for-unity @.> Cc: IZAKI Syoutarou @.>; Mention @.> Subject: Re: [RobotecAI/ros2-for-unity] The message "Invalid message type" will appear. (Issue #79)

Closed #79https://github.com/RobotecAI/ros2-for-unity/issues/79 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/RobotecAI/ros2-for-unity/issues/79#event-9795148421, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZPGZWHA6TANYBTEW7ZTCVLXPZB45ANCNFSM6AAAAAA2EKAVJA. You are receiving this because you were mentioned.Message ID: @.***>