Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to know how to record without imageFile. #3123

Closed
kensuke1921 opened this issue Nov 3, 2020 · 12 comments · Fixed by #2861
Closed

I want to know how to record without imageFile. #3123

kensuke1921 opened this issue Nov 3, 2020 · 12 comments · Fixed by #2861

Comments

@kensuke1921
Copy link

I use record button in AirSim because I want to record speed of the car and car position.
However, record button ain AirSim also record the ImegeFile. So processing while driving is heavy.
Please teach me how to record without imageFile.

@tharindurmt
Copy link

tharindurmt commented Nov 3, 2020

You have to remove any elements under tag "recording" in the settings.json file.
Ex: I have the following section in my settings file. If I remove the it, AirSim will no longer record the images.

    "RecordOnMove": true,
    "RecordInterval": 1,
    "Cameras": [
      {
        "CameraName": "FrontLeftCam",
        "ImageType": 0,
        "PixelsAsFloat": false,
        "Compress": true
      },
      {
        "CameraName": "FrontRightCam",
        "ImageType": 0,
        "PixelsAsFloat": false,
        "Compress": true
      },
      {
        "CameraName": "FrontCentreCam",
        "ImageType": 0,
        "PixelsAsFloat": false,
        "Compress": true
      },
      {
        "CameraName": "RearCentreCam",
        "ImageType": 0,
        "PixelsAsFloat": false,
        "Compress": true
      }
    ]
  }

@kensuke1921
Copy link
Author

Thank you for advice.
It means like this picture?
Originally no code was written in settings.json.
So I wrote "recording".
But recording with imageFile is continuing...
Please teach me...
スクリーンショット (6)

@tharindurmt
Copy link

Try removing the Recording tag altogether.
Do you have any content in your AirSim plugin? (I'm referring to any image recording code)

@kensuke1921
Copy link
Author

I removed the Recording tag altogether like this.
But recording with imageFile is continuing....
I think RecordingFile.cpp is seems to be related to this problem.

スクリーンショット (7)

@tharindurmt
Copy link

Yeah, this seems to be the default behaviour. Sorry for not catching it before.
What you can do is to comment out these lines, so that the images are not captured. I haven't tried this myself. But commenting out these line should stop recording the images, if that's what you want. However, you'll most probably have to do some extra modifications to the /Unreal/Plugins/AirSim/Source/Recording/RecordingFile.cpp file by removing statements related to image capture, such as below.

        image_file_name << "img_" << response.camera_name << "_" <<
            common_utils::Utils::toNumeric(response.image_type) << "_" <<
            common_utils::Utils::getTimeSinceEpochNanos() << 
            (response.pixels_as_float ? ".pfm" : ".png");```

@kensuke1921
Copy link
Author

kensuke1921 commented Nov 18, 2020

Thank you for advice.
I comment out the line you specified.
But, all items are no longer recorded. For example, car position, car speed.
I want to know how to record except for only imageFile.
Sorry..

@tharindurmt
Copy link

Can you paste the code you changed here?
Unfortunately, I won't have enough time to test this myself.

@kensuke1921
Copy link
Author

Thank you for reply.
I comment out the line you specified.
I only did it.
I can't understand how to change the other code.
Sorry..
スクリーンショット (43)
スクリーンショット (44)

@tharindurmt
Copy link

Sorry, missed the email notification.
Did it throw any errors? Any log messages?

@kensuke1921
Copy link
Author

It didn't throw any errors and log message is nothing.

@tharindurmt
Copy link

I'll try this myself. But will need some time as I'm in the middle of developing another AirSim application.

@kensuke1921
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants