Trouble running the ODrive tool

Hi,

I ran the following commands that are on the “getting started” guide for setting up the USB permissions on Linux (Ubuntu in my case),

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="0d[0-9][0-9]", MODE="0666"' | sudo tee /etc/udev/rules.d/50-odrive.rules
sudo udevadm control --reload-rules
sudo udevadm trigger # until you reboot you may need to do this everytime you reset the ODrive

When I ran these commands, it just asked the sudo password and thats it, as you can see here:


Now my question is if this is normal, or should it do something like the first command?

Also when I type ‘odrivetool’ and hit ‘enter’, it gives me an error, how is that possible?

thanks for reading :slightly_smiling_face:

Greetings Stijn :wink:

Hi Stijn, I had the same output, until I restarted Odrive/PC/PSU.

NO operations unfortunately, but at least some minor feedback under --verbose

Sorry doesn’t help much :frowning:

Regards Jerry

I’ve reinstalled everything and still nothing :frowning_face:

I hope somebody else has a solution for me.

Greetings Stijn

Hi Stijn, Finally mine is working (of sorts), this time on WIN10 “yes I know” I figured the XSim software is in windoze, I would have to find a way, because if no communication happens on win10, then the sim wont work.

SO thus far (attached image)

And now a question???
In [8]: odrv0.axis0.controller.pos_setpoint = 10000

at this point nothing happens, isnt the motor supposed to revolve???

Some clarity would be nice.

Regards Jerry.

I do think it should revolve now yes …

Do you have a screenshot of what you typed in the terminal to get this far? What do you have to write to start the odrivetool?

greetings Stijn

Hi Stijn,
1/ Do you mean getting ODrive to communicate?

2/ or the point where the motor doesn’t respond??

Following is 2//
I attached an image on the last post,
1/ for the drive manager, and 2/ for ODrive, you should be able to see text clear enough.

Regards Jerry,

I ran all the commands that are in the getting started guide but when I run the command ‘odrivetool’ and hit enter, it says ‘odrivetool: command not found’

How is this possible, what did I do wrong?

thanks for helping

HI Stijn, I had many challenges at first using linux, Ubuntu 16.04 (nothing) Mint 17.04 (nothing) and now Buntu 18 which has some kind of comms!

I will now switch to Ubuntu 18 and see what I get?

see you in a while?

Regards Jerry

Okay thanks, I will keep an eye out on the community

thanks

:wink:

Hi Stijn, did you have challenges installing Python? as that was my issues with mint and buntu 16, and not until I used buntu 18 everything installed smoothly.

From there for me it was finding the ODrive firstly to see if it was actually communicating.

Sudo odrivetool --verbose

Output: ODrive control utility v0.4.1
Waiting for ODrive…
USB discover loop
ConfigurationValue 1
InterfaceNumber 0,0
EndpointAddress 130
InterfaceNumber 1,0
EndpointAddress 1
EndpointAddress 129
InterfaceNumber 2,0
EndpointAddress 3
EndpointAddress 131

Kernel Driver was not attached
EndpointAddress for writing 3
EndpointAddress for reading 131
Connecting to device on USB device bus 2 device 4
Please connect your ODrive.
You can also type help() or quit().

then

Sudo isusb -v
Below the bus and device is a match with ODrive output, however it does not mention ODrive, so something is screwed up!!

Bus 002 Device 004: ID 1209:0d32 InterBiometrics
Couldn’t open device, some information will be missing
Device Descriptor:

Then dmesg and search (shift+Ctrl+F) for ODrive.

Product: ODrive 3.5 CDC Interface
[ 2.379291] usb 2-1.4: Manufacturer: ODrive Robotics
[ 2.379292] usb 2-1.4: SerialNumber: 205C36873548

The question is the CDC Interface the problem?

I hope this will give you a step forward :smiley:

Regards Jerry

thanks, I will try this when I get home. I thinks I have the latest version of Ubuntu installed so that shouldn’t be the problem, But I didn’t know you needed to enter ‘odrivetool --verbose’, I haven’t seen that anywhere in the getting started guide.

I will update you soon!

greetings Stijn

And now a question???
In [8]: odrv0.axis0.controller.pos_setpoint = 10000
at this point nothing happens, isnt the motor supposed to revolve???

No, you need to set the requested_state into closed loop mode before it’ll respond to setpoint commands.

Thank you Metanoic, I found this out at around 1:40 this morning, was determined to get it to move, and it did; however it took 20min before I could get it to stop.

So; is there a stop command?

And secondly, is there a speed command? I would like it to produce 400RPM’s

Thanks again
Retards Jerry :grinning:

You can set the requested_state to idle to stop everything. There is a speed command, in the sense that you can put it into velocity mode (controller.config.control_mode) and set the velocity setpoint accordingly (controller.set_vel_setpoint). The velocity is set in encoder counts per second.

Thank you again Metanoic, I will try this evening when I get home.

Regards Jerry :smiley:

It looks like you dont have odrivetool in your path. Find the location of odrivetool on your disk, mine was /home/debian/.local/bin/odrivetool. (you can search for it with find / -type f -name "odrivetool")

Then add /home/debian/.local/bin/ to path by opening .bashrc with some texteditor, nano for example: nano .bashrc. At the bottom of the file add PATH=$PATH:<path to odrivetool>. so in my case PATH=$PATH:/home/debian/.local/bin/ then save and exit. Then do source .bashrc and odrivetool should work as expected.