rapyuta-robotics / RapyutaSimulationPlugins

Apache License 2.0
17 stars 9 forks source link

Is it possible to create a GPS using BP? #271

Closed dbarrita closed 5 months ago

dbarrita commented 5 months ago

Hi, I'm working on using a GPS sensor in my simulation. For this I have georeferenced my level following the instructions in the unreal documentation. I have obtained the latitude, longitude and altitude of my robot using my robot's blueprint: Captura desde 2024-03-14 11-45-49 Now I want to publish this data in a ROSNavSatFix message but i have seen that I can't set the latitude, longitude and altitude using the blueprint because in the source code the option "BlueprintReadWrite" isn't set in the UPROPERTY. Is there a way to publish the NavSatFix using the blueprint or do I have to program it in C++? Thanks in advance

yuokamoto commented 5 months ago

Hi, The main issue of this is BP does not support double https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Variables/

Currently you need to program in C++ or publish as a different msg and parse in subscriber side.

yuokamoto commented 5 months ago

Do you think setter/getter ftom/to float in BP useful for these cases?

dbarrita commented 5 months ago

Hi, thanks for the quick reply! To answer your question, I don't know. I have experience programming in C++ but not in Unreal, so that is the only reason I used BP. I will try to program it in C++ then.

yuokamoto commented 4 months ago

FYI: I created PR https://github.com/rapyuta-robotics/rclUE/pull/139