Closed shwwoooo closed 2 months ago
Please check the generated messages. C# convention for field naming uses uppercase letters. msg.Position should work.
Thank you for your quick response! Yes it works And I found out that it requires sourcing the built files from ros2-for-unity (install/setup.bash) or there will be runtime errors in Unity.
Hi, I am on Ubuntu 22.04 and using ROS humble. I built ros2-for-unity with custom messages by copying the messages source directories (the .msg and cmake files) to
src/ros2cs/custom_messages
. ros2-for-unity can be built, but when I copy the asset over to unity workspace and try to use the custom messages, unity complains'GimbalCmd' does not contain a definition for 'position'
. Here are my code in c# and msg files. subscriber.csGimbalCmd.msg
Gimbal.msg
Can anyone give some pointers in how to use custom messages? Thanks!