Inheritance from ChVehicle in pychrono

39 views
Skip to first unread message

James Roche

unread,
Feb 23, 2024, 10:09:21 AM2/23/24
to ProjectChrono
Hi
I am trying to create a derived class based on ChVehicle in pychrono so that I can build a bespoke vehicle type (neither wheeled or tracked) and make use of the base functionality of ChVehicle.

However if I create a class in python that inherits from ChVehicle and then try and call methods associated with ChVehicle e.g.

self.SetName("some string")

I get 

I understand this to mean that the first argument (in this case self) is a pointer to ChVehicle and not the object itself but I am unsure how/if I can get to the address from Python.

Any guidance gratefully received.

Kind Regards,
James

Reply all
Reply to author
Forward
0 new messages