Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODrive has not been prerolled #15

Open
eirik-strand opened this issue Feb 19, 2020 · 4 comments
Open

ODrive has not been prerolled #15

eirik-strand opened this issue Feb 19, 2020 · 4 comments

Comments

@eirik-strand
Copy link

eirik-strand commented Feb 19, 2020

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?

@bsamadi
Copy link
Contributor

bsamadi commented Mar 2, 2020

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

@whoobee
Copy link

whoobee commented Mar 4, 2020

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

@neomanic
Copy link
Owner

neomanic commented Mar 4, 2020

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.

@whoobee
Copy link

whoobee commented Mar 5, 2020

@neomanic thanks a lot for the reply
It seems that the actual motor command is inhibited by this line:

if not self.driver.has_prerolled(): #ensure_prerolled():

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants