MrMushroom / CarlaScenarioLoader

A scenario loader for the automotive simulator Carla 0.9.3. Loads scenarios based on OpenScenario 0.9.1.
MIT License
18 stars 9 forks source link

Reading the data live from CARLA Server #5

Open werewolfdev opened 2 years ago

werewolfdev commented 2 years ago

Hi @MrMushroom I am trying to retrieve data live still and not successful. The latest versions of CARLA provides record argument with scenario runner to record the frame into a log file in binary string format and then extract the relevant data using metrics manager module. However I would like to send this data as and when we receive it from Server . The data we receive from server will be in binary string format if Iam not wrong. SO basic idea which Iam thinking is to receive the binary string data from Server for each frame convert it to get usable info and send to the ADTF side. But Iam not able to implement this idea and any insights from your side will be really helpful. Thanks a lot in advance.

MrMushroom commented 2 years ago

Hi! I am not familiar with the ScenarioRunner module! I only followed its early development, as it was ongoing in parallel to my work. I also had a telco with the Carla guys and gave them some recommendations, including my code. Put simply, they are just more people, then me back then as a sole masters student ...

So I cannot answer specifics of the scenario runner. Also I'm still only using the Carla Python API. In this case, I can just say that basically for the API every vehicle/pedestrian/etc. is an actor. And from the actor you can get location via _getlocation.

HTH!

werewolfdev commented 2 years ago

Hi, Thanks a lot for the reply. Scenario Runner is just a python based Client which just runs the scenarios using either python files or directly from openSCENARIO xosc scripts. I will try retrieving data directly from the server like start_recording.py script does and convert it to csv and then apply the get_location functions and send live to ADTF modules.

On Mon, Nov 22, 2021 at 12:35 PM Christoph Pilz @.***> wrote:

Hi! I am not familiar with the ScenarioRunner module! I only followed its early development, as it was ongoing in parallel to my work. I also had a telco with the Carla guys and gave them some recommendations, including my code. Put simply, they are just more people, then me back then as a sole masters student ...

So I cannot answer specifics of the scenario runner. Also I'm still only using the Carla Python API. In this case, I can just say that basically for the API every vehicle/pedestrian/etc. is an actor. And from the actor you can get location via get_location.

HTH!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MrMushroom/CarlaScenarioLoader/issues/5#issuecomment-975430807, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKGN34JQFPE52B5U2PIP3TUNITGVANCNFSM5IQPRG6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

MrMushroom commented 2 years ago

Ah okay, yea, if its also python based, then you can do that in parallel ... syncing might be an issue, but that should be solvable!

werewolfdev commented 2 years ago

Actually Iam planning on not logging to any csv , directly retrieving from the world , calculating the relative target position and sending over UDP . Yes syncing will be a task , but let's see how it goes. Thanks for the help

On Thu, Nov 25, 2021 at 9:34 AM Christoph Pilz @.***> wrote:

Ah okay, yea, if its also python based, then you can do that in parallel ... syncing might be an issue, but that should be solvable!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MrMushroom/CarlaScenarioLoader/issues/5#issuecomment-978951936, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKGN3465YZGDFAGQWWHYT3UNXYKDANCNFSM5IQPRG6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.