After several days trying to figure out how to properly use hardpoint control I finally decided to come here asking for help.
I’m trying to send a hardpoint control over mavlink console, however I’m not succeeding at all. The can node is visible and operational, but I couldn’t do anything possible to send a hardpoint command over mavlink or QGC GUI ( I’m sniffing the can bus, no message related to hardpoint control appears)
Tried to recompile the firmware with specific defines such as config_uavcan_hardpoint_controller=y and others defines I found on the internet.
As I didn’t succeed I merged a code I found that could be able to make it work : add ability to control uavcan hardpoint by MAV_CMD_DO_GRIPPER by PonomarevDA · Pull Request #19124 · PX4/PX4-Autopilot · GitHub
Despite properly compiling, the function also didn’t succeed when I added my gripper as servo 1 on UAVCan actuators.
I would like to have some guidance as I just need to send this command (0 or 1) for specific hardpoint id present on the can bus . The code seems to be already there I just don’t know how to trigger the actions over mavlink console.
Could you please help me in understanding what I’m missing here ?
I forgot mentioning the px4 fw and hw version.
It’s 1.16.0(latest version ATM)
Hardware is a px4 FMU V5
Hi guys, I managed to make it work on mavlink terminal using the native UAVCan actuators.
What I have done, basically implemented the calls for the already existing hardpoint control and exposed the methods to be accessed on the UAVCan menu, super simple.
The topic can be closed, if anyone is interested in getting the code changes let me know I would pr.
I’m a little bit concerned about this merge. Buy I might be wrong.
I think with this implementation the way it is, it won’t be possible to actually fully access the drivers once the drivers are being modified to involve gripper messages as well.
I believe the proper way to do it is making sure the driver layer won’t be mixed with the gripper business layer.
Could you please Double check this dakejahl?
I tested for example the exposure of the drivers with mavlink console and they simple won’t work because they won’t be triggered by the gripper.
Hello @GHMO_px4 , when you mean fully access the driver are you meaning the payload_deliver/gripper driver?
This merged PR only allows receiving the vehicle command “vehicle_command_s::VEHICLE_CMD_DO_GRIPPER” and sending the hardpoint uavcan data to the node based on the specific command (open or close).
The other major difference is that instead of a raw esc command, it publishes the hardpoint message to the dronecan bus.
Are you saying you are preferring to directly access the payload_deliverer driver from uavcan instead of abstracting it away with simple vehicle commands?
One thing I haven’t figured out yet is the uavcannode side: there is no subscriber to hardpoint messages in PX4 cannode. I am not sure about ap_periph.
Dirksavage88, is there any way to discuss this topic on the Dev meeting?
The way the function was done changed directly the driver codes, and injected a gripper dependency on its files that in my understanding is not desired. So now the driver itself only works with a gripper com mmand. I’m not sure if this was the intended way, I guess it wasn’t. In my understanding there would be a secondary interface that receives the gripper messages and use the original driver(hardpoint control) to publish the messages. This change would make sure that the hardpoint control driver keeps as its original code letting others use in case they need to use with other things for example over mavlink console. But I might be wrong, so that’s why I would like to have a proper discussion about this topic.