|
def | __init__ (self) |
|
def | cb_feedback (self, msg) |
|
def | cb_joy_feedback (self, msg) |
|
def | cb_joy_pub_timer (self, _) |
|
def | cb_report (self, report) |
|
def | cb_stop_rumble (self, event) |
|
def | __init__ (self) |
|
def | cleanup_device (self) |
|
def | control (self, led_red=None, led_green=None, led_blue=None, rumble_small=None, rumble_big=None, flash_on=None, flash_off=None) |
|
def | exit (self) |
|
def | fire_event (self, event, args) |
|
def | read_report (self) |
|
def | run (self) |
|
def | setup_device (self, device) |
|
Definition at line 17 of file controller_ros.py.
◆ __init__()
def ds4_driver.controller_ros.ControllerRos.__init__ |
( |
|
self | ) |
|
◆ _normalize_axis_()
def ds4_driver.controller_ros.ControllerRos._normalize_axis_ |
( |
|
val, |
|
|
|
deadzone = 0.0 |
|
) |
| |
|
staticprivate |
Convert a value of [0, 255] to [-1.0, 1.0]
:param val:
:param deadzone:
:return:
Definition at line 228 of file controller_ros.py.
◆ _report_to_status_()
def ds4_driver.controller_ros.ControllerRos._report_to_status_ |
( |
|
report_msg, |
|
|
|
deadzone = 0.05 |
|
) |
| |
|
staticprivate |
◆ _status_to_battery_()
def ds4_driver.controller_ros.ControllerRos._status_to_battery_ |
( |
|
status | ) |
|
|
staticprivate |
Converts a ds4_driver/Status to sensor_msgs/BatteryState
Reference: https://www.psdevwiki.com/ps4/DualShock_4#Specifications
:param status:
:type status: Status
:return:
Definition at line 282 of file controller_ros.py.
◆ _status_to_imu_()
def ds4_driver.controller_ros.ControllerRos._status_to_imu_ |
( |
|
status | ) |
|
|
staticprivate |
Converts a ds4_driver/Status to sensor_msgs/Imu
:param status:
:type status: Status
:return:
Definition at line 308 of file controller_ros.py.
◆ _status_to_joy_()
def ds4_driver.controller_ros.ControllerRos._status_to_joy_ |
( |
|
status | ) |
|
|
staticprivate |
Converts a ds4_driver/Status message to sensor_msgs/Joy
:param status:
:type status: Status
:return:
Definition at line 242 of file controller_ros.py.
◆ cb_feedback()
def ds4_driver.controller_ros.ControllerRos.cb_feedback |
( |
|
self, |
|
|
|
msg |
|
) |
| |
Callback method for ds4_driver/Feedback
:param msg:
:type msg: Feedback
:return:
Definition at line 87 of file controller_ros.py.
◆ cb_joy_feedback()
def ds4_driver.controller_ros.ControllerRos.cb_joy_feedback |
( |
|
self, |
|
|
|
msg |
|
) |
| |
Callback method for sensor_msgs/JoyFeedbackArray
The message contains the following feedback:
LED0: red
LED1: green
LED2: blue
RUMBLE0: rumble small
RUMBLE1: rumble big
:param msg:
:type msg: JoyFeedbackArray
:return:
Definition at line 124 of file controller_ros.py.
◆ cb_joy_pub_timer()
def ds4_driver.controller_ros.ControllerRos.cb_joy_pub_timer |
( |
|
self, |
|
|
|
_ |
|
) |
| |
◆ cb_report()
def ds4_driver.controller_ros.ControllerRos.cb_report |
( |
|
self, |
|
|
|
report |
|
) |
| |
Callback method for ds4drv event loop
:param report:
:return:
Definition at line 44 of file controller_ros.py.
◆ cb_stop_rumble()
def ds4_driver.controller_ros.ControllerRos.cb_stop_rumble |
( |
|
self, |
|
|
|
event |
|
) |
| |
◆ _autorepeat_rate
ds4_driver.controller_ros.ControllerRos._autorepeat_rate |
|
private |
◆ _prev_joy
ds4_driver.controller_ros.ControllerRos._prev_joy |
|
private |
◆ deadzone
ds4_driver.controller_ros.ControllerRos.deadzone |
◆ frame_id
ds4_driver.controller_ros.ControllerRos.frame_id |
◆ imu_frame_id
ds4_driver.controller_ros.ControllerRos.imu_frame_id |
◆ pub_battery
ds4_driver.controller_ros.ControllerRos.pub_battery |
◆ pub_imu
ds4_driver.controller_ros.ControllerRos.pub_imu |
◆ pub_joy
ds4_driver.controller_ros.ControllerRos.pub_joy |
◆ pub_report
ds4_driver.controller_ros.ControllerRos.pub_report |
◆ pub_status
ds4_driver.controller_ros.ControllerRos.pub_status |
◆ sub_feedback
ds4_driver.controller_ros.ControllerRos.sub_feedback |
◆ use_standard_msgs
ds4_driver.controller_ros.ControllerRos.use_standard_msgs |
The documentation for this class was generated from the following file: