Field-Robotics-Japan / UnitySensors

ROS/ROS2 enabled Sensor models (Assets) on Unity
Apache License 2.0
221 stars 34 forks source link

The bug about the definition of ROS message in this package, and the suggestion for the fix #157

Closed TaroABEJido closed 6 months ago

TaroABEJido commented 6 months ago

I found a few bugs when I tried to use Unity Sensor on ros 2. The Unity outputs the error below when executing the sample program (Demo_imu_ros and Demo GNSS ros etc..)

Assets\UnitySensorsROS\Runtime\Scripts\Serializers\Tf2Msgs\TFMessageMsgSerializer.cs(39,50): error CS1061: 'HeaderMsg' does not contain a definition for 'seq' and no accessible extension method 'seq' accepting a first argument of type 'HeaderMsg' could be found (are you missing a using directive or an assembly reference?)

Then, I found the cause of the issue in this source code and fixed it.

I want to suggest a fix by Pull Req https://github.com/Field-Robotics-Japan/UnitySensors/pull/158.

I hope that this fix is helpful for this project.

Autumn60 commented 6 months ago

@TaroABEJido

I have confirmed that the proposed PR will resolve the issue. Thank you for raising the Issue and PR!

sawan-kcl commented 6 months ago

Hi, Sorry to continue on a closed discussion. I'm getting this error when i change my protocol from ROS1 to ROS2. Please let me know how can i solve this?