Public Member Functions | Public Attributes | Static Private Member Functions | Private Attributes | List of all members
ds4_driver.controller_ros.ControllerRos Class Reference
Inheritance diagram for ds4_driver.controller_ros.ControllerRos:
Inheritance graph
[legend]

Public Member Functions

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)
 

Public Attributes

 deadzone
 
 frame_id
 
 imu_frame_id
 
 pub_battery
 
 pub_imu
 
 pub_joy
 
 pub_report
 
 pub_status
 
 sub_feedback
 
 use_standard_msgs
 

Static Private Member Functions

def _normalize_axis_ (val, deadzone=0.0)
 
def _report_to_status_ (report_msg, deadzone=0.05)
 
def _status_to_battery_ (status)
 
def _status_to_imu_ (status)
 
def _status_to_joy_ (status)
 

Private Attributes

 _autorepeat_rate
 
 _prev_joy
 

Detailed Description

Definition at line 17 of file controller_ros.py.

Constructor & Destructor Documentation

def ds4_driver.controller_ros.ControllerRos.__init__ (   self)

Definition at line 18 of file controller_ros.py.

Member Function Documentation

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.

def ds4_driver.controller_ros.ControllerRos._report_to_status_ (   report_msg,
  deadzone = 0.05 
)
staticprivate

Definition at line 161 of file controller_ros.py.

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.

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.

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.

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.

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.

def ds4_driver.controller_ros.ControllerRos.cb_joy_pub_timer (   self,
  _ 
)

Definition at line 156 of file controller_ros.py.

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.

def ds4_driver.controller_ros.ControllerRos.cb_stop_rumble (   self,
  event 
)

Definition at line 117 of file controller_ros.py.

Member Data Documentation

ds4_driver.controller_ros.ControllerRos._autorepeat_rate
private

Definition at line 26 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos._prev_joy
private

Definition at line 27 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.deadzone

Definition at line 22 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.frame_id

Definition at line 23 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.imu_frame_id

Definition at line 24 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.pub_battery

Definition at line 32 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.pub_imu

Definition at line 34 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.pub_joy

Definition at line 33 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.pub_report

Definition at line 31 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.pub_status

Definition at line 41 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.sub_feedback

Definition at line 35 of file controller_ros.py.

ds4_driver.controller_ros.ControllerRos.use_standard_msgs

Definition at line 21 of file controller_ros.py.


The documentation for this class was generated from the following file:


ds4_driver
Author(s): Naoki Mizuno
autogenerated on Fri May 1 2020 03:25:46