-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
add ability to control uavcan hardpoint by MAV_CMD_DO_GRIPPER #19124
base: main
Are you sure you want to change the base?
Conversation
e075cda
to
744ec1b
Compare
744ec1b
to
7014dcd
Compare
Wow totally missed this! Gripper support was added in #19963 |
@junwoo091400 Thanks that you notified about it. Probably, I could leave only dronecan related part in this PR. |
Hey @junwoo091400 does gripper support uavcan control or does that still need to be added? I couldn't find documentation on canbus with gripper |
It only responds to MAV_CMD_DO_GRIPPER as vehicle command. Not sure when related UAVCAN message is received, it gets translated into that vehicle command. If that's not the case it isn't supported yet. |
…ring mission and removed send_command() dedicated for usage via mavlink console
7014dcd
to
26d3010
Compare
Hi, @benjinne. I've rebased the branch. I don't have an EPM v3 device, but I have a node that can subscribe on the hardpoint message and control a servo. I uploaded this branch to cuav v5+ and reset everything to default. It works as I expected as well. On this video I send commands to release and to grab: https://youtu.be/1npnHknUpq8. Can you please give a try to this branch with your device? Is it what you need? |
I rely on https://dronecan.github.io/Specification/7._List_of_standard_data_types/#uavcanequipmenthardpoint |
@PonomarevDA When this goes in, can you please add a docs update? Docs affected by gripper are:
We'd also add specific hardware to this list: https://docs.px4.io/main/en/dronecan/#supported-hardware And last of all, a line to https://docs.px4.io/main/en/releases/main.html to record the change Ideally you might have a topic like https://docs.px4.io/main/en/peripherals/gripper_servo.html - but what I'm mostly after is making sure that we make it clear how you configure a uavcan gripper for use via MAVLink and in a package delivery context. If it can't be used in package delivery we need to make that clear. |
@hamishwillee Sure, I can add it. First, I will improve the docs of the mentioned device (the device itself is just a CAN-PWM converter, and a gripper is one of the ways how we can use it). Then I will add it to the PX4 docs. |
Describe problem solved by this pull request
This PR allow to control a gripper based on uavcan via mavlink
MAV_CMD_DO_GRIPPER
command in both mission (as waypoint) and manual (by just sending the command) modes.The old version of uavcan/hardpoint was supposed to be used via mavlink console that in my opinion was not user-friendly. It was even removed from uavcan_main.cpp recently.
Describe your solution
I extended navigator a little bit. Now uavcan/hardpoint periodically checks
vehicle_command
. If it isVEHICLE_CMD_DO_GRIPPER
, it starts sending uavcan/hardpoint message with a small rate.Besides changes in PX4-Autopilot firmware it is also necessary to ublock Gripper waypoint in QGC. It might be fine to implement some additional widget to manually control a gripper (I attached an example of such widget in the video below).
Describe possible alternatives
During the real tests it was found out that it's a bit uncomfortable to manually add delays before and after each of the gripper command. As I see, the next step might be:
MAV_CMD_DO_GRIPPER
parameters.But as for me, current solution is enough for the beginning.
Test data / coverage
Manual control was tested on this branch: video.
Mission was tested in the uavcan simulator based on cuav v5+ on test branch: video illustration and log.
We also have several real tests on v1.12.1 with this feature.