odrive_ros icon indicating copy to clipboard operation
odrive_ros copied to clipboard

ODrive has not been prerolled

Open eirik-strand opened this issue 5 years ago • 4 comments

All I get is a message that says its not been prerolled. What is prerolling? I'm using two scooter motors with hall sensors. 56v ODrive

  • I tried disabling it with parameter, but it still complains...
  • I have called the engage motors service (and release motors and all other services that might solve the problem)
  • The /state topic says connected
  • I can read the hall sensors for both my motors, however one starts at like -8000 counts
  • I have tried turning the wheels before publishing on /cmd_vel
  • Motor calibration does not work, it just tells me to preroll

@neomanic Thank you for the package, can you help me with this?

eirik-strand avatar Feb 19 '20 17:02 eirik-strand

@eirik-strand I have the same problem. Did you find any solutions?

bsamadi avatar Mar 02 '20 03:03 bsamadi

@eirik-strand @bsamadi I have the same problem, can you please post if you have any update on this issue?

whoobee avatar Mar 04 '20 19:03 whoobee

Hey all, sorry about that. I haven't generalised the package to work across different uses of the odrive, that was the intention behind the . Currently it requires prerolling to pickup the encoder index pulse before it can drive.

Try editing the line at https://github.com/neomanic/odrive_ros/blob/master/src/odrive_ros/odrive_node.py#L490 to be if self.has_preroll and not self.driver.has_prerolled():

If that works then I can make the change here.

neomanic avatar Mar 04 '20 23:03 neomanic

@neomanic thanks a lot for the reply It seems that the actual motor command is inhibited by this line: https://github.com/neomanic/odrive_ros/blob/65424ca0058d97ed04b032352cfb8437089a23c3/src/odrive_ros/odrive_node.py#L374

I added the following statement and now the motors are turning: if self.has_preroll and not self.driver.has_prerolled(): #ensure_prerolled(): and I set the use_preroll parameter as false in the launch file.

whoobee avatar Mar 05 '20 18:03 whoobee