ChVisualSystemVSG

37 views
Skip to first unread message

Aleksandr Prokhorov

unread,
May 19, 2026, 5:24:58 AM (9 days ago) May 19
to ProjectChrono
Dear community!

I have been working on the CHRONO for not so long and always discover new features. I use the CHRONO 10.0 release version.

Currently, I work on the development of an autonomous vehicle simulator. I use VSG as a visual system. On top of that, I use ChSensors with lidars and cameras. In order to make lidar point clouds close to real, I use high detalised meshes for scene objects.
The problem I met is the cost.
The simulation requires a lot of memory. After some treatment and attempts at optimisation, I realized that objects I remove from ChSystem (let's say objects that are out of the field of view) still exist on the scene and never get removed. I realized that there is a way to add the object to the scene after initialization of ChVisualSystem using BindItem(). Is there any built-in method to remove objects from the scene and release the memory? I ask because I did not find it.

Thank you for your development and support of the project.
Best regards, Aleksandr Prokhorov

  

Radu Serban

unread,
May 20, 2026, 3:49:14 PM (8 days ago) May 20
to ProjectChrono

Aleksandr,

 

This feature is not yet implemented. While this is something we want to provide (as it is also needed for other capabilities we want to provide), it turns out to be trickier to implement than one might expect. But it is on our todo list, so stay tuned.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/8a82927c-7e92-4238-8373-1889ae63b532n%40googlegroups.com.

Aleksandr Prokhorov

unread,
May 21, 2026, 3:48:22 AM (8 days ago) May 21
to ProjectChrono
Dear Radu!

Thank you for your response!
If it helps for your development...

I have advanced at this direction and succeed to remove CollisionFixed, CollisionMuitable, VisualFixed, VisualMutable COMFrame and RefFrame for ChBody from the scene using functions like:

void ChVisualSystemVSG::RemoveReferenceFrame(const std::shared_ptr<ChObj>& obj) {
auto& children = m_refFrameScene->children;
auto itr = remove_if(children.begin(), children.end(), [obj](auto& child) {
std::shared_ptr<ChObj> c_obj;
child.node->getValue("Object", c_obj);
return (c_obj == obj);
});
m_refFrameScene->children.erase(itr, children.end());
}

In the end obj has been removed, but the memory still occupied...
I did not find an issue. If you have an idea I will be glad to help to The Project in this regards. 

Entire *.cpp and *.h files are attached.
ChVisualSystemVSG.cpp
ChVisualSystemVSG.h

dr.ratz...@gmail.com

unread,
1:31 AM (15 hours ago) 1:31 AM
to ProjectChrono

Aleksandr Prokhorov

unread,
4:28 AM (12 hours ago) 4:28 AM
to ProjectChrono
Thank you for the idea! 
I will try to use it!

Reply all
Reply to author
Forward
0 new messages