lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.29k stars 781 forks source link

Integrate the Radar Model available in Matlab with LGSVL simulator ? #1100

Open Jiaqing-Cao opened 4 years ago

Jiaqing-Cao commented 4 years ago

Hi, I am researching some radar simulator works, Matlab has some sensor detections which could run 3D on Unreal engine.

I woul like to know, is it possible to integrate the Radar Model available in Matlab with LGSVL simulator ?

If possible, could you please share some ideas ? Thank you!

EricBoiseLGSVL commented 4 years ago

@Jiaqing-Cao Yes this is possible. You can create a sensor plugin that communicates with matlab

Jiaqing-Cao commented 4 years ago

@EricBoiseLGSVL Oh, that's great.

Could you please share some more info about how to create a sensor plugin that communicates with matlab? I looked the tutorials herehttps://www.lgsvlsimulator.com/docs/sensor-plugins/. But it seems that is one tutoiral for adding Unity created sensor plugins to LGSVL.

EricBoiseLGSVL commented 4 years ago

@mark-gerow-lge When you have time can you explain the basics for creating sensor plugins, thanks.

mark-gerow-lge commented 4 years ago

@Jiaqing-Cao if you follow the tutorial for a sensor plugin at

https://www.lgsvlsimulator.com/docs/sensor-plugins/

you can create custom C# scripts for unity that allows you to collect data from the ego vehicle / simulation, then send it to Matlab via a socket connection. Then you can build the plugin, and use it in your simulations and attach to your ego vehicle. Make sure to inherit from SensorBase with your actual sensor (helper scripts do not have that restriction) and make sure its on the root object of your prefab.

Jiaqing-Cao commented 4 years ago

@mark-gerow-lge , Thanks a lot for the explanation! I will try that.

Jiaqing-Cao commented 4 years ago

Hi, @EricBoiseLGSVL @mark-gerow-lge . I have been researching Matlab with LGSVL for some time. I look into mathworks. It seems for now, "Simulation 3D Scene Configuration" only support Unreal Engine.

Could you please share some ideas about that ?

EricBoiseLGSVL commented 4 years ago

You will need to look at the code that this package provides and create similar functionality for Unity. It really shouldn't be that much different from Unreal. We are working on something similar already, I found this link that might help.

Jiaqing-Cao commented 4 years ago

Okay, thank you for that!