Combat Robotics Driving Simulator Help

46 views
Skip to first unread message

Aidan Powers

unread,
Jun 2, 2023, 7:49:50 PM6/2/23
to ProjectChrono
Hey all,

I am attempting to use PyChrono as a way to create a driving simulator for battlebots.
The reason for this is the bots are quite expensive, and hard to test safely, so It would be nice to do it virtually.

I plan on competing this project in 3 steps.

Step 1: 4wd no gyro
Bots like Original Sin are simple skid steering RC cars with no suspension and 4 soft wheels to stay in contact with the floor
https://www.youtube.com/watch?v=SlqG6c5tJ9U

Step 2: 4wd with gyro
Bots like Hypershock and Endgame have the same drive train, but with an added weapon which acts like a flywheel. This significantly impacts driving and can cause the bot to rise off the ground when turning.
https://www.youtube.com/watch?v=rwENWWaJwVg

Step 3: 2wd with gyro
2wd bots like Minotaur have additional difficulty as the 3rd point of contact is not a wheel, but rather the chassis. Minotaur also uses the gyroscopic forces to great effect, as demonstrated in this fight.
https://www.youtube.com/watch?v=QOJMUAixbCQ

I am currently failing at step 1, and would appreciate any advice the community has to give.
Currently I am not understanding ChBodyEasyCylinder, and when I try the ChBody, nothing renders.
The below link is to my GitHub with the work in progress code.
https://github.com/AidanPowers/DrivingEmulator/blob/main/4Wheel.py

Thank you,
Aidan Powers

Radu Serban

unread,
Jun 3, 2023, 4:08:19 AM6/3/23
to ProjectChrono

Aidan,

 

A ChBodyEasyCylinder is just a convenience class to create a ChBody with a cylindrical visualization and/or collision shape.  You can do the exact same thing yourself in your user code creating a ChBody and then attaching a cylindrical visualization shape and a cylindrical collision shape.  Of course, the latter route is more general and flexible as you have full control on the visualization and collision models you attach to your body.

 

I only took a quick look at your code.  To get any visualization, you must use the Irrlicht PyChrono module (this is the only one exposed to PyChrono; the C++ Chrono base code has other options).  You don’t have any of that in your code.

 

The best way to get started with Chrono and PyChrono is by looking at the demos that are bundled with the code.  For PyChrono, look at demos in the appropriate place (depending on how you installed PyChrono). See https://api.projectchrono.org/tutorial_table_of_content_pychrono.html

 

Having said that, for the type of work you plan, I think you’ll be better off working with the core C++ Chrono libraries.  PyChrono wraps only some of the Chrono functionality (for several reasons, including Python limitations). 

 

--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 on the web visit https://groups.google.com/d/msgid/projectchrono/ab9316cc-b45b-4ac3-91e3-bdc6d3061a46n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages