Hello, You did not receive yet an answer because your question was not well formulated. You are asking about “creating a new suspension in ChDoubleWishbone”. That does not make sense, given how the Chrono::Vehicle is designed and what the meaning of a subsystem template is. You may want to consult the online documentation (https://api.projectchrono.org/manual_vehicle.html) and/or the paper (https://projectchrono.org/assets/white_papers/chronoVehicle_IJVP.pdf) to familiarize yourself with the architecture and design of Chrono::Vehicle. You will then understand that each subsystem template imposes a given topology of the mechanical system for that particular subsystem. This means a specific number of bodies, joints, and force elements and a fixed connectivity between these. The hardpoints that are part of the definition of a given subsystem (in this case the double wishbone suspension subsystem implemented in ChDoubleWishbone) are therefore the complete set that is needed to specify this topology.
Therefore, the question is why you want to add a new hardpoint. I doubt it is just for monitoring a location on a particular body of that type of suspension (if that is the case, you can simply get a handle to that body by its name and then invoke an appropriate Chrono API function to get the absolute location of some point specified through its local position on that body). Instead, I suspect you want to use that point to add some other modeling component to the suspension subsystem. If that is the case, that will not be a ChDoubleWishbone suspension, but rather a new suspension template (like the many we already have in Chrono::Vehicle, each one of them with a different topology). Creating a new vehicle subsystem template requires adding new files to the Chrono code base and modifying some others so that the new subsystem type becomes available for use in vehicle models. That’s obviously not a simple task and requires a deeper understanding of the code. Alternatively, only for wheeled vehicle suspension, I recently added a “generic” template which allows a user to construct a new suspension topology by specifying (in a derived class or else through a JSON file) an arbitrary number of bodies, joints, force elements, etc. as well as their connectivity. As I said above, I am not absolutely clear on what you are trying to achieve, but if what you want is your own custom suspension subsystem, this is the route I suggest for you. This “generic” template is named ChGenericWheeledSuspension<https://github.com/projectchrono/chrono/blob/main/src/chrono_vehicle/wheeled_vehicle/suspension/ChGenericWheeledSuspension.h> and the derived class that can build one from a JSON specification is implemented in GenericWheeledSuspension<https://github.com/projectchrono/chrono/blob/main/src/chrono_vehicle/wheeled_vehicle/suspension/GenericWheeledSuspension.h>. There are two JSON samples to illustrate how you can use this mechanism for constructing your own, custom suspension: * HMMWV_DoubleWishboneFront_replica.json<https://github.com/projectchrono/chrono/blob/main/data/vehicle/hmmwv/suspension/HMMWV_DoubleWishboneFront_replica.json> – which replicates the double wishbone suspension on the front of a HMMWV. * UAZBUS_FrontSAELeafspringAxle_replica.json<https://github.com/projectchrono/chrono/blob/main/data/vehicle/uaz/suspension/UAZBUS_FrontSAELeafspringAxle_replica.json> – which replicates the same topology as the SAELeafspringAxle suspension on the front of a UAZ vehicle. These two samples are for illustration only, as they simply replicate already existing suspension templates. But you could now modify any of them, e.g., by adding new bodies, or additional springs, etc, and get a completely new suspension topology. Since you seem interested in a slightly modified double wishbone suspension, you should probably start from the 1st one I listed above. You can read more about this new mechanism for creating a generic suspension topology in the Chrono ChangeLog<https://github.com/projectchrono/chrono/blob/main/CHANGELOG.md#added-new-generic-template-for-wheeled-suspension-subsystems> file. Best, Radu From: '马浩楠' via ProjectChrono <[email protected]> Sent: Wednesday, September 20, 2023 9:05 AM To: ProjectChrono <[email protected]> Subject: [chrono] I have a question about "void getLocation" when using the Chrono vehicle I want to add a "UCA_UF" to the enum PointId in ChDoubleWishbone.h, which means "Location Upright Front". What I want to know is that in "Initialize", I need to calculate the position of "UCA_UF". Is it possible to do this using getLocation, or do we need to calculate it manually? -- 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 [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/b3fb67bc-5492-4331-aee1-0e94e675d419n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/b3fb67bc-5492-4331-aee1-0e94e675d419n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237048432604C7977341F92A7F8A%40PH0PR06MB8237.namprd06.prod.outlook.com.
