-
Notifications
You must be signed in to change notification settings - Fork 16
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
Camera rotation #6
Comments
I think this may be due to the frame buffer not being rendered before collecting. I had many issues synchronizing while developing. There are a couple things to note: 1. the frame buffer needs to be flushed multiple times to ensure synchronization (see CAM::RENDER_SCRIPT_CAMS(TRUE, FALSE, 0, FALSE, FALSE)) 2. The game needs to be unpaused (can set speed to 0 so there will be minimal difference between frames, although not exact. If you look at the function generateSecondaryPerspective and it's subfunctions you will see the unpause, render three times, pause, collect procedure that seemed to work best during my experimentation. Hopefully this helps, let me know if you're still having trouble. |
Hello, I don't know if this is because of the synchronization, because it happens only when i change camera rotation different from the default heading rotation.z. Thanks! |
Have you had any luck fixing this issue? |
unfortunately no, I still don't know what is causing issue. |
Okay, I'll have time to debug in a few days. I'll get back to you next week. |
Awesome, thank you very much for checking it! |
Hey, sorry for the delay. I've been super busy at work. I think I found the issue. There are multiple places where GET_ENTITY_ROTATION is being used to set the camera parameters from the vehicle direction. The ones which should definitely match are:
Let me know if this works! If not I can take another look. |
Hmm, you're correct. A few things to help debug:
|
I feel your pain with debugging. This was my life for a while. I recommend reading through and triple checking before testing. The overlays are an option. Other people have made the overlays work. It's a bit more difficult with the segmentation as it obtains the data from the graphics buffer and the buffers are refreshed a few times. |
Everything in these two functions looks fine to me. Are you also changing the cam in Scenario::setCamParams? Alternatively, you could not use a new camera and simply change the position/rotation of the global camera ('camera'). This is what I did to generate secondary perspectives. The following two lines could be causing your problems (lines 864/865 in scenario.cpp):
|
Yes, actually I also tried creating multiple cameras before, but with the same result. |
Okay, and where are you calling generateExtraCameraPerspective? In the same spot as generateSecondaryPerspectives? |
yes, exactly |
How are the 3D bounding boxes? |
@bradenhurl |
Yes, I believe the depth and camera images are correct. You can easily obtain stereo by setting two cameras in the desired locations. |
This could potentially be a problem. Have you tried commenting out the checks for if the entity is occluded and if there is a clear LOS? |
Hello Braden @bradenhurl.
I am extending your projetct to include multiple cameras,
however, I came to a problem where when the segmentations and detected objects are being exported, it doesn't take into account the camera rotation and it breaks the exports and detection boxes - I guess it just takes the collector car direction since it consideres only one camera facing directly on the hood. Can you please point me into direction what should I look into when fix this issue and take the actual rotation from the camera?
Thank you so much in advance!
The text was updated successfully, but these errors were encountered: