10#ifndef _JOY_COMMON_HPP
11#define _JOY_COMMON_HPP
13#include <joy_common_msgs/msg/buttons.hpp>
14#include <joy_common_msgs/msg/joy.hpp>
15#include <rclcpp/rclcpp.hpp>
16#include <sensor_msgs/msg/joy.hpp>
24 std::map<std::string, std::function<
ButtonValue(
const joy_common_msgs::msg::Buttons &)>>;
31 explicit JoyCommon(
const rclcpp::NodeOptions & options);
34 std::string device_name;
35 double force_x_scale, force_y_scale, force_z_scale;
36 double torque_x_scale, torque_z_scale;
38 rclcpp::Publisher<joy_common_msgs::msg::Joy>::SharedPtr pub_;
39 rclcpp::Subscription<sensor_msgs::msg::Joy>::SharedPtr sub_;
41 void _joyCallback(
const sensor_msgs::msg::Joy::SharedPtr msg);
Definition: joy_common.hpp:29
std::map< std::string, std::function< ButtonValue(const joy_common_msgs::msg::Buttons &)> > ButtonMap
Definition: joy_common.hpp:24
ButtonMap get_button_map()
Definition: joy_common.cpp:17
std::variant< bool, double > ButtonValue
Definition: joy_common.hpp:22