Can't get Trajectory Control to Work

I’ve been using the ODrive 3.5 (v0.4.7) in position control mode with the function odrv0.axis0.controller.pos_setpoint and it works great but I can’t seem to get Trajectory control to work following the ODrive documentation. I’m using the D6374 150KV and 8192 CPM encoder from the odrive shop.

When I try to look at/set the parameters for trajectory control through odrivetool I get this:

In [23]: odrv0.axis0.trap_traj.config.vel_limit

AttributeError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\fibre\shell.py in
----> 1 odrv0.axis0.trap_traj.config.vel_limit

~\Anaconda3\lib\site-packages\fibre\remote_object.py in getattribute(self, name)
243 return attr
244 else:
–> 245 return object.getattribute(self, name)
246 #raise AttributeError(“Attribute {} not found”.format(name))
247

AttributeError: ‘RemoteObject’ object has no attribute ‘trap_traj’

and when I try to use the move_to_pos function I get this:

In [18]: odrv0.axis0.controller.move_to_pos(50)

AttributeError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\fibre\shell.py in
----> 1 odrv0.axis0.controller.move_to_pos(50)

~\Anaconda3\lib\site-packages\fibre\remote_object.py in getattribute(self, name)
243 return attr
244 else:
–> 245 return object.getattribute(self, name)
246 #raise AttributeError(“Attribute {} not found”.format(name))
247

AttributeError: ‘RemoteObject’ object has no attribute ‘move_to_pos’

Is there something I’m missing? Suggested path forward? Thanks so much!

Please type odrv0 press enter, and paste the contents here. I suspect the issue is that although you have a fairly recent version of odrivetool, your firmware may be out of date.

Start by updating odrivetool to version 0.4.8: pip install odrive --upgrade

Then you can do a firmware update: odrivetool dfu

Ah gotcha, I was wondering if that might be the issue, i’ll give it a shot!