then you can do what i did to get the same chassis to work in both opcontrol and auton. Here is the topic i posted on it. You can ignore the LVGL stuff if you want but the repo shows how to use pointers to access the chassis across files. The alternate way is to create your own chassis class which i think is harder to understand.
Forgive me if I’m wrong, but I’m not sure how this applies to the situation. The problem isn’t using the drive for auton and opcontrol, but that defining the wheel diameter and wheelbase width doesn’t work when using units.
Actually, no units are working with Okapilib now that I’ve tested it. I tried to define a motor by using 8_rmtr, and it gave me the same problem.
I understand you just have a problem with “ChassisControllerFactory::create”, but the only example i have working is the one using pointers. I don’t see an error in what you have … unless the “4_in” should be “4.0_in”.
I can try to create an okapi example self contained to main.c (pros 3.2.0), if you’d like.