Does anyone know how I can run the start_liveplotter alongside a python code?
Because when I run the liveplotter in odrivetool, my python code cannot connect to the odrive with odrive.find_any() and I cannot run my code to perform motor movements and track the real time motor current supplied to the motor at the same time…
Ok so Oskar replied me on discord and i guess I will paste his reply here.
“You could launch your script while in the interactive odrivetool prompt using the %run command.
You can just cd to the correct folder that contains your script first, then run odrivetool in that folder, then it should just be %run yourscript.py”
I Tried doing this but it returns me a name error “odrv0 not defined” which is weird since the odrivetool has already connected to my odrive as odrv0, why can’t it define it?
Solution:
in ur python code type this in -> from odrive.utils import start_liveplotter
create a function that calls the start_liveplotter