The camera's field of view is the opposite

144 views
Skip to first unread message

Jay Sun

unread,
Nov 27, 2023, 2:47:05 AM11/27/23
to ProjectChrono
Hello everyone, 
     I am using pychrono to install a camera sensor (sens.ChCameraSensor) on the front of the wheel, during the use of the process, I found that the front view is different from the God perspective, the field of view in the camera, the left and right direction, etc., are opposite. The wheelie rides on sandy ground, but the front view is a view of the grass. Video link: (https://youtu.be/EptO_U5TnM4? feature=shared), I don't know why. Looking forward to your reply! Thank you!

Regard,
Jay

Nevindu Batagoda

unread,
Nov 28, 2023, 9:48:55 PM11/28/23
to ProjectChrono

Hello Jay,

I see that you're viewing the third-person perspective using the Chrono Irrlicht visualizer. Can you set the pose of the ChCameraSensor to look at the world in a similar third-person perspective and see if it's seeing the same thing as the  Irrlicht visualizer? Also, would it be possible to share any code for your simulation setup so we can see if the issue can be reproduced? 

Best,
Nevindu M. Batagoda

Jay Sun

unread,
Nov 29, 2023, 1:56:25 AM11/29/23
to ProjectChrono

Thank you very much for your reply. I'll give you a simple example where the texture of the front view is opposite left and right, and the texture of the back view is also opposite right and left. The texture image was uploaded as an attachment.
HMMWVwithSensor.py
concatRGB2.jpg

Nevindu Batagoda

unread,
Nov 29, 2023, 6:51:58 PM11/29/23
to ProjectChrono
Hello Jay,

I've looked into it and it seems like the issue is that the Irrlicht visualizer and Chrono::Sensor samples the texture during rendering in opposite directions from the other. That's why you see the textures being flipped in Irrlicht and Chrono::Sensor. For the time being, you can avoid this issue simply by using a uniform texture, or if that's not possible you might have to just have to use the Chrono::Sensor output for any downstream task. The issue is only with textures, no geometry will be changed between the two visualizations. I understand this is inconvenient and we will be working on a fix for this in the near future. Thanks for bringing this to our attention. I hope this helps.

Best regards,
Nevindu M. Batagoda

Jay Sun

unread,
Nov 30, 2023, 12:50:36 AM11/30/23
to ProjectChrono
Thank you very much for your reply. I have another question for you. Is it possible to use depth camera in pychrono?

Nevindu Batagoda

unread,
Dec 1, 2023, 12:06:55 PM12/1/23
to ProjectChrono
As of right now the public release of Chrono only has a RGB camera. However, we do have a Depth Camera in our internal repo which will be pushed to the public main repo in the coming few weeks. Hope this helps.

Best,
Nevindu

Reply all
Reply to author
Forward
0 new messages