-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Roboclaw ESC driver #22215
Roboclaw ESC driver #22215
Conversation
I just noticed that I have some unwanted changes in RoverPositionControl.cpp that are not supposed to be there. Will fix. |
7d997c9
to
963d9d2
Compare
963d9d2
to
7d997c9
Compare
Any way to figure out how many users of this driver there are? Maybe merge it and find out how many problems are left when they start using it? I know that is dangerous. ;) |
29bfd40
to
db950df
Compare
Based on the fact it was broken before there can't be many users but we have the Aion R1 and it proves quite useful for rover testing. So we reworked the driver.
Sure, we can still contribute fixes as we go. right now I'm reviewing and probably after a final test we can move on. |
5bb2683
to
d146eb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PerFrivik for the tests and corrections! Now the directions make sense 👍
Can you remove the newlines and too specific parameters from the airframe again just keeping the ROBOCLAW_
ones?
And one last thing to check: Does the wheel already start turning with a command of 1 out of 127?
ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover
Outdated
Show resolved
Hide resolved
ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover
Outdated
Show resolved
Hide resolved
ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover
Outdated
Show resolved
Hide resolved
ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover
Outdated
Show resolved
Hide resolved
ROMFS/px4fmu_common/init.d/airframes/50003_aion_robotics_r1_rover
Outdated
Show resolved
Hide resolved
Hey @MaEtUgR Thank you for reviewing it! I hope the changes are okay now. I checked and the wheel starts turning at values between 5-7/127. |
…rified logic and error handeling
…r would not connect
Remove ActuatorControls.msg Co-authored-by: Daniel Agar <[email protected]>
The manufacturer uses both naming schemes, RoboClaw more than Roboclaw but it's always one word and hence I think it's more consistent to name it the latter.
6d82f0a
to
ce8123a
Compare
Rebased on main |
Minor CI failure here. https://github.com/PX4/PX4-Autopilot/actions/runs/6929156822/job/18846330621?pr=22215 Otherwise I'm happy to bring this in to enable more testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work on this. Let's iterate on the R1 config while testing the revised differential rover functionality.
Solved Problem
Refined the Roboclaw driver for the R1 Aion Robotics Rover with the RoboClaw 2x15A motor controller.
This update:
Solution
Switched Control Mode for Wheels:
Transitioned from duty cycle control to velocity control for the rover's wheels. This change enabled the driver to access and read the encoder data. It's noteworthy to mention that, for reasons yet to be determined, the duty cycle control did not support concurrent encoder data reading.
Introduction of RoboClawError Enum:
Implemented a RoboClawError enum class which provides defined messages for specific, predefined errors, enhancing the clarity of error feedback.
Clarified Hardcoded Message Size for Roboclaw Command:
To make the hardcoded message size more transparent and understandable, the following definition was established:
#define CMD_READ_STATUS_MESSAGE_SIZE 6
Publishing Encoder Data:
The system has been updated to publish encoder data that includes:
Direct Subscription to Control Topics:
The current implementation bypasses the control allocation and directly subscribes to two specific control topics:
The motor control gets converted within the code. This approach and control allocation skip is a temporary measure.
Rapid Startup Connection Failure
The initialization sequence of the Roboclaw driver has been adjusted. Now, if the initial connection attempt is unsuccessful after a power cycle, the driver will automatically retry the connection, ensuring consistent and reliable connectivity.
Changelog Entry
For release notes:
Context
https://youtu.be/qvCw9TRRALQ