Skip to content

implement cannode hardpoint commands#26334

Open
dirksavage88 wants to merge 4 commits intoPX4:mainfrom
dirksavage88:pr-cannode_hardpoint
Open

implement cannode hardpoint commands#26334
dirksavage88 wants to merge 4 commits intoPX4:mainfrom
dirksavage88:pr-cannode_hardpoint

Conversation

@dirksavage88
Copy link
Contributor

Solved Problem

UAVCANNODE in px4 does not handle the hardpoint commands currently, only servo and motor array commands

Solution

Create a separate hardpoint command subscriber in the cannode driver

Changelog Entry

For release notes:

Feature: Implement cannode hardpoint subscriber
Documentation: PX4 cannode hardpoint command support

Alternatives

Test coverage

Context

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
@dirksavage88 dirksavage88 requested a review from dakejahl January 23, 2026 17:05

config UAVCANNODE_HARDPOINT_COMMAND
bool "Include hardpoint commands"
default n
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to enable it on any board?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have been testing on the ark cannode. It seems to have enough flash onboard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to the ark cannode


} // end else

} // end else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of separate if/else blocks with duplicate logic you could instead get clever with the for loop, when it's broadcast you set the bounds from 0 to actuator_servos_s::NUM_CONTROLS and when it's targeted you'd set the bounds from servo_id to servo_id+1 (therefore the loop starts at the servo_id and ends immediately after)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes to hopefully simplify

dirksavage88 and others added 2 commits January 24, 2026 16:00
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
@hamishwillee
Copy link
Contributor

I assume this will need docs?

…dcast

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
@dirksavage88
Copy link
Contributor Author

dirksavage88 commented Jan 30, 2026

@dakejahl the hardpoint id is never set in the payload deliverer module. According to mavlink spec, hardpoint id of 0 is broadcast. and that is what I am seeing as the default as it is never explicitly set (param1):

vcmd.command = vehicle_command_s::VEHICLE_CMD_DO_GRIPPER;

Mavlink spec for gripper: https://mavlink.io/en/messages/common.html#MAV_CMD_DO_GRIPPER

@dirksavage88
Copy link
Contributor Author

I assume this will need docs?

Yes, there are no docs currently on hardpoint via dronecan

@dirksavage88 dirksavage88 requested a review from dakejahl January 30, 2026 16:14
@dirksavage88
Copy link
Contributor Author

@alexcekay would you mind looking this over? I think Jacob Dahl is on vacation.

@hamishwillee
Copy link
Contributor

I assume this will need docs?

Yes, there are no docs currently on hardpoint via dronecan

@dirksavage88 Great. I will leave for you to create and I will subedit. So "hardpoint" means "autopilot-connected" with a specific identity?

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

Successfully merging this pull request may close these issues.

3 participants