Skip to content

Proposal: Add joy_event_publisher node for semantic button event detection (single press/double press/long hold) #303

@airfield20

Description

@airfield20

I'm not sure if this is the correct place to submit a proposal like this and I'm not used to contributing to open source so please let me know.

Summary:

Add a node that users have the option of adding into their joystick control pipeline that automatically debounces buttons (based on a set of defined timing parameters) and detects specific types of input (double presses, long holds, release after held). Semantic events will all be published as a Joy_event message.

Motivation:

Usually this logic is either written over and over again in each individual node that interacts with the joystick or users are writing a joystick message parser that triggers other nodes using messages, services, or actions. Writing the same logic over and over is unnecessary repeat work and expensive to maintain. A centralized joystick message parser would make it easier to release open source ROS nodes that depend on joystick input.

Design:

Package Layout:

joystick_drivers/
├── joy/
│   ├── src/joy_node.cpp
│   └── ... existing joy node
├── joy_event_publisher/
│   ├── joy_event_publisher_node.cpp
│   └── other_source_files.cpp

ROS Params:

  • joy message input topic
  • debounce filter time
  • double/triple press time limit
  • long hold time
  • publish on event on rising edge or falling edge
  • treat axis as buttons

I volunteer to write and maintain this node. Any feedback would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions