Hi!
First, sorry for my poor english I am not a english speaker!
I use an Odrive 3.6 to drive 2 motors and the second just mirror the first one and it work perfectly.
The issue here is when I change the mirror_ratio, I use a ratio of 1 to go in straight line and one of -1 to turn, but when my pos_estimate is any other value than 0 the second motor go straight to this value * -1 that is absolutly logic. I search a way to vitualy roll back my motors to the 0 position of putting an offset without moving my motor.
I saw the set_linear_count() fonction but I don’t work, here is what I got when I type the fct:
You’re definitely doing something the “wrong way”, you should never change the mirror_ratio on the fly. What are you actually trying to do in your system?
Hi, I have two-wheeled robots, so the two axes need to be perfectly synced. I could just launch the movement at the same time, but I try to use the mirror, and it works to go in a straight line perfectly. When I need to turn, my two wheels need to rotate in an opposite way, so with the ratio of -1, it works perfectly too. The issue comes when I try to rotate after going forward, as I explained before. How can I address this?
Hey there - usually when using differential drive robots, you cannot assume the wheels will always be synchronized. The majority of wheeled robots have a higher-level controller to constantly track their position from wheel encoder data (called odometry), and then correct their overall position to follow the path they intend to. Any situation where you rely on multiple motors being perfectly synchronized is going to fail rapidly, and being able to correct for the robot’s position is important.