Steerable RigidSuspension

65 views
Skip to first unread message

Marco Capusso

unread,
Aug 20, 2025, 2:09:33 PMAug 20
to ProjectChrono
Hello everyone I am quite new to Project Chrono so I might be missing something,
I am currently using pychrono to implement the simulation of a Kart to use with a reinforcement learning agent to drive the kart.

I was trying to implement front and rear ends as close to reality as possible and for that I chose RigidSuspensions both for front and rear.
At the front I implemented a RackPinion steering to emulate the Kart steering system.

With the double wishbone i was able to get the kart to run and steer correctly in the simulation but when I implement the RigidSuspension it does move the steering bar but does not rotate the wheels. Is the RigidSuspension able to implement steering mechanisms? Do I just have to change the connection positions?

From the image you can see the steering bar moved according to the steering input, but the wheels position remained untouched.

If needed I can attach all my JSONs used for the configuration,

Thanks in advance,

img.png

Harry ZHANG

unread,
Aug 24, 2025, 8:47:06 PMAug 24
to ProjectChrono
Hey Macro,

Regarding the RL part, in my mind, the most useful resource in this case would be gym-chrono (https://github.com/projectchrono/gym-chrono). Not sure what your RL policy wants to achieve, for instance, do you want to train a vehicle agent doing trajectory tracking, or goal reaching with obstacle avoidance, etc. But I would say the example existing in gym-chrono repo could give you a jump start on this. Two things I want to highlight about gym-chrono
  1. It uses stable-baseline3 as RL algorithm library and gymnasium environment. While you might choose other RL libraries, the example provides a guide how to wrap up chrono physics engine as RL training environment (gym environment) that has key functions such as step, get_observation, etc. 
  2. Check out the example https://github.com/projectchrono/gym-chrono/blob/master/gym_chrono/envs/wheeled/off_road_gator.py. This setup an environment for Gator vehicle doing obstacle avoidance while reaching target position, which utilize chrono's vehicle, sensor support in the physics engine. I would recommend use it as template for setting up RL problem with Chrono.

Let me know if you have further questions.

Best,
Harry  

Radu Serban

unread,
Aug 25, 2025, 7:36:09 PMAug 25
to ProjectChrono

Marco,

 

To answer your actual question:  not all suspension templates in Chrono::Vehicle are *steerable*.  ChRigidSuspension in particular cannot be attached to a steering mechanism.  This is because the topology of the mechanical system described by this template simply does not provide the necessary degrees of freedom for steering.  This also means that this suspension template is *not* appropriate for modeling your vehicle.  In other words, the front suspension mechanism on your vehicle has additional bodies that are not part of the ChRigidSuspension template.  Those bodies are likely knuckles that provide the necessary steering DOFs and to which a steering mechanism can be attached.  You will need to figure out if there is a more suitable suspension template in Chrono::Vehicle and use that,  If none is appropriate, you can model your own using an appropriate JSON specification input file with the ChGenericWheeledSuspension (butfr that, you must first understand the mechanism that you try to model).

 

--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/ae5a96f5-cf27-420b-b071-efa0321fddcbn%40googlegroups.com.

Marco Capusso

unread,
Aug 27, 2025, 4:16:46 AMAug 27
to Radu Serban, ProjectChrono
Hello! Thank you both for the useful responses, I will definitely give a look st the RL examples first and then go more in depth with the Kart dynamics,
Thanks again for the support,

Reply all
Reply to author
Forward
0 new messages