Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ROMFS/px4fmu_common/init.d-posix/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,7 @@ then
gyro_calibration start
fi

# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
payload_deliverer start

if param compare -s ICE_EN 1
then
Expand Down
6 changes: 1 addition & 5 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,7 @@ else
px4flow start -X &
fi

# Payload deliverer module if gripper is enabled
if param compare -s PD_GRIPPER_EN 1
then
payload_deliverer start
fi
payload_deliverer start

if param compare -s ICE_EN 1
then
Expand Down
1 change: 1 addition & 0 deletions boards/ark/fmu-v6x/default.px4board
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_NAVIGATOR=y
CONFIG_NUM_MISSION_ITMES_SUPPORTED=1000
CONFIG_MODULES_PAYLOAD_DELIVERER=y
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_ROVER_POS_CONTROL=y
CONFIG_MODULES_SENSORS=y
Expand Down
2 changes: 1 addition & 1 deletion docs/en/peripherals/gripper.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ MAVLink applications, such as ground stations, can also control the gripper usin

PX4 gripper support is tied to the package delivery feature, which must be enabled and configured in order to be able to use a gripper.

1. Set [PD_GRIPPER_EN](../advanced_config/parameter_reference.md#PD_GRIPPER_EN) parameter to 1 (reboot required after change).
1. Ensure your board has the Payload Deliverer module enabled: CONFIG_MODULES_PAYLOAD_DELIVERER.
1. Set [PD_GRIPPER_TYPE](../advanced_config/parameter_reference.md#PD_GRIPPER_TYPE) to match your gripper.
For example, set to `Servo` for a [Servo Gripper](gripper_servo.md).

Expand Down
9 changes: 1 addition & 8 deletions src/modules/payload_deliverer/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ parameters:
definitions:

# Gripper configuration
PD_GRIPPER_EN:
description:
short: Enable Gripper actuation in Payload Deliverer
type: boolean
default: 0
reboot_required: true

PD_GRIPPER_TYPE:
description:
short: Type of Gripper (Servo, etc.)
Expand All @@ -34,4 +27,4 @@ parameters:
type: float
unit: s
min: 0
default: 3
default: 1
2 changes: 1 addition & 1 deletion src/modules/payload_deliverer/payload_deliverer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool PayloadDeliverer::init()
void PayloadDeliverer::configure_gripper()
{
// If gripper instance is invalid, and user enabled the gripper, try initializing it
if (!_gripper.is_valid() && _param_gripper_enable.get()) {
if (!_gripper.is_valid()) {
GripperConfig config{};
config.type = (GripperConfig::GripperType)_param_gripper_type.get();
config.sensor = GripperConfig::GripperSensorType::NONE; // Feedback sensor isn't supported for now
Expand Down
5 changes: 2 additions & 3 deletions src/modules/payload_deliverer/payload_deliverer.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class PayloadDeliverer : public ModuleBase<PayloadDeliverer>, public ModuleParam
/**
* @brief Initialize or deinitialize gripper instance based on parameter settings
*
* Depending on `PD_GRIPPER_EN` and the state of `_gripper` instance, this function will
* Depending on the state of `_gripper` instance, this function will
* either try to initialize or de-initialize the gripper appropriately.
*/
void configure_gripper();
Expand Down Expand Up @@ -159,7 +159,6 @@ class PayloadDeliverer : public ModuleBase<PayloadDeliverer>, public ModuleParam

DEFINE_PARAMETERS(
(ParamFloat<px4::params::PD_GRIPPER_TO>) _param_gripper_timeout_s,
(ParamInt<px4::params::PD_GRIPPER_TYPE>) _param_gripper_type,
(ParamBool<px4::params::PD_GRIPPER_EN>) _param_gripper_enable
(ParamInt<px4::params::PD_GRIPPER_TYPE>) _param_gripper_type
)
};
Loading