Ray Tracing support within PyChrono (As an alternative simple Sensor)

37 views
Skip to first unread message

William Burbidge

unread,
Feb 12, 2025, 12:26:11 PM2/12/25
to ProjectChrono
Dear the Project Chrono Community,

I hope you are well.

I am currently working on my masters project, and I have been utilising Project Chrono- more specifically PyChrono for initial simulations for a robotics related project. I am planning to do some simple Reinforcement Learning, and for this, I would like to have a simple Lidar-like sensor. My main device does not have a Nvidia GPU, so not using the Sensors module would be preferable.

It can be as simple as a simple 3 beam raytracer, where each are from the front of a body, but two offset at positive and negative angles. I have looked at using CHRayTest, although have had issues implementing it. Does anyone have a simple example for distance measurement, which I could then look to alter for my specific case, and whether ray-tracing is supported within the Python version?

I have tried use of the SENSOR Module on a laptop with Nvidia GPU (installing the prerequisites following the installation tutorial- using version 9.0), although get the error 'cannot import name '_sensor' from 'pychrono''. So if this would be the best means to do sensing, I will have to look at fixing this.

I hope my queries are okay. I look forward to continuing to use Project Chrono.

Many thanks,
WB

Harry ZHANG

unread,
Feb 12, 2025, 2:17:18 PM2/12/25
to ProjectChrono
Hello William,

Thanks for your interest in using Chrono for your project. 

My suggestion is to figure out problem of error "cannot import name '_sensor' from 'pychrono'" and not reinvent the wheel to write your own ray tracing engine. This error likely is because the package installation sequence or CUDA installation has problem, if you want to share the error, system setup, and steps you installed pychrono package, we can help you with it (check carefully the version and sequence of installation listed here: https://api.projectchrono.org/pychrono_installation.html).

Best,
Harry 
Reply all
Reply to author
Forward
0 new messages