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

i cant set the velocity to axis1 , out of loop close #32

Closed
bakiiir opened this issue Jun 7, 2023 · 8 comments
Closed

i cant set the velocity to axis1 , out of loop close #32

bakiiir opened this issue Jun 7, 2023 · 8 comments

Comments

@bakiiir
Copy link

bakiiir commented Jun 7, 2023

Hey, I have two hoverboard motors and an ODrive. I calibrated the two brushless motors as mentioned in the ODrive documentation. Now, I want to use these motors in ROS. I'm using the ODrive with the odrive_ros2_control package. However, I'm facing an issue where I can only control the velocity of axis0 (joint0). After 5 seconds of loading the controller, joint1 of axis1 goes out of closed-loop control and i cant set the velocity to this joint1
Screenshot from 2023-06-08 00-48-54
Can you suggest where the problem might be? I have used the same diffbot odrive_ros2_control. If you have any questions, please leave a comment and I will provide more information."

@bakiiir
Copy link
Author

bakiiir commented Jun 8, 2023

i have video for this because it +10 mb i cant upload

@bakiiir
Copy link
Author

bakiiir commented Jun 8, 2023

i dont know if someone is working in odrive in ROS i just wanna know why the axis0 and axis1 go out from control loop its start normaly but after while the two axis go out and when i send the velocity the hoverboard motor dont move

@bakiiir
Copy link
Author

bakiiir commented Jun 8, 2023

just update :
i think i got the problem where is so when i set the watchdog with same time or deseable for both of axis the axis0 run normly and the axis 1 go out but when i increase the watch dog of the axis1 the axis 0 go out so how i can solve this problem ? i use the same exemple of diffbot with the real odrive (the enabling of watchdog is the urdf and in the configuration of odrive from odrivetool)

@borongyuan
Copy link
Member

Yes, watchdog_timeout may still be too short on some platforms. We set up the watchdog in on_init() and feed the dog in on_activate() and write(). So, if you take too long to start, you may not be able to feed the dog in time. The current problem of long startup time is most likely caused by DDS. See #28 (comment).

@bakiiir
Copy link
Author

bakiiir commented Jun 9, 2023

thanks for replaying @borongyuan but my problem is not take to long to startup , it start the odrive in time but one of the axis go out of control after while !
i will give u exemple i use Diffbot exmple with the real odrive and two hoverboard motor when i launch the launch file the odrive is ready and the two of the axis is in the close loop after i use teleop to send the velocity to start driving the motor the both axis start togather and after 5s the axis 1 go out of control and go out of close control (spin in the idle mode) so what's the problem here ????

@bakiiir
Copy link
Author

bakiiir commented Jun 9, 2023

this is my terminal when i launch diffbot launc file that u provide in your
Screenshot from 2023-06-09 14-57-52
and when i have to send the velocity command i use telop
Screenshot from 2023-06-09 14-58-31
and i have set my DDS communication before because i have used nav2 to this :
Screenshot from 2023-06-09 15-09-42

i have video for my similation running but i cant post it here can u give me your email to give u permition to see it in Google drive
My setUp is:
ROS Humble and my odrive firmware is 0.5.1
Ubuntu 22.04
thanks for your time 👍

@borongyuan
Copy link
Member

This is most likely an issue releated to watchdog and real-time communication. Linux system is not a real-time system unless the real-time patch is applied. The default configuration of DDS can also cause various problems. So you are using Cyclone DDS. Good choice. Most people find it causes less problems than Fast RTPS. You can refer to the documentation of DDS Tuning information. These will only help you reduce the chances of failures. We need to further investigate the reason. I have also encountered single axis failures before, but very occasionally. If I remember correctly, it is also under the Humble+Cyclone DDS environment. Another thing you can check is, after the failures, shut down ros processes, use odrivetool to dump_errors(). Please check if there are only watchdog related errors. If so, disable watchdog in URDF to temporarily avoid this problem. I'll change the USB communication to asynchronous later to improve performance, but I can't guarantee completion time.

@bakiiir
Copy link
Author

bakiiir commented Jun 15, 2023

hey MR @borongyuan the issue was solved by soldring capasitor in the both of the M1 and M0 (the value of capasitor is 22nF and for me i use 47nf ) u can check th odrive community the error is given [ERROR_ILLEGAL_HALL_STATE]. you can the this link to read more about error

@bakiiir bakiiir closed this as completed Jun 15, 2023
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

2 participants