Control Mode Recommendation for Joystick Input?

Hello everyone. At the moment I am helping students use ODrive for engineering projects. I am still quite new to the platform, but I have been digging around the firmware and have gone through most of the documentation. We have quite a few projects that require joystick input to control the motors.

For a simple example, we have a joystick’s x-axis controlling the speed of motor by itself. The further the joystick is pushed to the left equals faster motor speed counterclockwise and vice versa for clockwise rotation. Currently, we have been implementing this in python using pure velocity control in a while loop with a small sleep (100ms) in between setting the input velocity. Is this the best way to go about it? The motor seems to be running smoothly and as intended, but I would love to hear about other approaches.

The more complicated example involves using the x and y axes of our joystick to command two motors each on lead screws (think a 2D drawing machine like this one). Would it be recommended to use velocity control or filtered position control for a situation like this? We would implement out-of-bounds/wall checking for both and do not need the motors to move particularly fast. If anything, slow and smooth is better than fast and jerky, but fast and smooth would be great.

Any info and suggestions would be greatly appreciated. This is my first time using a motor controller and I am learning a ton from this forum, thank you!

Hello, did you have any success with the joystick steering input? I’m trying similar with a steering arm (similar to Segway), which outputs a 5v voltage range, +2.5v for Right, -2.5v for Left. I don’t know which pins to connect to or how to add suitable code to the oDrive to accept the voltages for left and right.