I have made it through the initial set-up following the getting started guide.
Since, I have wired up the ODrive using UART_A to a teensy 4.1 on RX1/TX1. (Of course Odrive.RX → Teensy.TX and vice-versa)
I’m wondering if anyone has attempted something similar before, controlling an ODrive with a Teensy via Serial!?
Or while I’m writing this and also researching a bit online, I came across
which seems to be a perfect fit.
But that would mean I need to wire the ODrive via USB to the NVIDIA Jetson Nano, as there is no serial implementation as of now.
The Teensy is running microRos and will be the low-level control node of the system, handling all sensors, lights, and motor control.
An NVIDIA Jetson Nano will be the higher level control node, running ROS2 and publishing to the cmd_vel topic, to which the Teensy is subscribed.
Questions regarding ODrive via Teensy 4.1 serial:
The following questions come to mind, that I’m hoping some of you would kindly provide some insight on.
- How to reverse one of the odrives axis, so that both spin into forward direction of the bot.
Meaning axis0 (Right motor = CW), axis1 (Left motor = CCW) looking at the motor shaft where the wheel mounts.
Or would you simply send the “reversed” command?
- What control-mode is best to use? I’m pending between position and velocity control. As Odrive is unaware of position, the higher
control system will constantly tell the Teensy (which tells the Odrive) to move forward 12mm, 10mm, 9mm, 6mm… until stop.
But then again, I’m wondering if the bot needs to make a turn and axis1 needs to only move half as fast as axis0 or 1/3rd of the way?? How fast would the Odrive move?
Argghh. I’m confused!
a) position control (This is my guess)
b) velocity control
c) torque control
- Am I right that I constatly going to tell each odrv.axis how fast or to what position it is supposed to move?
Kind of like this (msg1=axis0.moveX, axis1.moveXX, msg2=axis0.move-X, axis1.moveX, and so on)
Questions regarding ODrive via NVIDIA Jetson Nano USB:
- I see the git repository (“Factor-Robotics/odrive_ros2_control”) is currently with ROS2-Humble up to fw 0.5.3 and I just updated to fw 0.5.5 (D’oh)
Is this going to be a show stopper, or can I downgrade ODrive? Could very well be that it also works, just won’t support all new features?
- Does anyone know of another good github repo / ROS2 package for controlling ODrive? I’m sure there are multiple variations?!
Using / controlling the ODrive directly from Jetson Nano would also have benefits:
- Advantage in timing, by avoiding going from Jetson → Teensy → ODrive. or is it negliglable?
- direct connection to ODrive allows using odrivetool at anytime via the Jetson, without unplugging from Teensy and plugging into PC.
Thanks for any directions on this!