RobotecAI / ros2-for-unity

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

spawn gameobject in unity based on real world coordinates #46

Closed kkirby04 closed 1 year ago

kkirby04 commented 2 years ago

hi , i am using computer vision to detect peoples position and would like to be able to spawn their positions in unity. so far i have the publisher publishing these corrdinates of the peoepl in the real world to unity subscriber node. but now i am unsure as to how to wirte in the ros2 namespace language you guys have made to spawn these people at the subscribed positions. any help would be great. many thanks, kieran

adamdbrw commented 2 years ago

@kkirby04 I got to this quite late, hope you managed to find a solution. You would need to implement a solution in the application layer, this project does not handle that. There are conversions you could use for coordinates themselves, but implementing a Map component (with configurable fix) is a good place to start.

pijaro commented 1 year ago

I believe that this is Unity specific issue, and it is best to look for an answer on unity answers or inside Unity documentation (Object.Instantiate might be something that you are looking for).