scripts
mouse.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
import
rospy
4
5
try
:
6
import
joy_mouse.joy
7
except
:
8
import
roslib; roslib.load_manifest(
"joy_mouse"
)
9
import
joy_mouse.joy
10
11
if
__name__ ==
"__main__"
:
12
rospy.init_node(
"joy_mouse"
)
13
device_name = rospy.get_param(
"~dev_name"
,
False
)
14
if
device_name:
15
dev =
lookupDeviceFileByNameAttribute
(device_name)
16
else
:
17
dev = rospy.get_param(
"~dev"
,
"/dev/input/mouse0"
)
18
joy_mouse.joy.main
(dev,
19
rospy.get_param(
"~autorepeat_rate"
, 0),
20
rospy.get_param(
"~frame_id"
,
"mouse"
))
21
joy_mouse.joy.lookupDeviceFileByNameAttribute
def lookupDeviceFileByNameAttribute(name, prefix="mouse")
Definition:
joy.py:17
joy_mouse.joy.main
def main(device_name, autorepeat_rate, frame_id)
Definition:
joy.py:30
joy_mouse.joy
Definition:
joy.py:1
joy_mouse
Author(s):
autogenerated on Wed Jan 24 2024 04:05:19